JP4593580B2 - Method for generating operation buttons for XML data - Google Patents

Method for generating operation buttons for XML data Download PDF

Info

Publication number
JP4593580B2
JP4593580B2 JP2007053858A JP2007053858A JP4593580B2 JP 4593580 B2 JP4593580 B2 JP 4593580B2 JP 2007053858 A JP2007053858 A JP 2007053858A JP 2007053858 A JP2007053858 A JP 2007053858A JP 4593580 B2 JP4593580 B2 JP 4593580B2
Authority
JP
Japan
Prior art keywords
xml
button
data
xml data
elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007053858A
Other languages
Japanese (ja)
Other versions
JP2008217408A (en
Inventor
秀博 有田
智章 村上
哲朗 牛尾
Original Assignee
株式会社エヌジェーケー
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社エヌジェーケー filed Critical 株式会社エヌジェーケー
Priority to JP2007053858A priority Critical patent/JP4593580B2/en
Publication of JP2008217408A publication Critical patent/JP2008217408A/en
Application granted granted Critical
Publication of JP4593580B2 publication Critical patent/JP4593580B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、XML形式で記載されたデータ(XMLデータ)を構成する要素、属性、及び要素と属性の値から、コンピュータに実行させる処理を指示するための操作ボタンを自動的に生成して表示装置に表示させるXMLデータ用操作ボタンの生成方法に関する。   The present invention automatically generates and displays operation buttons for instructing a process to be executed by a computer from elements, attributes, and values of elements and attributes constituting data (XML data) described in an XML format. The present invention relates to a method for generating operation buttons for XML data to be displayed on a device.

通常、XMLを使用するソフトウェアは、そのソフトウェアがサポートするXMLのスキーマのインスタンスを扱う。換言すれば、XML形式で記述されたデータ(XMLデータ)があった場合、そのデータを分析し活用するためには、そのXMLのスキーマをサポートするソフトウェアを用意する必要がある。XML技術の普及に伴い、多種多様なスキーマのXMLデータが氾濫している。しかしながら、それらの不特定なスキーマを持つXMLデータを一貫した操作で分析し活用できるようにした仕組みは考えられていないのが現状である。   Normally, software that uses XML handles an instance of an XML schema that the software supports. In other words, when there is data described in the XML format (XML data), in order to analyze and utilize the data, it is necessary to prepare software that supports the schema of the XML. With the spread of XML technology, XML data of various schemas is flooded. However, at present, no mechanism has been devised that enables XML data having such an unspecified schema to be analyzed and utilized by a consistent operation.

ユーザがデータを簡単に分析し活用するために、コンピュータ処理用操作ボタンをデータから自動生成する方法が既に開発されている(特許文献1参照)。この方法では、複数のフィールドから構成され、記憶装置に記憶されている複数のデータの任意のフィールドに対応させてボタンクラスを設定し、このボタンクラス毎に記憶装置に記憶されているデータの値をグループ化したボタングループとデータの値に対応させた個別ボタンとを設定し、これらのボタンクラス、ボタングループ及び個別ボタンをコンピュータ処理用操作ボタンとして表示装置に表示するようにしている。   In order for users to easily analyze and utilize data, a method for automatically generating operation buttons for computer processing from data has already been developed (see Patent Document 1). In this method, a button class is set corresponding to an arbitrary field of a plurality of data stored in a storage device, and the value of the data stored in the storage device for each button class. Button groups and individual buttons corresponding to data values are set, and these button class, button group, and individual buttons are displayed on the display device as operation buttons for computer processing.

しかしながら、特許文献1に記載の方法では、フィールドで構成されるレコード形式、或いはCSV形式のデータをソースデータとしているため、タグ等のマークアップにより記述されるXML形式のデータを基に操作ボタンを直接自動生成することはできない。XMLデータを直接入力としなくても、XMLデータをフィールドで構成されるレコード形式のデータ等に変換することが考えられるが、この場合、専用のプログラム、XSLTまたは手動によってデータを変換する必要があって、ユーザにとっての負担は大きい。   However, since the method described in Patent Document 1 uses record format or CSV format data composed of fields as the source data, the operation button can be operated based on XML format data described by markup such as tags. It cannot be automatically generated directly. Even if the XML data is not directly input, it may be possible to convert the XML data into record format data composed of fields. In this case, it is necessary to convert the data using a dedicated program, XSLT, or manually. Therefore, the burden on the user is large.

また、特許文献1に記載の方法では、(1)複数のフィールドで構成されるフラットなデータ構造を前提にしており、階層構造のデータを扱えない、(2)データ毎に可変の構成要素のデータ(全データでフィールド構成が同じでないデータ)を扱えない、(3)構成要素(フィールド)の追加や削除等のデータ構成の変更に柔軟に対応できない、という技術上の制約もあった。
特許第2702416号公報
In the method described in Patent Document 1, (1) a flat data structure composed of a plurality of fields is assumed, and hierarchical data cannot be handled. (2) variable component elements for each data There are technical limitations that data (data whose field configuration is not the same in all data) cannot be handled, and (3) it cannot flexibly cope with changes in data configuration such as addition or deletion of components (fields).
Japanese Patent No. 2702416

XML形式で記載されたデータ(XMLデータ)を基に直接操作ボタンを自動生成するためには、次のような課題がある。
(1)構造化されたデータであるXMLデータに対して、任意の位置にアクセスしてXMLの内容を参照したり、変更したりする必要がある。このためには、XMLデータを解析し、XMLデータを構成する要素名、属性名、文字列値等を効率よく処理するため、入力されたXMLデータの構成要素を確認する必要がある。
In order to automatically generate an operation button directly based on data (XML data) described in the XML format, there are the following problems.
(1) For XML data, which is structured data, it is necessary to access an arbitrary position and refer to or change the contents of the XML. For this purpose, it is necessary to analyze the XML data and to confirm the constituent elements of the input XML data in order to efficiently process the element names, attribute names, character string values, etc. constituting the XML data.

(2)XMLデータを構成する要素や属性の間の関係から構造を自動的に解析して、以降の操作ボタン生成に係る一連の処理を効率的に実施するため、XMLデータの構造を定義する必要がある。このためには、与えたXMLのスキーマを効率よく把握するためのXMLデータの構造を生成する必要がある。   (2) The structure of XML data is defined in order to automatically analyze the structure based on the relationship between the elements and attributes constituting the XML data and to efficiently perform a series of processes relating to the subsequent operation button generation. There is a need. For this purpose, it is necessary to generate a structure of XML data for efficiently grasping a given XML schema.

(3)XMLデータから操作ボタン自動生成の対象にするデータ(データ単位)を識別するための要素(データ単位識別用要素)をユーザが指定できるようにする必要がある。このためには、(2)に基づいて、XMLデータの構造を表示装置に表示し、ユーザにデータの構造を確認してもらった後で、前記データ単位識別用要素をユーザが入力装置から指定できるようにする必要がある。   (3) It is necessary to allow the user to specify an element (data unit identification element) for identifying data (data unit) to be automatically generated from the operation data from the XML data. For this purpose, based on (2), the XML data structure is displayed on the display device, and after the user confirms the data structure, the user specifies the data unit identification element from the input device. It needs to be possible.

(4)前記データ単位を構成する要素や属性、及びデータ単位識別用要素に関連する祖先要素や属性の内、ボタン化するもの、及びボタン化しないがボタン操作以降も参照したいものをまとめて抽出対象と呼ぶと、抽出対象をユーザが指定できるようにする必要がある。このためには、(2)に基づいてXMLデータの構造を表示装置に表示して抽出対象を入力し、入力内容をXMLデータの構造と一緒に保存できるようにする必要がある。   (4) Of the elements and attributes that make up the data unit and the ancestor elements and attributes related to the data unit identification element, those that are buttoned and those that are not buttoned but that you want to refer to after the button operation are collectively extracted When called as a target, it is necessary to allow the user to specify the extraction target. For this purpose, it is necessary to display the structure of the XML data on the display device based on (2), input an extraction target, and save the input contents together with the structure of the XML data.

(5)前記(1)〜(4)に基づいて、XMLデータから操作ボタンの基になるデータ、すなわち、前記抽出対象の要素や属性に対応したフィールドとそのデータを格納したボタン生成用ソースデータを生成する必要がある。
(6)前記ボタン生成用ソースデータを基に、操作ボタンを構成するボタンクラス、個別ボタンを内部処理で設定する必要がある。
(5) Based on the above (1) to (4), the data that is the basis of the operation button from the XML data, that is, the field corresponding to the element or attribute to be extracted and the button generation source data storing the data Must be generated.
(6) Based on the button generation source data, it is necessary to set button classes and individual buttons constituting the operation buttons by internal processing.

本発明は上記課題に鑑みて成されたもので、ユーザがXML形式のデータを容易に検索し分析して活用できるようにした操作ボタンを、XMLデータから直接自動生成することができるようにしたXMLデータ用操作ボタンの生成方法を提供することを目的とする。   The present invention has been made in view of the above problems, and allows operation buttons that allow a user to easily search, analyze, and utilize XML format data directly and automatically from XML data. An object of the present invention is to provide a method for generating operation buttons for XML data.

本発明のXMLデータ用操作ボタン生成方法は、記憶装置に記憶されているXMLデータを基に、操作ボタンを生成するプログラムされた中央処理装置が実行するXMLデータ用操作ボタン生成方法であって、(1)XMLデータを構成する要素間の関連、要素と属性間の関連、及び要素と属性の持つ値から、前記XMLデータを木構造と見なして該XMLデータを構成する全ての要素や属性の相互関係や位置関係の情報を格納したXMLデータテーブルを自動生成して記憶装置に記憶し、(2)前記XMLデータテーブルを参照しながら前記XMLデータの構造を解析してスキーマ言語で表したスキーマ定義を自動生成し、(3)(i)前記XMLデータを構成する要素の内、XMLボタン生成対象の基準要素となるように前記スキーマ定義を介して指定されたデータ単位と、(ii)該データ単位自体、該データ単位のXMLデータ構造上の子孫及び祖先の各要素の値または各属性の値の内で、前記XMLデータから抽出したい値として前記スキーマ定義を介して指定されたボタン化対象を有する抽出対象と、から構成されるボタン情報を形成し、(4)前記スキーマ定義と前記ボタン情報をまとめてXMLデータ構造定義テーブルとして記憶装置に記憶し、(5)前記XMLデータから前記ボタン情報の前記データ単位に該当する要素を全て取り出し、該取り出した要素自体、該要素の子孫要素または祖先要素に含まれる各要素の値または各属性の値から前記ボタン情報の前記ボタン化対象に指定されたものを抽出し、前記データ単位に該当してXMLデータから取り出された要素を前記ボタン化対象に対応するボタン化フィールドを有するレコードとし、前記ボタン化対象に指定されたものとして抽出された前記要素の値または前記属性の値を前記ボタン化フィールドのフィールド値とした1つ以上のレコードから成るボタン生成用ソースデータテーブルを自動生成して記憶装置に記憶し、(6)前記ボタン生成用ソースデータテーブルの前記各ボタン化フィールドに現れるユニークな値に対応させて生成される個別ボタンと、前記各ボタン化フィールドに対応させて生成されて前記個別ボタンを前記各ボタン化フィールド毎に統括するボタンクラスとから構成され、前記個別ボタンの選択によってXMLデータにアクセスできるようにしたXMLボタンを自動生成して表示装置に表示する、ことを特徴とする。 XML data manipulation buttons generation method of the present invention, based on the XML data stored in the storage device, a programmed central processing unit operation button generation method for XML data to execute to generate the operation button (1) All the elements and attributes constituting the XML data by regarding the XML data as a tree structure from the relation between the elements constituting the XML data, the relation between the elements and the attributes, and the values of the elements and the attributes XML data table storing information on mutual relations and positional relations is automatically generated and stored in a storage device. (2) The structure of the XML data is analyzed with reference to the XML data table and expressed in a schema language. (3) (i) Among the elements constituting the XML data, the schema definition is generated so as to be a reference element for generating an XML button. And (ii) the data unit itself, the value of each element of the descendant and ancestor in the XML data structure of the data unit, or the value of each attribute, and is desired to be extracted from the XML data Button information composed of an extraction target having a buttonization target designated via the schema definition as a value is formed, and (4) the schema definition and the button information are collectively stored as an XML data structure definition table (5) All the elements corresponding to the data unit of the button information are extracted from the XML data, the value of each element included in the extracted element itself, a descendant element or an ancestor element of the element, or each Extract the button information specified as the button object from the attribute value and extract it from the XML data corresponding to the data unit. The element is a record having a buttoned field corresponding to the buttonization target, and the value of the element or the attribute value extracted as designated as the buttonization target is the field value of the buttoned field 1 A button generation source data table composed of two or more records is automatically generated and stored in a storage device. (6) The button generation source data table is generated in correspondence with a unique value appearing in each buttoned field of the button generation source data table. An individual button, and a button class that is generated corresponding to each buttoned field and manages the individual buttons for each buttoned field, so that XML data can be accessed by selecting the individual button. The generated XML button is automatically generated and displayed on a display device.

これにより、XMLデータを基に、XMLデータを構成する要素や属性に対応させてボタンクラスを設定し、ボタンクラス毎に対応する要素や属性の値に対応させて個別ボタンを設定することによって、XMLデータの操作ボタンを自動生成して表示装置に表示することができる。また、XMLデータテーブルを自動生成することによって、XMLデータに対して、任意の位置にアクセスしてXMLの内容を参照したり、変更したりできる。更に、XMLデータ構造定義テーブルを自動生成することによって、以降の操作ボタン生成に係る一連の処理を効果的に実施することができ、しかも、ボタン生成用ソースデータテーブルを自動生成することによって、XMLデータの操作ボタンを自動生成できる。   Thereby, based on the XML data, by setting the button class corresponding to the elements and attributes constituting the XML data, and setting the individual buttons corresponding to the values of the corresponding elements and attributes for each button class, Operation buttons for XML data can be automatically generated and displayed on a display device. Further, by automatically generating an XML data table, it is possible to access or change the position of the XML data by accessing an arbitrary position. Furthermore, by automatically generating the XML data structure definition table, a series of processing relating to the subsequent operation button generation can be effectively performed, and further, by automatically generating the button generation source data table, the XML Data operation buttons can be automatically generated.

前記ボタン情報は、前記データ単位に該当してXMLデータから取り出された要素に含まれるが、該要素から除外したい要素がある場合に、該除外したい要素を前記データ単位に該当してXMLデータから取り出された要素から除外するように指定された除外インスタンスを有することが好ましい。
これにより、一部の対象インスタンスを、XMLボタンによる分析対象から除外したいというニーズに応えることができる。
The button information is included in an element extracted from the XML data corresponding to the data unit. When there is an element to be excluded from the element, the element to be excluded corresponds to the data unit from the XML data. It is preferred to have an exclusion instance that is designated to be excluded from the retrieved element .
Thereby, it is possible to meet the need to exclude some target instances from the analysis target by the XML button.

前記表示装置に表示されたXMLボタンは、例えば、ユーザが選択した個別ボタンに対応するデータを前記ボタン生成用ソースデータテーブルから取り出すのに使用される。
これにより、XMLボタンをユーザに選択させるだけでXMLデータが持つ情報を取り出すことができる。
The XML button displayed on the display device is used, for example, to extract data corresponding to the individual button selected by the user from the button generation source data table.
As a result, the information held in the XML data can be extracted simply by allowing the user to select the XML button.

本発明によれば、以下のような効果を享受できる。
(1)XMLデータから直接操作ボタンを自動生成できるので、ユーザがXMLデータを容易に検索し分析し活用できるようになる。
(2)CSV形式のデータに代表される、フィールドで構成されるレコードデータを使用すると、このデータでは階層構造を表現できない。XMLデータでは、階層構造を表現できるので、これを認識して階層構造のデータから任意のデータを抽出して、操作ボタンを自動生成することができるようになる。
According to the present invention, the following effects can be enjoyed.
(1) Since the operation buttons can be automatically generated directly from the XML data, the user can easily search, analyze and utilize the XML data.
(2) If record data composed of fields represented by CSV format data is used, the hierarchical structure cannot be expressed by this data. Since XML data can express a hierarchical structure, it is possible to recognize this, extract arbitrary data from the hierarchical data, and automatically generate operation buttons.

(3)フィールドで構成されるレコードデータから操作ボタンを自動生成する場合は、フィールドの個数やレコード内での位置(配置順)が固定されているため、全てのデータが同一構成でなければならない。このため、該当する値がないフィールドのデータが多数発生する等、無駄なフィールド(空白)を含めて用意する必要がある。XMLデータでは、スキーマ(本発明におけるXMLデータ構造定義テーブルのスキーマ定義部の記述)が許す範囲で、例えば任意の要素や属性を省略したり、出現順序を入れ替えたりすることができるので、効率よくXMLデータの操作ボタンを自動生成できる。   (3) When an operation button is automatically generated from record data composed of fields, the number of fields and the position (arrangement order) in the record are fixed, so all data must have the same configuration. . For this reason, it is necessary to prepare including a useless field (blank) such as a large number of data in a field having no corresponding value. In XML data, for example, any element or attribute can be omitted or the order of appearance can be changed within the range allowed by the schema (description of the schema definition part of the XML data structure definition table in the present invention). XML data operation buttons can be automatically generated.

以下、本発明の実施の形態を図面を参照して説明する。
本発明を実施するためのコンピュータシステム、すなわちXMLデータ用ボタンシステムのハードウェアは、図1に示すように、中央処理装置10、記憶装置12、表示装置14及び入力装置16から主に構成されている。表示装置14が出力用のユーザインターフェイスとなり、入力装置16が入力用のユーザインターフェイスとなる。ユーザは、表示装置14及び入力装置16を使用して、後述するアプリケーション(XMLデータボタン処理プログラム)を通してXMLデータ用ボタンシステムに指令を送る。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
The computer system for implementing the present invention, that is, the hardware of the button system for XML data, mainly comprises a central processing unit 10, a storage unit 12, a display unit 14, and an input unit 16, as shown in FIG. Yes. The display device 14 serves as an output user interface, and the input device 16 serves as an input user interface. The user uses the display device 14 and the input device 16 to send a command to the XML data button system through an application (XML data button processing program) described later.

XMLデータ用ボタンシステムのソフトウェアは、XML形式で記載されたデータ(XMLデータ)を基に、操作ボタン(以降、XMLボタンという)を自動生成するために、図2に示すように、XML文書を、内容の参照や更新といった活用をしやすい形で記憶装置に展開し、外部の機能に対してそのXMLが持つ情報に問い合わせる能力を有するXMLパース機能20と、入力されたXML(入力XML)の内容をXMLパース機能20の能力を使って把握してスキーマを自動判断し、かつ入力XMLをどのように操作ボタン化するかを設定し、それらをXMLデータ構造定義テーブルとして保存する能力を有する構造管理機能22と、XMLデータ構造定義テーブルが持つ情報を基に入力XMLから操作ボタンを生成するためのデータを抽出しボタン生成用ソースデータテーブルに保存する能力を有するボタン生成用ソースデータ生成機能24と、ボタン生成用ソースデータテーブルからボタンクラスと個別ボタンから成る操作ボタン(以降、XMLボタンという)を表示するボタン生成機能26と、表示されたXMLボタンをユーザに選択させるだけで入力XMLが持つ情報を取り出すことができる能力を有するボタン機能28の5つの機能から構成される。   As shown in FIG. 2, the XML data button system software generates an XML document as shown in FIG. 2 in order to automatically generate operation buttons (hereinafter referred to as XML buttons) based on data described in XML format (XML data). The XML parsing function 20 has the ability to expand the storage device in a form that is easy to use, such as referencing and updating the contents, and to query the information held by the XML with respect to external functions, and the input XML (input XML) Structure that has the ability to grasp the contents using the capabilities of the XML parsing function 20 and automatically determine the schema, set how to make the input XML into operation buttons, and save them as an XML data structure definition table Data for generating an operation button from the input XML based on the information possessed by the management function 22 and the XML data structure definition table A button generation source data generation function 24 having the ability to extract and store in the button generation source data table, and an operation button (hereinafter referred to as an XML button) including a button class and an individual button from the button generation source data table are displayed. The button generation function 26 and the button function 28 having the ability to extract information held in the input XML simply by allowing the user to select the displayed XML button are configured.

XMLパース機能20、構造管理機能22、ボタン生成用ソースデータ生成機能24、ボタン生成機能26、及びボタン機能28を持つ情報処理装置及びプログラムを、総称してXMLデータ用ボタンシステムと呼ぶ。   An information processing apparatus and a program having the XML parsing function 20, the structure management function 22, the button generation source data generation function 24, the button generation function 26, and the button function 28 are collectively referred to as an XML data button system.

XMLデータ用ボタンシステムは、各機能を利用するための外部インターフェイスを公開し、アプリケーション(XMLデータボタン処理プログラム)30は、そのインターフェイスを使用して、各機能と連携することにより、XMLデータを基にXMLボタンを自動生成し、ユーザがボタン選択によってXMLデータを分析したり活用したりする処理環境を提供する。   The button system for XML data exposes an external interface for using each function, and the application (XML data button processing program) 30 uses the interface to link the XML data based on each function. An XML button is automatically generated, and a processing environment in which the user analyzes and utilizes XML data by selecting the button is provided.

アプリケーション30は、XMLデータ用ボタンシステムとユーザとの間に立ち、ユーザの要求をXMLデータ用ボタンシステムの各機能に伝えたり、各機能の処理状況をユーザに示したり、XMLボタンのボタン操作の結果ユーザにとって特定の用途に向けた有効な処理を行ったりするプログラムである。以降、処理環境を提供するアプリケーション(XMLデータボタン処理プログラム)30を単にアプリケーションと呼ぶ。   The application 30 stands between the XML data button system and the user, transmits the user's request to each function of the XML data button system, indicates the processing status of each function to the user, and performs the button operation of the XML button. As a result, it is a program that performs effective processing for a specific application for the user. Hereinafter, an application (XML data button processing program) 30 that provides a processing environment is simply referred to as an application.

図2では、ある機能から別な機能への矢印が示されている。実線による矢印は、根もとの機能が先の機能を直接使用することを表す。破線による矢印は、根もとの機能が先の機能によって作成されるデータを参照する等、先の機能に間接的に依存することを表す。以下、各機能の概要を先ず説明する。   In FIG. 2, an arrow from one function to another is shown. A solid arrow indicates that the underlying function uses the previous function directly. An arrow with a broken line indicates that the root function depends indirectly on the previous function, such as referring to data created by the previous function. Hereinafter, an overview of each function will be described first.

XMLパース機能20は、入力されたXMLデータ(入力XML)を解析し、その内容をXMLデータテーブルに展開し、XMLデータテーブルを参照しながら他の機能からの入力XMLの内容に対する問い合わせに応える。ここで、XMLデータテーブルは、XMLを構成する任意の要素や属性、任意の要素や属性の相互関係等を保持し、XMLパース機能はこのデータテーブルに対するアクセス能力を他の機能に提供する。   The XML parsing function 20 analyzes the input XML data (input XML), expands the contents into an XML data table, and responds to an inquiry about the contents of the input XML from other functions while referring to the XML data table. Here, the XML data table holds arbitrary elements and attributes constituting the XML, mutual relationships between arbitrary elements and attributes, and the XML parsing function provides an access capability to the data table to other functions.

構造管理機能22とボタン生成用ソースデータ生成機能24は、操作ボタンを生成するまでの過程において、入力XMLを参照するためにXMLパース機能20の能力を利用するので、本発明を構成する不可欠の機能であるが、XMLパース機能20自身は、本発明の主体ではない。このような能力を有するのであれば、普及しているXMLパーサによって代替できる。   Since the structure management function 22 and the button generation source data generation function 24 use the ability of the XML parsing function 20 to refer to the input XML in the process until the operation button is generated, it is an indispensable component of the present invention. Although it is a function, the XML parsing function 20 itself is not the subject of the present invention. If it has such a capability, it can be replaced by a popular XML parser.

構造管理機能22は、「XMLデータ構造定義テーブル」の生成と管理を行う。XMLデータ構造定義テーブルは、スキーマ言語が記述された「スキーマ定義部」と、入力XMLを操作ボタンにする際の情報(以降、XMLボタン化条件と呼ぶ)が記述された「ボタン情報部」に分かれる。構造管理機能22は、XMLパース機能20を利用して入力XMLのスキーマを自動的に判断し、結果をスキーマ定義部に保存する。また、アプリケーション30を介して自動決定されたスキーマをユーザに示し、必要に応じてユーザにスキーマの調整をさせてスキーマ定義部を更新する能力を持つ。更に、アプリケーション30を介してスキーマ定義部に保存されているスキーマをユーザに示し、操作ボタン化する際の「データ単位」となる要素をユーザに指定させ、結果をボタン情報部に保存する能力を持つ。   The structure management function 22 generates and manages an “XML data structure definition table”. The XML data structure definition table includes a “schema definition section” in which a schema language is described, and a “button information section” in which information (hereinafter referred to as an “XML button conversion condition”) when the input XML is used as an operation button is described. Divided. The structure management function 22 automatically determines the schema of the input XML by using the XML parsing function 20 and stores the result in the schema definition unit. In addition, the schema automatically determined via the application 30 is shown to the user, and the schema definition section is updated by allowing the user to adjust the schema as necessary. Furthermore, the ability to show the user the schema stored in the schema definition part via the application 30, allow the user to specify the element that becomes the “data unit” when creating an operation button, and save the result in the button information part Have.

ボタン生成用ソースデータ生成機能24は、入力XMLを特定の構造を持つデータの集合と見なして処理を行うが、データ単位は、前記特定の構造を示し、データ単位の実体1件を「対象インスタンス」と呼ぶ。データ単位を決定することにより、入力XMLは、対象インスタンスの集合と見なすことができる。構造管理機能22は、入力XML中でXMLボタン化したくないものを対象インスタンスから除くために、ユーザにアプリケーションを介して「除外インスタンス」を指定させ、結果をボタン情報部に保存する能力を持つ。   The button generation source data generation function 24 performs processing by regarding the input XML as a set of data having a specific structure. The data unit indicates the specific structure, and one instance of the data unit is designated as “target instance”. " By determining the data unit, the input XML can be regarded as a set of target instances. The structure management function 22 has a capability of allowing the user to designate an “excluded instance” via the application and save the result in the button information part in order to remove from the target instance those that are not to be converted into XML buttons in the input XML.

入力XMLに関係するどのデータ値をボタン生成用ソースデータテーブルに出力するかを指定するものが「抽出対象」であるが、構造管理機能22は、更に、抽出対象をユーザにアプリケーション30を介して指定させ、結果をボタン情報部に保存する能力を持つ。データ単位の子孫要素または祖先要素のうち、ボタン生成用ソースデータテーブルに出力したいデータ値を持つもの、または前記要素に属して出力したいデータ値を持つ属性が抽出対象となることができる。抽出対象は、ボタン生成用ソースデータテーブルに出力すると同時にXMLボタン化したい「ボタン化対象」と、ボタン生成用ソースデータテーブルに出力するだけでXMLボタン化したくない「参照対象」の2種類がある。   Although what designates which data value related to the input XML is output to the button generation source data table is “extraction target”, the structure management function 22 further sets the extraction target to the user via the application 30. Have the ability to specify and save the result in the button information section. Of the descendant elements or ancestor elements in the data unit, those having a data value to be output to the button generation source data table or attributes having the data value to be output belonging to the element can be extracted. There are two types of extraction targets: “buttonization target” which is output to the button generation source data table and at the same time is converted to an XML button, and “reference target” which is not output to the button generation source data table and is not to be converted to an XML button. .

ボタン生成用ソースデータ生成機能24は、「ボタン生成用ソースデータテーブル」の生成を行う。ボタン生成用ソースデータテーブルは、ボタン生成機能26に渡すためのデータ構造で、フィールドから構成されるレコードの集合から成るテーブルで実現される。   The button generation source data generation function 24 generates a “button generation source data table”. The button generation source data table has a data structure for passing to the button generation function 26, and is realized by a table including a set of records including fields.

ボタン生成用ソースデータ生成機能24は、XMLデータ構造定義テーブルに含まれるボタン情報部に記述された内容に従って、入力XMLからボタン生成用ソースデータテーブルを生成する処理を開始するが、まずボタン情報部で定義されているデータ単位の実体である対象インスタンスの候補を入力XMLから全て取り出す。続いて、ボタン情報部に定義されている除外インスタンスに該当するものを前記対象インスタンス候補から除き、最終的な対象インスタンスを決定する。   The button generation source data generation function 24 starts the process of generating the button generation source data table from the input XML in accordance with the contents described in the button information section included in the XML data structure definition table. All the candidate target instances that are the entities of the data unit defined in (1) are extracted from the input XML. Subsequently, those corresponding to the excluded instances defined in the button information part are excluded from the target instance candidates, and the final target instance is determined.

次に、ボタン生成用ソースデータ生成機能24は、ボタン生成用ソースデータテーブルの実データであるレコードの生成を開始するが、ボタン情報部で指定されている抽出対象1個が前記テーブルのフィールド1個に対応する。ボタン情報部で指定されている抽出対象が複数あれば、前記抽出対象の入力XMLにおける親子関係を保持しつつ、データを取り出してレコードを生成し、各レコードのフィールド値を決定する。全ての対象インスタンスに関連する抽出対象を取り出し、レコードを生成してフィールド値を決定すると、ボタン生成用ソースデータ生成機能24は、ボタン生成用ソースデータテーブルの生成を完了する。   Next, the button generation source data generation function 24 starts generation of a record that is actual data of the button generation source data table, and one extraction target specified in the button information section is the field 1 of the table. Corresponds to each. If there are a plurality of extraction targets specified in the button information part, the data is extracted by generating data while maintaining the parent-child relationship in the input XML to be extracted, and the field value of each record is determined. When the extraction targets related to all target instances are taken out, records are generated, and field values are determined, the button generation source data generation function 24 completes the generation of the button generation source data table.

ボタン生成機能26は、XMLボタンを生成して表示する。XMLボタンは、ボタン生成用ソースデータ生成機能24によって生成されたボタン生成用ソースデータテーブルを基にボタン生成機能26によって自動生成される操作ボタンであり、前記操作ボタンは、「ボタンクラス」と「個別ボタン」から構成される。ボタンクラスは、ボタンクラス名称を持ち、ボタン生成用ソースデータテーブルのフィールドのうちボタン化対象として生成されたものが、ボタンクラスに対応する。「個別ボタン」は、ボタンクラスに属し、ボタン生成用ソースデータテーブルの当該ボタンクラスに対応するフィールドに現れるユニークな値が個別ボタンとなり、前記値が個別ボタン名称となる。各個別ボタンは、ボタン生成用ソースデータテーブルのどのレコードから生成されたかを記憶している。ボタンクラスは、当該ボタンクラスに属する個別ボタンをグループ化した形でボタン生成機能によって表示される。   The button generation function 26 generates and displays an XML button. The XML button is an operation button that is automatically generated by the button generation function 26 based on the button generation source data table generated by the button generation source data generation function 24. The operation buttons include “button class” and “ It consists of “individual buttons”. The button class has a button class name, and a field generated as a button object among the fields of the button generation source data table corresponds to the button class. The “individual button” belongs to a button class, and a unique value appearing in a field corresponding to the button class in the button generation source data table is an individual button, and the value is an individual button name. Each individual button stores which record in the button generation source data table is generated. The button class is displayed by the button generation function in a form in which individual buttons belonging to the button class are grouped.

ボタン機能28は、表示している個別ボタンをユーザが選択するだけで、選択状況に応じて入力XML内のデータを抽出する能力を提供する。選択された個別ボタンは、ボタン生成用ソースデータテーブルのどのレコードから生成されたかを記憶しているので、ボタン機能28は、ユーザが必要とするデータをボタン生成用ソースデータテーブルから取り出すことができる。取り出されたデータは、アプリケーション30が自由に利用することができる。個別ボタン選択によってボタン生成用ソースデータテーブルのレコードが特定されるが、ボタン生成用ソースデータテーブルにはボタン化されていない参照対象から生成されたフィールドも存在するので、アプリケーション30は、これらの参照も行うことが可能である。   The button function 28 provides the ability to extract data in the input XML in accordance with the selection status by simply selecting a displayed individual button. Since the selected individual button stores which record in the button generation source data table is generated, the button function 28 can extract data required by the user from the button generation source data table. . The extracted data can be freely used by the application 30. The record of the button generation source data table is specified by the individual button selection. However, since the button generation source data table includes a field generated from a reference object that is not converted to a button, the application 30 refers to these references. Can also be done.

つまり、XMLパース機能20は、図3(a)に示すように、ボタン化したいXMLデータを入力XML32として受け取り、この入力XML32を解析して、その内容をXMLデータテーブル34に展開する。そして、XMLパース機能20は、入力XML32を一度XMLデータテーブル34に展開すると、図3(b)に示すように、XMLデータテーブル34を参照しながら、随時、外部機能36からの入力XML32の内容に対する問い合わせに応えたり、内容の更新を行ったりすることができる。   That is, as shown in FIG. 3A, the XML parsing function 20 receives the XML data to be buttoned as the input XML 32, analyzes the input XML 32, and develops the contents in the XML data table 34. The XML parsing function 20 once expands the input XML 32 into the XML data table 34, as shown in FIG. 3B, referring to the XML data table 34, the contents of the input XML 32 from the external function 36 at any time. You can respond to inquiries about and update the content.

構造管理機能22は、入力XMLを受け取り、入力XMLの構造を自動的に識別した情報を保持するスキーマ定義部と、XMLボタン化条件を保持するボタン情報部から成るXMLデータ構造定義テーブルを生成する。XMLデータ用ボタンシステムにおいて、構造管理機能22は、入力XMLの内容を参照するために、図2に示すように、XMLパース機能20を使用する。   The structure management function 22 receives the input XML, and generates an XML data structure definition table including a schema definition section that holds information that automatically identifies the structure of the input XML, and a button information section that holds an XML button conversion condition. . In the button system for XML data, the structure management function 22 uses an XML parsing function 20 as shown in FIG. 2 in order to refer to the contents of the input XML.

ボタン生成用ソースデータ生成機能24は、入力XMLとXMLデータ構造定義テーブルを受け取り、当該入力XMLを当該XMLデータ構造定義テーブルの内容に従って、XMLボタンにするために必要なデータであるボタン生成用ソースデータテーブルを生成するための機能であり、フィールドから構成されるレコードの集合データであるボタン生成用ソースデータテーブルを生成する。XMLデータ用ボタンシステムにおいて、ボタン生成用ソースデータ生成機能24は、入力XMLの内容を参照し、構造管理機能22が生成するXMLデータ構造定義テーブルを必要とするので、図2に示すように、XMLパース機能20を使用し、また構造管理機能22に依存する。   The button generation source data generation function 24 receives the input XML and the XML data structure definition table, and generates a button generation source which is data necessary for making the input XML into an XML button according to the contents of the XML data structure definition table. This is a function for generating a data table, and generates a button generation source data table, which is a set of records composed of fields. In the button system for XML data, the button generation source data generation function 24 refers to the contents of the input XML and requires the XML data structure definition table generated by the structure management function 22, so as shown in FIG. The XML parsing function 20 is used and depends on the structure management function 22.

ボタン生成機能26は、入力としてボタン生成用ソースデータテーブルを受け取り、その内容を基にXMLボタンを生成し表示装置に表示する。XMLデータ用ボタンシステムにおいて、ボタン生成機能26は、ボタン生成用ソースデータ生成機能24が生成するボタン生成用ソースデータテーブルを必要とするので、図2に示すように、ボタン生成用ソースデータ生成機能24に依存する。   The button generation function 26 receives a button generation source data table as an input, generates an XML button based on the content, and displays it on the display device. In the button system for XML data, the button generation function 26 requires the button generation source data table generated by the button generation source data generation function 24. Therefore, as shown in FIG. 2, the button generation source data generation function 24.

ボタン機能28は、入力として、ユーザによるボタン選択情報を受け取り、その内容に従ってXMLボタンの表示を更新したり、ボタン生成用ソースデータテーブルの情報を取り出したりする。XMLデータ用ボタンシステムにおいて、ボタン機能28は、ボタン生成機能26が生成するXMLボタンを必要とし、またボタン生成用ソースデータ生成機能24が生成するボタン生成用ソースデータテーブルを参照するので、図2に示すように、ボタン生成機能26及びボタン生成用ソースデータ生成機能24に依存する。
入力XMLの内容は、1個の電子ファイルに書かれて記憶装置に保存されている。表1に、本発明の実施の形態で使用する入力XMLの一例を示す。以下、この入力XMLを参照して説明する。
The button function 28 receives button selection information by the user as an input, updates the display of the XML button according to the content, and extracts information of the button generation source data table. In the button system for XML data, the button function 28 requires the XML button generated by the button generation function 26, and refers to the button generation source data table generated by the button generation source data generation function 24. FIG. As shown in FIG. 4, the button generation function 26 and the button generation source data generation function 24 depend.
The contents of the input XML are written in one electronic file and stored in the storage device. Table 1 shows an example of the input XML used in the embodiment of the present invention. Hereinafter, description will be given with reference to this input XML.

Figure 0004593580
Figure 0004593580

表1に示す例は、ある食品会社の営業員の営業成績を記録したものである。以降、この表1に示す入力XMLを「営業成績.xml」とし、コンピュータの記憶装置に保存されているものとする。尚、この例では、XML宣言を省略してある。また、以降でXML中の特定の部分を指定する際には、XPathの表記法に準じた表記を行う。   The example shown in Table 1 records the sales performance of a salesperson of a certain food company. Hereinafter, it is assumed that the input XML shown in Table 1 is “business results.xml” and is stored in the storage device of the computer. In this example, the XML declaration is omitted. In addition, when a specific part in XML is designated in the following, notation according to the XPath notation is used.

表1に示す入力XML「営業成績.xml」で最初に現れる「社員」要素から、当該社員の情報が以下のように読み取れる。名前が“中村 里沙”、社員番号が“43001”の実績は、「地域=“神奈川”、期間=“2006年4月”、金額=“2,500,000”」、同様に、「地域=“埼玉”、期間=“2006年4月”、金額=“5,800,000”」、更に、「地域=“埼玉”、期間=“2006年5月”、金額=“6,100,000”」である。また、「社員」要素の祖先階層の要素とその属性を見ると、“食品事業部”(組織階層1)の“菓子販売部”(組織階層2)に所属していることがわかる。   From the “employee” element that appears first in the input XML “business results.xml” shown in Table 1, the information of the employee can be read as follows. The results for the name “Risa Nakamura” and employee number “43001” are “Region =“ Kanagawa ”, Period =“ April 2006 ”, Amount =“ 2,500,000 ””, and “Region =“ Saitama ” Period = “April 2006”, Amount = “5,800,000” ”,“ Region = “Saitama”, Period = “May 2006”, Amount = “6,100,000” ”. Also, looking at the elements of the ancestor hierarchy of the “employee” element and their attributes, it can be seen that they belong to the “confectionery sales department” (organization hierarchy 2) of the “food business department” (organization hierarchy 1).

同様に、表1に示す入力XML「営業成績.xml」の最後に現れる「社員」要素から、当該社員の情報が以下のように読み取れる。名前が“横山 美雪”、社員番号が“41294”の実績は、「地域=“神奈川”、期間=“2006年5月”、金額=“3,900,000”」で、“食品事業部”(組織階層1)の直属である。   Similarly, from the “employee” element appearing at the end of the input XML “business results.xml” shown in Table 1, the information of the employee can be read as follows. The record for the name “Miyuki Yokoyama” and employee number “41294” is “Region =“ Kanagawa ”, Period =“ May 2006 ”, Amount =“ 3,900,000 ””, “Food Division” (Organizational Level 1 ).

表1に示す入力XML「営業成績.xml」は、図4で示すような構造を持つ。図4での記法は、以下の通りである。四角形のうち、左側が黒く塗りつぶされていないものは要素を表し、左側が黒く塗りつぶされているものは属性を表す。実線による矢印は、要素と要素を連結し、矢印の根もとにある要素は、その矢印の先にある要素を子として持つことを表す。実線による矢印には、数字またはアスタリスク(*)が付属されている。数字が付属されている場合、親要素は、矢印の先の子要素をその数字に示された個数持つことを表す。アスタリスクが付属されている場合、親要素は、矢印の先の子要素を0個以上の任意の個数持つことを表す。破線による矢印は、要素と属性を連結し、矢印の根もとにある要素は、その矢印の先にある属性を持つことを表す。斜体字で名称が書かれた要素は、文字内容を持つ。   The input XML “business results.xml” shown in Table 1 has a structure as shown in FIG. The notation in FIG. 4 is as follows. Among the squares, the left side that is not painted black represents an element, and the left side that is painted black represents an attribute. A solid arrow indicates that elements are connected to each other, and an element at the base of the arrow has an element at the tip of the arrow as a child. A solid line arrow is accompanied by a number or an asterisk (*). When a number is attached, the parent element indicates that the number of child elements at the tip of the arrow is indicated by the number. When an asterisk is attached, it indicates that the parent element has an arbitrary number of zero or more child elements at the end of the arrow. An arrow with a broken line connects an element and an attribute, and an element at the root of the arrow has an attribute at the tip of the arrow. An element whose name is written in italics has character content.

図4に示すように、トップレベル要素「営業成績」は、子要素として「組織階層<n>」を任意個持つ。要素「組織階層<n>」は、再帰的構造を成し、子要素として任意個の「組織階層<n>」と1個の「社員リスト」を持ち、属性として「名前」を持つ。ここで「<n>」は、現れる階層の深さに応じて決まる変数と見なす。「営業成績」要素の子要素として現れる「組織階層<n>」は「組織階層1」となり、「組織階層1」の子要素として現れる「組織階層<n>」は「組織階層2」となることを表す。要素「社員リスト」は、子要素として「社員」を任意個持つ。要素「社員」は、子要素として「名前」、「社員番号」、及び「実績リスト」をそれぞれ1個ずつ持つ。要素「実績リスト」は、子要素として「実績」を任意個持つ。要素「実績」は、子要素として「期間」及び「金額」をそれぞれ1個ずつ持ち、属性として「地域」を持つ。   As shown in FIG. 4, the top-level element “business results” has an arbitrary “organization hierarchy <n>” as a child element. The element “organization hierarchy <n>” has a recursive structure, has an arbitrary number of “organization hierarchy <n>” and one “employee list” as child elements, and has “name” as an attribute. Here, “<n>” is regarded as a variable determined according to the depth of the appearing hierarchy. “Organization hierarchy <n>” appearing as a child element of the “business performance” element becomes “Organization hierarchy 1”, and “Organization hierarchy <n>” appearing as a child element of “Organization hierarchy 1” becomes “Organization hierarchy 2”. Represents that. The element “employee list” has an arbitrary number of “employees” as child elements. The element “employee” has one “name”, “employee number”, and “result list” as child elements. The element “results list” has an arbitrary number of “results” as child elements. The element “actual result” has one “period” and “amount” as child elements, and “region” as an attribute.

図4に示していないが、次のような制約があるものとする。「//組織階層<n>/@名前」における属性、及び「//社員/名前」における要素の値は、任意の文字列である。「//社員番号」における要素の値、及び「//金額」における要素の値は、整数である。「//実績/@地域」における属性は、売上が発生した地域名を値として取る。「//期間」における要素の値は、年月を表す日付文字列である。   Although not shown in FIG. 4, it is assumed that there are the following restrictions. The attribute in “// organization hierarchy <n> / @ name” and the value of the element in “// employee / name” are arbitrary character strings. The value of the element in “// Employee number” and the value of the element in “// Amount” are integers. The attribute in “// actual / @ region” takes the name of the region where the sales occurred as a value. The value of the element in “// period” is a date character string representing the year and month.

以降の説明において、入力XML、XMLデータ構造定義テーブル、及びボタン生成用ソースデータテーブルを図示する場合、それぞれ図5に示した凡例に則る。すなわち、図5(a)は入力XML32を、図5(b)はXMLデータ構造定義テーブル40を、図5(c)はボタン生成用ソースデータテーブル42をそれぞれ示す。   In the following description, when the input XML, the XML data structure definition table, and the button generation source data table are illustrated, the legends shown in FIG. 5 are used. 5A shows the input XML 32, FIG. 5B shows the XML data structure definition table 40, and FIG. 5C shows the button generation source data table 42.

入力XMLからXMLボタンを生成し表示するまでの基本シーケンスを図6に示す。図6では、ユーザがアプリケーション30を起動した後のシーケンスを表現している。図6での記法は、以下の通りである。   FIG. 6 shows a basic sequence from the input XML to the generation and display of the XML button. In FIG. 6, a sequence after the user starts the application 30 is expressed. The notation in FIG. 6 is as follows.

縦の破線は、当該破線の頂上に位置する機能(またはユーザ)が生存している区間を示す。また、破線の上から下に時間が進行するものとする。破線に載る縦長の四角形は、当該機能が実際に動作している区間(以降、活性区間と呼ぶ)を表す。ある機能の活性区間から別の機能の活性区間に延びる矢印は、根もとの機能が先の機能を使用することを表し、どのように使用するかを矢印の下に記述する。矢印に、図5で示すデータの凡例図が付加している場合は、機能の使用に際して当該データを必要とすることを表す。上に現れる矢印ほど、時間的に先に起こる事象であることを示す。各機能の詳細は後述するが、ここではXMLボタンを生成し表示するまでの基本シーケンスを図6に従って説明する。   A vertical broken line indicates a section in which a function (or user) located at the top of the broken line is alive. It is assumed that time advances from the top to the bottom of the broken line. A vertically long rectangle on the broken line represents a section in which the function is actually operating (hereinafter referred to as an active section). An arrow extending from the active section of one function to the active section of another function indicates that the root function uses the previous function, and describes how to use the function under the arrow. When the legend diagram of the data shown in FIG. 5 is added to the arrow, this indicates that the data is required when the function is used. The arrow that appears above indicates that the event occurs earlier in time. Details of each function will be described later. Here, a basic sequence from generation to display of an XML button will be described with reference to FIG.

(1)ユーザは、アプリケーション30に対して、まずXMLデータ構造定義テーブルを作成するために入力XML32を渡す。
(2)アプリケーション30は、入力XML32をユーザから受けると、XMLデータ構造定義テーブルのスキーマ定義部の自動生成を構造管理機能22に要求する。その際、ユーザから受け取った入力XML32を構造管理機能22に渡す。構造管理機能22は、受け取った入力XML32からXMLデータ構造定義テーブルのスキーマ定義部を自動的に生成する。この際、入力XML32の内容を参照するため、随時、XMLパース機能20を使用するが、図6では省略している。構造管理機能22によってスキーマ定義部が自動生成されると、アプリケーション30は、その定義情報を表示装置に表示する。
(1) The user first passes the input XML 32 to the application 30 in order to create an XML data structure definition table.
(2) Upon receiving the input XML 32 from the user, the application 30 requests the structure management function 22 to automatically generate a schema definition part of the XML data structure definition table. At this time, the input XML 32 received from the user is passed to the structure management function 22. The structure management function 22 automatically generates a schema definition part of an XML data structure definition table from the received input XML 32. At this time, in order to refer to the contents of the input XML 32, the XML parsing function 20 is used at any time, but is omitted in FIG. When the schema definition unit is automatically generated by the structure management function 22, the application 30 displays the definition information on the display device.

(3)ユーザは、表示装置に表示された情報を基に、必要に応じて、スキーマ定義部の調整を入力装置によってアプリケーション30に指示する。また、ユーザは、ここでボタン化条件の指定も入力装置によってアプリケーション30に指示する。
(4)アプリケーション30は、ユーザから受けた指示を構造管理機能22に伝え、構造管理機能22は、調整要求に従ってスキーマ定義部を更新する。また、構造管理機能22は、ユーザから伝えられた内容をXMLデータ構造定義テーブルのボタン情報部に保存し、XMLデータ構造定義テーブルが完成する。XMLデータ構造定義テーブルが完成すると、XMLボタン生成のために必要なユーザ設定が完了したことになる。
(3) Based on the information displayed on the display device, the user instructs the application 30 to adjust the schema definition unit using the input device as necessary. In addition, the user also instructs the application 30 to specify the buttoning condition using the input device.
(4) The application 30 transmits the instruction received from the user to the structure management function 22, and the structure management function 22 updates the schema definition unit according to the adjustment request. In addition, the structure management function 22 saves the contents transmitted from the user in the button information part of the XML data structure definition table, and the XML data structure definition table is completed. When the XML data structure definition table is completed, user settings necessary for generating the XML button are completed.

(5)ユーザは、入力XML32とこれに対応するXMLデータ構造定義テーブル40をアプリケーション30に渡し、ボタン表示を要求する。
(6)アプリケーション30は、ボタン表示に必要となるボタン生成用ソースデータテーブルを作成するために、ユーザから受け取った入力XML32とXMLデータ構造定義テーブル40をボタン生成用ソースデータ生成機能24に渡し、ボタン生成用ソースデータテーブルの生成を要求する。ボタン生成用ソースデータ生成機能24は、受け取った入力XML32とXMLデータ構造定義テーブル40からボタン生成用ソースデータテーブルを自動的に生成する。この際、入力XML32の内容を参照するため、随時、XMLパース機能20を使用するが、図6では省略している。
(5) The user passes the input XML 32 and the corresponding XML data structure definition table 40 to the application 30 and requests button display.
(6) The application 30 passes the input XML 32 and the XML data structure definition table 40 received from the user to the button generation source data generation function 24 in order to create a button generation source data table necessary for button display. Request to generate a source data table for button generation. The button generation source data generation function 24 automatically generates a button generation source data table from the received input XML 32 and the XML data structure definition table 40. At this time, in order to refer to the contents of the input XML 32, the XML parsing function 20 is used at any time, but is omitted in FIG.

(7)ボタン生成用ソースデータテーブルが完成すると、アプリケーション30は、次に、ボタン生成用ソースデータテーブル42をボタン生成機能26に渡し、ボタン生成を要求する。ボタン生成機能26は、受け取ったボタン生成用ソースデータテーブル42から、XMLボタンを自動的に生成して表示装置に表示する。   (7) When the button generation source data table is completed, the application 30 next passes the button generation source data table 42 to the button generation function 26 to request button generation. The button generation function 26 automatically generates an XML button from the received button generation source data table 42 and displays it on the display device.

(8)XMLボタンの生成と表示が完了すると、ユーザは、表示されたXMLボタンを入力装置で操作する。
(9)アプリケーション30は、ボタン機能28を使いながら、ユーザによるボタン操作に応じて、XMLボタンの再表示を行う。
(8) When the generation and display of the XML button is completed, the user operates the displayed XML button with the input device.
(9) The application 30 re-displays the XML button according to the button operation by the user while using the button function 28.

アプリケーション30は、XMLボタン操作に応じて、2次的な効果をもたらす環境をユーザに提供するが、本発明の範囲外となるので、これ以上言及しない。
図6では、ユーザがアプリケーション30を使用してXMLデータ用ボタンシステムの各機能に処理を要求する場合の基本シーケンスを示したが、各機能について、以下に詳細に説明する。
The application 30 provides the user with an environment that provides a secondary effect in response to the XML button operation, but is outside the scope of the present invention and will not be discussed further.
FIG. 6 shows a basic sequence in a case where the user requests processing of each function of the XML data button system using the application 30. Each function will be described in detail below.

1.XMLパース機能
XMLパース機能20は、図3(a)に示すように、ボタン化したいXMLを入力XML32として受け取ると、入力XML32を解析し、その内容をXMLデータテーブル34に展開する。図3(b)に示すように、XMLパース機能20が外部機能36からの入力XML32の内容に対する問い合わせに応えるため、XMLデータテーブル34には、入力XML32を構成する全ての要素や属性の相互関係や位置関係等の情報が格納される。XMLパース機能20は、任意要素の子要素数、任意要素の子要素リスト、任意要素に属する属性リスト、任意要素に属する任意属性の値、任意の名称を持つ要素のリスト等の情報を、XMLデータテーブル34を参照することによって得ることができ、また他の機能からの同様の問い合わせに応えることができる。
1. XML Parsing Function When the XML parsing function 20 receives the XML to be buttoned as the input XML 32 as shown in FIG. 3A, the XML parsing function 20 analyzes the input XML 32 and develops the contents in the XML data table 34. As shown in FIG. 3B, in order for the XML parsing function 20 to respond to an inquiry about the contents of the input XML 32 from the external function 36, the XML data table 34 includes the interrelationships of all elements and attributes constituting the input XML 32. And information such as positional relationships are stored. The XML parsing function 20 stores information such as the number of child elements of an arbitrary element, a child element list of an arbitrary element, an attribute list belonging to an arbitrary element, an arbitrary attribute value belonging to an arbitrary element, a list of elements having an arbitrary name, and the like. It can be obtained by referring to the data table 34 and can respond to similar inquiries from other functions.

XMLパース機能20は、図3(b)に示すように、XMLデータテーブル34を参照することによって、入力XML32内の任意の要素や属性の値を変更したり、任意の要素や属性に新規の要素や属性を追加したりするといった編集能力を持ち、また、他の機能がこれらの能力を駆使して自由に既存のXMLを編集したり、新規のXMLを作成したりすることもできる。   As shown in FIG. 3B, the XML parsing function 20 changes the value of any element or attribute in the input XML 32 by referring to the XML data table 34, or adds a new value to any element or attribute. It has editing capabilities such as adding elements and attributes, and other functions can freely edit existing XML or create new XML using these capabilities.

以上の能力を有するのであれば、普及しているXMLパーサによってXMLパース機能20を代用することも可能である。本発明では、XMLボタン生成に用途を絞ってXMLデータテーブル34の構成(要素)を特定している点が、通常のXMLパーサとは異なる。   As long as it has the above capabilities, the XML parsing function 20 can be substituted by a popular XML parser. The present invention differs from a normal XML parser in that the configuration (element) of the XML data table 34 is specified by focusing on the use of XML buttons.

次に、XMLデータテーブルの実現方法について、図7〜図9を参照して説明する。XMLは、要素をノードとし、文書要素をルートとするツリー(木構造)と見なすことができる。また、属性は、要素を表すノードに依存するが、木構造から独立したノードと見なすことができる。   Next, a method for realizing the XML data table will be described with reference to FIGS. XML can be regarded as a tree (tree structure) having elements as nodes and document elements as roots. The attribute depends on the node representing the element, but can be regarded as a node independent of the tree structure.

例えば、表1に示す入力XML「営業成績.xml」は、図7に示すようなツリーで表現できる。ただし、図7では、文書要素を含めて上位3階層までの要素に絞って表示し、残りは省略している。図7に示す四角形がノードであり、要素ノードは、子要素ノードに実線で連結している。また要素が属性を持つ場合、破線で当該属性ノードに連結している。図7の最上部のノード「営業成績」は、「営業成績.xml」の文書要素を表す。「営業成績」要素は、「組織階層1」の1個の子要素を持ち、図7では、それぞれを表すノードに実線で連結することによりその関係が示されている。「組織階層1」要素は、「名前」属性を持つので、当該属性を表すノードに破線で連結することによりその関係が示されている。また、「名前」属性は“食品事業部”の値を持つことも図示してある。更に、「組織階層1」要素は、「名前」属性として“菓子販売部”の値を持つ「組織要素2」、「名前」属性として“健康食品販売部”の値を持つ「組織要素2」、及び「社員リスト」の3個の子要素に実線で連結している。   For example, the input XML “business results.xml” shown in Table 1 can be expressed by a tree as shown in FIG. However, in FIG. 7, only the elements up to the upper three layers including the document elements are displayed, and the rest are omitted. The rectangle shown in FIG. 7 is a node, and the element node is connected to the child element node by a solid line. When an element has an attribute, it is connected to the attribute node by a broken line. The top node “business results” in FIG. 7 represents the document element of “business results.xml”. The “business performance” element has one child element of “organization hierarchy 1”. In FIG. 7, the relationship is shown by connecting the nodes representing the respective elements with a solid line. Since the “organization hierarchy 1” element has a “name” attribute, the relationship is shown by connecting to a node representing the attribute with a broken line. It is also shown that the “name” attribute has a value of “food division”. Furthermore, the “organization hierarchy 1” element has “organization element 2” having a value of “confectionery sales department” as a “name” attribute and “organization element 2” having a value of “health food sales department” as a “name” attribute. , And three child elements of the “employee list” are connected by a solid line.

入力XMLをツリー構造で管理するためのデータ構造として、図8(a)に示すノード構造と、図8(b)に示すノードリスト構造が考えられる。ノード構造は、ツリーのノードを表すデータ構造で、図示の例では、(1)タイプ(要素か属性か)、(2)ノードの名称を表す文字列、(3)ノードの値を表す文字列、(4)子要素リストを表すノードリスト構造、(5)属性リストを表すノードリスト構造、及び(6)親要素を表すノード構造への参照の6つのエリアを持つ。ノードリスト構造は、複数のノードへの参照を表す可変長のデータ構造で、図示の例では、参照するノードの個数を表す整数と、ノードへの参照をノードの個数分持つ。   As a data structure for managing the input XML in a tree structure, a node structure shown in FIG. 8A and a node list structure shown in FIG. 8B can be considered. The node structure is a data structure representing a node of the tree. In the example shown in the figure, (1) type (element or attribute), (2) a character string representing the name of the node, and (3) a character string representing the value of the node. , (4) a node list structure representing a child element list, (5) a node list structure representing an attribute list, and (6) a reference to a node structure representing a parent element. The node list structure is a variable-length data structure that represents references to a plurality of nodes. In the illustrated example, the node list structure has an integer that represents the number of nodes to be referenced and references to the nodes as many as the number of nodes.

例えば、図7に示す「営業成績.xml」の文書要素「営業成績」を、図8(a)に示すノード構造で表すと、図9(a)に示すようになる。すなわち、文書要素は要素なので、タイプは「要素」となる。ノードの名称は、要素名称である「営業成績」となる。文字内容を持たないので、値は空となる。1個の子要素を表すノードリスト構造を持ち、0個の属性を表すノードリスト構造を持つ。ルートなので親要素ノード構造への参照は空となる。   For example, the document element “sales result” of “sales result.xml” shown in FIG. 7 is represented by the node structure shown in FIG. 8A, as shown in FIG. That is, since the document element is an element, the type is “element”. The name of the node is “business results” which is the element name. Since there is no character content, the value is empty. It has a node list structure that represents one child element, and has a node list structure that represents zero attributes. Since it is the root, the reference to the parent element node structure is empty.

文書要素の子要素を表すノードリスト構造は、図9(b)に示すように、文書要素の子要素が1個なので、個数は1となり、1個の子要素を表すノード構造への参照を持つ。唯一のノード構造への参照は、文書要素の唯一の子要素(「名前」属性が“食品事業部”の「組織階層1」要素)を表すノード(ノード1)を示す。属性の子要素を示すノードリスト構造は、図9(c)に示すように、個数が0となり、ノード構造への参照を持たない。   As shown in FIG. 9B, the node list structure representing the child elements of the document element has one child element of the document element, so the number is 1, and a reference to the node structure representing one child element is made. Have. The reference to the unique node structure indicates the node (node 1) representing the unique child element of the document element (the “organization hierarchy 1” element whose “name” attribute is “Food Division”). As shown in FIG. 9C, the node list structure indicating the child elements of the attribute has zero number and has no reference to the node structure.

文書要素の唯一の子要素を表すノード構造は、図9(d)に示すように、タイプが「要素」で、ノードの名称が「組織階層1」で、値が空で、3個の子要素を表すノードリスト構造を持ち、1個の属性を表すノードリスト構造を持つ。親要素は文書要素なので、当該要素を表すノード構造への参照を持つ。   As shown in FIG. 9D, the node structure representing the only child element of the document element has a type “element”, a node name “organization hierarchy 1”, an empty value, and three children. It has a node list structure that represents an element and a node list structure that represents one attribute. Since the parent element is a document element, it has a reference to the node structure representing the element.

XMLデータテーブルを、以上のようなノード構造とノードリスト構造の集合から構成されるデータとして実現すると、入力XMLに含まれるあらゆる情報を得ることができる。また、ノード構造とノードリスト構造の値を変更したり、前記構造を新たに生成したりすることによって、XMLの内容の変更や新規XMLの作成を行うことができる。   If the XML data table is realized as data composed of a set of the node structure and the node list structure as described above, all information included in the input XML can be obtained. Further, by changing the values of the node structure and the node list structure, or by newly generating the structure, it is possible to change the contents of XML or create a new XML.

2.構造管理機能
構造管理機能22は、XMLデータ構造定義テーブルの生成や更新を行う。XMLデータ構造定義テーブルは、入力XMLの構造及びXMLボタン化条件を記述したデータである。構造管理機能22は、入力XMLを読み込んでその構造を解析して、自動的にXMLデータ構造定義テーブルのスキーマ定義部を生成する。XMLデータ構造定義テーブルは、例えば、それ自体をXMLによって記述するようにしてもよい。この例の場合、入力XMLを読むのに加え、XMLデータ構造定義テーブルを生成するため、XMLパース機能20を必要とする。スキーマ定義部の自動生成方法については後述する。
2. Structure management function The structure management function 22 generates and updates an XML data structure definition table. The XML data structure definition table is data describing the structure of the input XML and the XML button conversion condition. The structure management function 22 reads the input XML, analyzes the structure, and automatically generates a schema definition part of the XML data structure definition table. For example, the XML data structure definition table may be described in XML. In this example, in addition to reading the input XML, an XML parsing function 20 is required to generate an XML data structure definition table. An automatic generation method of the schema definition unit will be described later.

以下、構造管理機能22が、入力XMLとして「営業成績.xml」を受け取った場合、自動生成するXMLデータ構造定義テーブルを、記憶装置にファイル「営業成績.xdst」として保存し、また、XMLデータ構造定義テーブルをXMLで記述した場合を例にとって説明する。表2は、XML構造定義テーブルの構成を示す。   Hereinafter, when the structure management function 22 receives “sales results.xml” as the input XML, the XML data structure definition table that is automatically generated is stored as a file “sales results.xdst” in the storage device, and the XML data A case where the structure definition table is described in XML will be described as an example. Table 2 shows the structure of the XML structure definition table.

Figure 0004593580
Figure 0004593580

表2に示すように、文書要素に「XMLデータ構造定義テーブル」がある。その子要素として、スキーマ定義に関する情報が子孫要素または属性に記述される「スキーマ定義部」と、ボタン情報に関する情報が子孫要素または属性に記述される「ボタン情報部」が配置される。「スキーマ定義部」要素、及び「ボタン情報部」要素についての詳細は後述する。   As shown in Table 2, the document element has an “XML data structure definition table”. As the child elements, a “schema definition part” in which information on the schema definition is described in the descendant element or attribute and a “button information part” in which the information on the button information is described in the descendant element or attribute are arranged. Details of the “schema definition part” element and the “button information part” element will be described later.

スキーマ定義部は、入力XMLの構造を定義するための、XMLのスキーマ言語としての役割を持つ。すなわち、入力XMLに現れる各要素がどのような要素を子に持つか、どのような値を取るか、どのような属性を持つか、前記属性はどのような値を取るか、といった情報がスキーマ定義部に記述される。XMLデータ用ボタンシステムは、スキーマ定義部に記述された構文に従ったXMLであれば、異なる入力XMLでも同一の構造を持つと判断する。   The schema definition unit has a role as an XML schema language for defining the structure of the input XML. That is, information such as what element each element appearing in the input XML has as a child, what value it takes, what attribute it has, and what value the attribute takes is schema Described in the definition part. The XML data button system determines that different input XMLs have the same structure as long as the XML conforms to the syntax described in the schema definition section.

構造管理機能22が、表1に示す入力XML「営業成績.xml」を基に、その構造を解析し、XMLのスキーマを自動生成していくプロセスを、図10〜図15を参照して段階的に説明する。   The process in which the structure management function 22 analyzes the structure and automatically generates the XML schema based on the input XML “business results.xml” shown in Table 1 with reference to FIGS. I will explain it.

構造管理機能22は、スキーマ自動生成の最初の段階として、要素構造の連続性の判断を行う。要素構造の連続性の判断とは、共通の親要素を持つ2個以上の要素(兄弟要素)同士が、互いに構造が同一かどうかを見極め、同一ならば、前記親要素の子としては当該構造の要素が任意個連続して現れる可能性があると判断することである。ここでは、2個以上の要素がそれぞれ同じ要素名称を持ち、同じ名称の属性を持ち、子孫要素を持つならば同じ順序で同じ名称の子孫要素とそれに属する属性を同じ名称で持つ場合、前記2個以上の要素を同一構造と見なす。構造が同一かどうかの判断は、XMLデータテーブルのツリー表現におけるリーフに近い要素から順に行う。   The structure management function 22 determines the continuity of element structures as the first stage of automatic schema generation. Judgment of continuity of element structure means that two or more elements (sibling elements) having a common parent element determine whether or not the structures are identical to each other. It is determined that there is a possibility that any number of elements may appear continuously. Here, if two or more elements have the same element name, have the same name attribute, and have descendant elements, if the same name has descendant elements and attributes belonging to them in the same order, the 2 More than one element is considered the same structure. Whether or not the structures are the same is determined in order from an element close to a leaf in the tree representation of the XML data table.

この例では、表1に示す入力XML「営業成績.xml」は、図3(a)に示すように、XMLパース機能20によって、XMLデータテーブル34に展開される。XMLデータテーブルのうち、「営業成績.xml」に現れる最初の「社員」要素の部分は、図10に示すように展開される。尚、以降の解説で参照しやすいように、図10では「社員/実績リスト/実績」要素には、XPathの述部を表す文字列(角括弧とその中身)を記述している。   In this example, the input XML “business results.xml” shown in Table 1 is expanded in the XML data table 34 by the XML parsing function 20 as shown in FIG. In the XML data table, the part of the first “employee” element appearing in “business results.xml” is expanded as shown in FIG. For ease of reference in the following explanation, in FIG. 10, a character string (square brackets and their contents) representing an XPath predicate is described in the “employee / result list / result” element.

図10において、「社員/実績リスト/実績[1]/期間」と「社員/実績リスト/実績[1]/金額」は、互いに兄弟要素だが、要素名称が異なるので、同じ構造ではない。「社員/実績リスト/実績[2]」の子要素2個も同様に同じ構造ではない。「社員/実績リスト/実績[3]」の子要素2個も同様に同じ構造ではない。「社員/実績リスト/実績[1]」、「社員/実績リスト/実績[2]」及び「社員/実績リスト/実績[3]」は、互いに兄弟要素であり、同じ要素名称「実績」を持ち、同じ名称の属性「地域」を持ち、同じ名称の子要素「期間」と「金額」を同じ順序で持つので、同じ構造である。よって、「社員/実績リスト」の子として、「実績」要素が任意個連続して現れる可能性があると判断される。「社員/名前」と「社員/社員番号」と「社員/実績リスト」は、互いに兄弟要素だが、要素名称が異なるので、同じ構造ではない。   In FIG. 10, “employee / result list / result [1] / period” and “employee / result list / result [1] / money” are sibling elements, but the element names are different, so they are not the same structure. Similarly, the two child elements of “employee / result list / result [2]” do not have the same structure. Similarly, the two child elements of “employee / result list / result [3]” do not have the same structure. “Employee / Achievement list / Achievement [1]”, “Employee / Achievement list / Achievement [2]” and “Employee / Achievement list / Achievement [3]” are sibling elements and have the same element name “Actual”. And have the same name attribute “region”, and have child elements “period” and “money” with the same name in the same order, and thus have the same structure. Therefore, it is determined that there may be an arbitrary number of “actual” elements continuously as children of the “employee / actual list”. “Employee / name”, “employee / employee number”, and “employee / result list” are sibling elements of each other, but the element names are different, so they do not have the same structure.

このように、「営業成績.xml」の全てに対して要素構造の連続性判断を行った結果を、図11に示す。図11は、スキーマを表し、この時点でのスキーマは、例えば次のような性質を持つ。文書要素「営業成績(/営業成績)」の子要素として「組織階層1(/営業成績/組織階層1)」が1個出現し、「営業成績」は他に子要素を持たない。「組織階層1」は「名前」属性を持ち、子要素として「組織階層2(/営業成績/組織階層1/組織階層2)」が任意個連続して現れる可能性がある。「組織階層2」要素は、「名前」属性を持つ。   FIG. 11 shows the result of determining the continuity of the element structure for all “business results.xml” in this way. FIG. 11 shows a schema, and the schema at this point has the following properties, for example. One “organization level 1 (/ business result / organization level 1)” appears as a child element of the document element “business result (/ business result)”, and “business result” has no other child element. “Organization hierarchy 1” has a “name” attribute, and “organization hierarchy 2 (/ business results / organization hierarchy 1 / organization hierarchy 2)” may appear continuously as child elements. The “organization hierarchy 2” element has a “name” attribute.

図11に示すスキーマは、一般的なツリー(木構造)に見立てることができるが、このツリーを要素構造ツリーと呼ぶ。要素構造ツリーでは、ツリーを構成する各要素をノードとし、属性はノードと見なさない。最も左上(先頭)のノードをルートとする。また、子ノードを持たないノードをリーフと呼ぶ。具体的には、図11において、ルートは「/営業成績」要素である。「//組織階層1/@名前」や「//組織階層2/実績/@地域」等は属性なので、要素構造ツリーにおいてノードではない。「//組織階層1/社員リスト/社員/名前」や「//組織階層2//期間」等はリーフである。
以降のスキーマ自動生成は、XMLデータテーブルのツリーではなく、要素構造ツリーを参照しながら行う。
The schema shown in FIG. 11 can be regarded as a general tree (tree structure), and this tree is called an element structure tree. In the element structure tree, each element constituting the tree is a node, and the attribute is not regarded as a node. The leftmost (first) node is the root. A node having no child node is called a leaf. Specifically, in FIG. 11, the route is the “/ business results” element. Since “// organization hierarchy 1 / @ name” and “// organization hierarchy 2 / actual record / @ region” are attributes, they are not nodes in the element structure tree. “// Organization hierarchy 1 / Employee list / Employee / Name”, “// Organization hierarchy 2 // Period”, etc. are leaves.
The subsequent automatic schema generation is performed with reference to the element structure tree, not the XML data table tree.

構造管理機能22は、スキーマ自動生成の第2段階として、異なる要素下に出現する要素間での構造同一性の判断を行う。異なる要素下に出現する要素間での構造同一性の判断とは、互いに兄弟ではない要素同士の構造が同一かどうかを見極め、同一ならば要素構造ツリーから同一な部分の冗長性を省いていくことである。ここでは、着目対象の2個以上の要素がそれぞれ同じ要素名称を持ち、同じ名称の属性を持ち、子要素を持つならば同じ順序で同じ名称の子孫要素とそれに属する属性を同じ名称で持つ場合、前記2個以上の要素を同一構造と見なす。構造が同一かどうかの判断は、図11に示す要素構造ツリーのツリー表現におけるリーフに近い要素から順に行い、リーフでかつ属性を持たない要素は判断対象から外す。   The structure management function 22 determines the structural identity between elements appearing under different elements as the second stage of automatic schema generation. Judgment of structural identity between elements that appear under different elements is to determine whether the structures of elements that are not siblings are the same. If they are the same, the redundancy of the same part is omitted from the element structure tree. That is. Here, if two or more elements of interest have the same element name, the same name attribute, and if they have child elements, they have the same name descendant elements and attributes belonging to them in the same order The two or more elements are regarded as the same structure. Whether or not the structures are the same is determined in order from the element closest to the leaf in the tree representation of the element structure tree shown in FIG. 11, and the element that is a leaf and has no attribute is excluded from the determination target.

例えば、図11に示す要素構造ツリーにおいて、「//組織階層1/社員リスト//期間」や「//組織階層2//社員/名前」等は、リーフでかつ属性を持たない要素なので、判断対象から外す。最初の判断対象要素は、「//組織階層1/社員リスト//実績」と「//組織階層2//実績」である。どちらも要素名称が「実績」で、いずれの「実績」要素も「期間」と「金額」という同じ名称の2個の子要素を持ち、いずれの「実績」要素も「地域」という同じ名称の属性を持つ。よって構造管理機能22は、「//組織階層1/社員リスト//実績」と「//組織階層2//実績」が互いに同一構造を持つと判断する。   For example, in the element structure tree shown in FIG. 11, “// organization hierarchy 1 / employee list // period”, “// organization hierarchy 2 // employee / name”, etc. are elements that are leaves and have no attributes. Remove from judgment. The first judgment target elements are “// organization hierarchy 1 / employee list // actual record” and “// organization hierarchy 2 // actual record”. Both have the element name “Actual”, each “Actual” element has two child elements with the same name “Period” and “Amount”, and each “Actual” element has the same name “Region” Has attributes. Therefore, the structure management function 22 determines that “// organization hierarchy 1 / employee list // actual record” and “// organization hierarchy 2 // actual record” have the same structure.

図12は、「//組織階層1/社員リスト//実績」と「//組織階層2//実績」において、「実績」要素以下の構造を同一と判断した結果を図示したものである。図12(a)において、両「実績」要素の部分が、枠が破線となって「実績:[構造1]」と表記されているが、これは、「[構造1]」という外部の構造を参照し、要素名が「実績」であるという意味である。どちらも同じく「実績:[構造1]」となっているので、同一構造かつ同一名称であることを示している。[構造1]は、図12(b)に示すように、「[構造1]」と表記された二重線四角形をルートノードとする別に設定したツリーによって、図12(a)に示す、ルートが文書要素「営業成績」の要素構造ツリーとは独立して保持される。このように、別に設定したツリーを要素構造サブツリーと呼ぶ。また、要素構造ツリーから要素構造サブツリーを取り出すことを正規化と呼ぶ。   FIG. 12 illustrates a result of determining that the structure below the “actual” element is the same in “// organization hierarchy 1 / employee list // actual” and “// organization hierarchy 2 // actual”. In FIG. 12A, both “actual results” element parts are indicated by “broken line: [structure 1]” with a broken line, which is an external structure “[structure 1]”. This means that the element name is “actual result”. Since both are “results: [structure 1]”, they indicate the same structure and the same name. As shown in FIG. 12 (b), [Structure 1] is a route shown in FIG. 12 (a) by a tree separately set with a double-line rectangle represented as “[Structure 1]” as a root node. Is maintained independently of the element structure tree of the document element “business results”. A tree set separately in this way is called an element structure sub-tree. Also, extracting an element structure subtree from the element structure tree is called normalization.

以下、図12(a)で示す「実績:[構造1]」のような要素構造サブツリーを参照するノードを、属性を持たないリーフ要素と見なして、異なる要素下に出現する要素間での構造同一性の判断を進めていく。従って、前記「実績:[構造1]」は、構造同一性の判断対象から除外されることになって、最もリーフに近いものに着目すると、「//組織階層1/社員リスト//実績リスト」と「//組織階層2//実績リスト」となる。これらは、要素名が「実績リスト」で同一名称であり、子要素として同一構造の「実績:[構造1]」を持ち、属性を持たない。よって構造管理機能22は、「//組織階層1/社員リスト//実績リスト」と「//組織階層2//実績リスト」が互いに同一構造を持つと判断する。   Hereinafter, a node that refers to an element structure subtree such as “actual result: [structure 1]” illustrated in FIG. 12A is regarded as a leaf element having no attribute, and a structure between elements that appear under different elements. We will proceed with the determination of identity. Therefore, the “actual result: [structure 1]” is excluded from the structural identity judgment target, and focusing on the one closest to the leaf, “// organization hierarchy 1 / employee list // actual result list” And “// organization hierarchy 2 // result list”. These elements have the same name in the “result list”, have the same structure “result: [structure 1]” as child elements, and have no attributes. Therefore, the structure management function 22 determines that “// organization hierarchy 1 / employee list // result list” and “// organization hierarchy 2 // result list” have the same structure.

図13は、「//組織階層1/社員リスト//実績リスト」と「//組織階層2//実績リスト」において、「実績リスト」要素以下の構造を同一と判断した結果を図示したものである。つまり、図13(a)に示す文書要素「営業成績」の要素構造ツリーは、図13(b)に示す、ルートノード[構造2]の要素構造サブツリーを参照し、ルートノード[構造2]の要素構造サブツリーは、図13(c)に示す、[構造1]の要素構造サブツリーを参照する。構造管理機能22は、図11〜図13で示す、異なる要素下に出現する要素間での構造同一性の判断に関する処理を、以降も同一構造が発見できなくなるまで続ける。最終的に、構造管理機能22は、入力XML「営業成績.xml」のデータ構造を、前記同一構造を要素構造サブツリーとその参照に置き換えながら、図14に示す状態まで正規化する。   FIG. 13 shows the result of judging that the structure below the “actual list” element is the same in “// organization hierarchy 1 / employee list // actual list” and “// organization hierarchy 2 // actual list”. It is. That is, the element structure tree of the document element “business results” shown in FIG. 13A refers to the element structure subtree of the root node [structure 2] shown in FIG. The element structure subtree refers to the element structure subtree of [Structure 1] shown in FIG. The structure management function 22 continues the process shown in FIGS. 11 to 13 regarding the determination of structural identity between elements appearing under different elements until the same structure cannot be found. Finally, the structure management function 22 normalizes the data structure of the input XML “business results.xml” to the state shown in FIG. 14 while replacing the same structure with the element structure subtree and its reference.

正規化の最後の過程として、要素構造ツリーのノードのうち、属性を持つもの、またはリーフでないものに着目し、リーフに近いものから順に全て要素構造サブツリー参照に変換する。更に、構造管理機能22は、要素構造ツリーのルートノード(文書要素)も要素構造サブツリー参照に変換し、XMLのスキーマ自動生成のプロセスを完了する。   As a final process of normalization, attention is paid to elements having attributes or non-leaf among the nodes of the element structure tree, and all of the nodes in the order from the leaf are converted into element structure subtree references. Further, the structure management function 22 converts the root node (document element) of the element structure tree into an element structure subtree reference, and completes the process of automatically generating the XML schema.

具体的には、図14では、同一構造を要素構造サブツリー参照に置き換える処理が完了した状態を示しており、ここでは、図14(a)に示す、「組織階層2」と「組織階層1」がこの順で正規化の最後の着目対象の要素となる。つまり、これらの要素は、図14(b)に示す、ルートノード[構造4]の要素構造サブツリーを参照し、ルートノード[構造4]の要素構造サブツリーは、図14(c)に示す、[構造3]の要素構造サブツリーを参照する。ルートノード[構造3]の要素構造サブツリーは、図14(d)に示す、[構造2]の要素構造サブツリーを参照し、ルートノード[構造2]の要素構造サブツリーは、図14(e)に示す、[構造1]の要素構造サブツリーを参照する。   Specifically, FIG. 14 shows a state in which the process of replacing the same structure with the element structure subtree reference is completed. Here, “organization hierarchy 2” and “organization hierarchy 1” shown in FIG. Are the last target elements of normalization in this order. That is, these elements refer to the element structure subtree of the root node [structure 4] shown in FIG. 14B, and the element structure subtree of the root node [structure 4] is shown in FIG. Reference is made to the element structure subtree of structure 3]. The element structure subtree of the root node [structure 3] refers to the element structure subtree of [structure 2] shown in FIG. 14 (d), and the element structure subtree of the root node [structure 2] is shown in FIG. 14 (e). Reference is made to the element structure subtree of [Structure 1] shown.

更に、要素構造ツリーのルートノードである「営業成績」も要素構造サブツリー参照とすると、図15に示すようになり、これでXMLのスキーマ定義部を自動生成するための一連の処理が完了する。つまり、図15(a)に示す「営業成績」は、図15(a)〜図15(h)に示す、合計7個の要素構造サブツリー参照に順次変換される。   Furthermore, if the “business results”, which is the root node of the element structure tree, is also referred to as the element structure subtree, the result is as shown in FIG. 15, and this completes a series of processes for automatically generating an XML schema definition section. That is, the “business results” shown in FIG. 15A are sequentially converted into a total of seven element structure subtree references shown in FIGS. 15A to 15H.

表3は、データ構造の正規化を完了した図15に示す状態から自動生成したXMLデータ構造定義テーブルのスキーマ定義部の例(XML形式で保存したもの)を示す。尚、この実施の形態では、スキーマ定義部をXML Schema 1.0に似た文法で表現し、XML Schema 1.0の文法と異なる部分については、その都度説明する。   Table 3 shows an example of the schema definition part (stored in the XML format) of the XML data structure definition table automatically generated from the state shown in FIG. 15 where the normalization of the data structure has been completed. In this embodiment, the schema definition part is expressed by a grammar similar to XML Schema 1.0, and parts different from the grammar of XML Schema 1.0 will be described each time.

Figure 0004593580
Figure 0004593580

表3に示す「スキーマ定義部」要素の下では、「element」、「complexType」、「sequence」及び「attribute」の要素が現れているが、これらの4種類の要素は、それらの属性も含め、XML Schema 1.0のものと同じ構造と意味を持つ。ただし、「element」、「complexType」及び「attribute」の要素の属性として現れる「id」は、本発明独自のものである。前記「id」属性は、XMLデータ構造定義テーブルのボタン情報部からスキーマ定義部の内容を参照する際に使われ、その値はスキーマ定義部中でユニークである。具体的には、入力XML「営業成績.xml」から自動生成したXMLデータ構造定義テーブルの「スキーマ定義部」要素の子で最初に現れているのが「element」要素であるが、これは、図15(a)における要素構造ツリーに対応する。   Under the “Schema definition part” element shown in Table 3, “element”, “complexType”, “sequence” and “attribute” elements appear. These four types of elements include their attributes. , Has the same structure and meaning as that of XML Schema 1.0. However, “id” appearing as an element attribute of “element”, “complexType”, and “attribute” is unique to the present invention. The “id” attribute is used when referring to the contents of the schema definition part from the button information part of the XML data structure definition table, and its value is unique in the schema definition part. Specifically, the “element” element appears first in the child of the “schema definition part” element of the XML data structure definition table automatically generated from the input XML “business results.xml”. This corresponds to the element structure tree in FIG.

また、「スキーマ定義部」要素の子として現れている要素は、前記「element」以外の全てが「complexType」であるが、これらは、図15(b)〜図15(h)に示す7個の要素構造サブツリーにそれぞれ対応する。7個の要素構造サブツリーのうち、図15(b)に示すルートノード「[構造7]」の要素構造サブツリーは、「スキーマ定義部」の子要素で「name="構造7"」という属性を持つ「complexType」に対応する。他の要素構造サブツリーと「スキーマ定義部」の子要素である「complexType」との対応関係も同様である。   Further, the elements appearing as children of the “schema definition part” element are all “complexType” except the “element”, but these are the seven elements shown in FIGS. 15B to 15H. Corresponds to each element structure subtree of. Among the seven element structure subtrees, the element structure subtree of the root node “[structure 7]” shown in FIG. 15B is a child element of “schema definition section” and has an attribute “name =“ structure 7 ””. Corresponds to "complexType". The correspondence relationship between other element structure subtrees and “complexType” which is a child element of “schema definition part” is the same.

「complexType」要素は、「name」属性で示される構造の定義を行う。「element」要素は、「name」属性で示される名称の要素が「type」属性で示される構造で現れることを指定する。「type」属性の値には、「complexType」要素の「name」属性を指定することにより、当該「complexType」の構造を参照することができる。更に、「type」属性の値には、XML Schema 1.0に組み込みの単純型(“string”(文字列)や“decimal”(数)等)を指定することができる。「complexType」要素は、子として「sequence」要素を持つ。更にその子として「element」要素を持つが、これは前述の「element」と同じである。すなわち、当該「complexType」を表す構造の子として、「name」属性で示される名称の要素が「type」属性で示される構造で現れることを指定する。「sequence」は、現れる要素の順序を制限するために指定する。「complexType」は、子として「attribute」要素を更に持つことがあるが、これは、当該「complexType」が「name」属性で示される名称の属性が「type」属性で示される構造で現れることを表す。「type」属性の値には、XML Schema 1.0に組み込みの単純型を指定することができる。   The “complexType” element defines the structure indicated by the “name” attribute. The “element” element specifies that the element having the name indicated by the “name” attribute appears in the structure indicated by the “type” attribute. By specifying the “name” attribute of the “complexType” element as the value of the “type” attribute, the structure of the “complexType” can be referred to. Furthermore, a simple type (“string” (character string), “decimal” (number), etc.) built in XML Schema 1.0 can be specified as the value of the “type” attribute. The “complexType” element has a “sequence” element as a child. Furthermore, it has an “element” element as its child, which is the same as the “element” described above. That is, it is specified that the element having the name indicated by the “name” attribute appears in the structure indicated by the “type” attribute as a child of the structure indicating the “complexType”. “Sequence” is specified to limit the order of appearing elements. “ComplexType” may further have an “attribute” element as a child, which means that the name attribute indicated by the “name” attribute appears in the structure indicated by the “type” attribute. To express. A simple type built in XML Schema 1.0 can be specified as the value of the “type” attribute.

具体的には、「id」属性に“ct1”を持つ「complexType」要素とその属性は、「“構造7”の構造をここで定義する」ということを表している。「id」属性に“el1”を持つ「element」要素とその属性は、「“構造7”の構造を持つ“営業成績”という名称の要素が現れる」ということを表していて、ここでの“構造7”は、前記「complexType」の構造を参照することを示す。これは、図15(a)において、要素構造ツリーのルートノード「営業成績:[構造7]」が、要素構造サブツリー「[構造7]」を参照していることに対応する。また、前記「complexType」の子孫として現れる「sequence」要素と「element」要素とその属性は、「当該complexType(“構造7”)には、“構造6”を持つ“組織階層1”という名称の要素が現れる」ということを表す。これは、図15(b)において、ルートノードとして「[構造7]」を持つ要素構造サブツリーの子ノード「組織階層1:[構造6]」が、別の要素構造サブツリー「[構造6]」を参照していることに対応する。更に、「id」属性に“ct7”を持つ「complexType」は、「当該complexType(“構造1”)には、string(文字列)値を持つ“期間”という名前の要素とdecimal(数)値を持つ“金額”という名前の要素が、この順序で現れ、更に当該complexTypeには、string値を持つ“地域”という名前の属性が付加される」ということを表す。   Specifically, the “complexType” element having “ct1” in the “id” attribute and the attribute thereof indicate that “the structure of“ structure 7 ”is defined here”. The “element” element with “el1” in the “id” attribute and its attribute indicate that “the element named“ business performance ”having the structure of“ structure 7 ”appears”. A structure 7 ″ indicates that the structure of the “complexType” is referred to. This corresponds to the fact that the root node “Sales Results: [Structure 7]” of the element structure tree refers to the element structure subtree “[Structure 7]” in FIG. The “sequence” element and “element” element appearing as descendants of the “complexType” and their attributes are “name of“ organization hierarchy 1 ”having“ structure 6 ”in the complexType (“ structure 7 ”). The element appears ". In FIG. 15B, the child node “organization hierarchy 1: [structure 6]” of the element structure sub-tree having “[structure 7]” as the root node in another element structure sub-tree “[structure 6]”. Corresponds to the reference. Furthermore, “complexType” having “ct7” in the “id” attribute means that “the complexType (“ structure 1 ”) has an element named“ period ”having a string (string) value and a decimal (number) value. An element named “Amount” having “appears” appears in this order, and an attribute named “Region” having a string value is added to the complexType ”.

スキーマ定義部に現れる「element」要素のうち、「id」属性に“el3”を持つもののように、「minOccurs」属性と「maxOccurs」属性を持つものがある。それぞれ、入力XMLにおいて、当該「element」が定義する要素の出現数の下限と上限を指定するものである。値に数を指定するとその数を下限また上限の値として指定する。「maxOccurs」の値に“unbounded”を指定すると、出現数上限を指定しない。すなわち、「minOccurs="0" maxOccurs="unbounded"」の属性を持つ「element」は、「任意回数出現する」ことを表す。   Among the “element” elements appearing in the schema definition section, there are those having “minOccurs” attribute and “maxOccurs” attribute, such as those having “el3” in the “id” attribute. In the input XML, the lower limit and the upper limit of the number of occurrences of the element defined by the “element” are designated. If a number is specified for the value, that number is specified as the lower or upper limit value. If “unbounded” is specified as the value of “maxOccurs”, the upper limit of the number of appearances is not specified. That is, “element” having the attribute “minOccurs =“ 0 ”maxOccurs =“ unbounded ”” represents “appears an arbitrary number of times”.

構造管理機能22によるスキーマ定義部の自動生成が完了すると、アプリケーションは、生成されたスキーマの構造を表示装置に表示する。ユーザは、表示されたスキーマの構造を見ながら、必要に応じて自動生成されたスキーマに調整を加えることができる。ここでいう調整とは、任意の要素や属性に対する、省略可能性の指定、出現数の上限及び下限の指定、及び出現順の指定等であり、ユーザは、スキーマを調整することによって、より柔軟なスキーマを定義することができる。構造管理機能22は、アプリケーションを介してユーザからのスキーマ調整要求を受けると、XMLデータ構造定義テーブルのスキーマ定義部に適用する。前記の調整事項について、上限及び下限は、スキーマ定義部における前述の「element」要素の「minOccurs」属性及び「maxOccurs」属性によって表現可能である。また、省略可能性や出現順の指定もXML
Schema 1.0の書式によって表現できる。
When the automatic generation of the schema definition unit by the structure management function 22 is completed, the application displays the structure of the generated schema on the display device. The user can make adjustments to the automatically generated schema as necessary while viewing the structure of the displayed schema. Adjustment here refers to the specification of omissibility, the upper and lower limits of the number of appearances, the order of appearance, etc. for any element or attribute. The user can adjust the schema more flexibly. You can define a simple schema. When the structure management function 22 receives a schema adjustment request from a user via an application, the structure management function 22 applies it to the schema definition section of the XML data structure definition table. Regarding the adjustment items, the upper limit and the lower limit can be expressed by the “minOccurs” attribute and the “maxOccurs” attribute of the “element” element in the schema definition section. In addition, specification of omission possibility and appearance order is also XML
Can be expressed in Schema 1.0 format.

構造管理機能22が自動生成したスキーマ定義部では、図15(a)に依れば、[構造7]の子要素は、1個の組織階層1:[構造6]である。ここで、ユーザは、表示装置を見て、[構造7]の子要素として「組織階層1」要素を任意数個許容するようにアプリケーションを介して構造管理機能22に指示したとする。また、構造管理機能22が自動生成したスキーマ定義部では、XML表現でid属性値に「el8」を持つ「社員番号」要素の型として、数値を表す「decimal」が指定されている。ここで、ユーザは、表示装置を見て、「社員番号」要素の型を文字列に変更するようにアプリケーションを介して構造管理機能22に指示したとする。すると、構造管理機能22は、スキーマ定義部のXML表現における当該「complexType」要素2個を表4のように更新し、アプリケーションは表示装置の内容を最新に更新する。   In the schema definition part automatically generated by the structure management function 22, according to FIG. 15A, the child elements of [Structure 7] are one organizational hierarchy 1: [Structure 6]. Here, it is assumed that the user looks at the display device and instructs the structure management function 22 through the application to allow an arbitrary number of “organization hierarchy 1” elements as child elements of [structure 7]. In the schema definition part automatically generated by the structure management function 22, “decimal” representing a numerical value is designated as the type of the “employee number” element having “el8” as the id attribute value in XML expression. Here, it is assumed that the user looks at the display device and instructs the structure management function 22 via the application to change the type of the “employee number” element to a character string. Then, the structure management function 22 updates the two “complexType” elements in the XML expression of the schema definition section as shown in Table 4, and the application updates the contents of the display device to the latest.

Figure 0004593580
Figure 0004593580

以上で、XMLデータ構造定義テーブルのスキーマ定義部の自動生成及びユーザによる調整が完了する。
表2に示すXML構造定義テーブルのボタン情報部は、入力XMLのXMLボタン化条件を保持する。ボタン化条件には、「データ単位」、「除外インスタンス」及び「抽出対象」があり、アプリケーションを介してユーザに指定させる。ボタン化条件のうち、データ単位と抽出対象はスキーマ定義の内容から、除外インスタンスは入力XMLの内容から指定される。以下、「データ単位」、「除外インスタンス」及び「抽出対象」について説明する。
Thus, automatic generation of the schema definition part of the XML data structure definition table and adjustment by the user are completed.
The button information part of the XML structure definition table shown in Table 2 holds the XML button conversion condition of the input XML. Buttoning conditions include “data unit”, “excluded instance”, and “extraction target”, which are specified by the user via the application. Among the buttoning conditions, the data unit and the extraction target are specified from the contents of the schema definition, and the excluded instance is specified from the contents of the input XML. Hereinafter, “data unit”, “excluded instance”, and “extraction target” will be described.

2.1 データ単位
後述するボタン生成用ソースデータ生成機能24は、入力XMLを特定の構造を持つデータの集合と見なして処理を行うが、データ単位は、この特定の構造を示す。データ単位となることができるのは、スキーマ定義部における「complexType」または「element」である。入力XMLにおいて、データ単位に対応する実際の要素を、「対象インスタンス」と呼ぶ。例えば、入力XML「営業成績.xml」から生成したスキーマ定義部において、「id」属性に“ct3”を持つ構造をデータ単位として指定すると、前記入力XMLの対象インスタンスは、「//組織階層2[@名前='菓子販売部']」と「//組織階層2[@名前='健康食品販売部']」の2個の要素である。
2.1 Data Unit The button generation source data generation function 24, which will be described later, performs processing by regarding the input XML as a set of data having a specific structure, and the data unit indicates this specific structure. A data unit can be “complexType” or “element” in the schema definition section. In the input XML, an actual element corresponding to a data unit is referred to as a “target instance”. For example, when a structure having “ct3” in the “id” attribute is specified as a data unit in the schema definition part generated from the input XML “business results.xml”, the target instance of the input XML is “// organization hierarchy 2 [@ Name = 'confectionery sales department'] "and" // organization hierarchy 2 [@ name = 'health food sales department'] ".

以下、入力XML「営業成績.xml」から生成したスキーマ定義部のXML表現において、「id」属性に“ct5”を持つ構造が、ユーザによってデータ単位として指定されたものとして説明する。すると、対象インスタンスは、「//社員[名前='中村 里沙']」と「//社員[名前='山本 弘']」と「//社員[名前='中田 隆史']」と「//社員[名前='高橋 雅人']」と「//社員[名前='横山 美雪']」の5個の要素である。
データ単位は、XMLボタン化条件の中で最も基本的なものであり、後述するように他のXMLボタン化条件に深く関わるので、他のXMLボタン化条件より先に指定される必要がある。
In the following description, it is assumed that a structure having “ct5” in the “id” attribute is specified as a data unit by the user in the XML expression of the schema definition unit generated from the input XML “business results.xml”. Then, the target instances are “// employee [name = 'Risa Nakamura']”, “// employee [name = 'Hiroshi Yamamoto']”, “// employee [name = 'Takashi Nakata']” and “/ / Employees [name = 'Masato Takahashi'] "and" // Employees [name = 'Miyuki Yokoyama'] ".
The data unit is the most basic of the XML button conversion conditions, and is deeply related to other XML button conversion conditions as described later, and therefore needs to be specified before the other XML button conversion conditions.

2.2 除外インスタンス
データ単位として指定した構造に該当する対象インスタンスは、この段階で入力XMLに現れるもの全てである。しかし、一部の対象インスタンスを、XMLボタンによる分析対象から除外したいニーズも考えられる。このような場合に、除外インスタンスを指定することによって対応する。除外インスタンスは、入力XMLに対するXPathで指定し、前記XPathに該当する要素は、対象インスタンスから除かれる。
2.2 Target instances corresponding to the structure specified as an excluded instance data unit are all those appearing in the input XML at this stage. However, there may be a need to exclude some target instances from the analysis target by the XML button. Such a case is dealt with by specifying an excluded instance. The excluded instance is specified by the XPath for the input XML, and the element corresponding to the XPath is excluded from the target instance.

例えば、前述の例では、「id」の値に“ct5”を持つ構造をユーザがデータ単位と指定することにより、「営業成績.xml」に出現する全「社員」要素が対象インスタンスとなる。しかし、食品事業部直属の社員のデータは対象インスタンスとしたくないとする。そのような場合、除外インスタンスをXPath「//組織階層1/社員リスト/社員」として指定する。前記XPathに該当する要素は、「//社員[名前='高橋 雅人']」と「//社員[名前='横山 美雪']」の2個であり、これらはボタン生成用ソースデータテーブル生成時に対象インスタンスから除かれる。   For example, in the above-described example, when the user designates a structure having “ct5” as the value of “id” as a data unit, all “employee” elements appearing in “business results.xml” become target instances. However, suppose that you do not want the data of employees directly reporting to the Food Division to be the target instance. In such a case, the excluded instance is designated as XPath “// organization hierarchy 1 / employee list / employee”. The elements corresponding to the XPath are “// employee [name = 'Masato Takahashi']” and “// employee [name = 'Miyuki Yokoyama']”, these are the source data table generation for button generation Sometimes removed from the target instance.

2.3 抽出対象
入力XMLに含まれる情報のうち、どれをボタン生成用ソースデータテーブルに出力するかを指定するものが抽出対象である。抽出対象のうち、ボタン生成用ソースデータテーブルに出力すると同時にXMLボタン化したいものを「ボタン化対象」と呼び、ボタン生成用ソースデータテーブルに出力するだけでXMLボタン化したくないものを「参照対象」と呼ぶ。抽出対象は、スキーマ定義部で定義されている要素または属性で指定する。
2.3 Extraction Target Input Information that specifies which information to be output to the button generation source data table is included in the XML. Of the extraction targets, those that are output to the button generation source data table and simultaneously converted to XML buttons are called “button generation targets”, and those that are output to the button generation source data table and are not to be converted to XML buttons are referred to as “reference targets”. " The extraction target is specified by an element or attribute defined in the schema definition section.

抽出対象として、データ単位の祖先要素とその属性、子孫要素とその属性、及びデータ単位自身の要素とその属性のいずれかを指定することができる。ただし、要素はそれ自身が値を持つものでなければ抽出対象として指定できない。   As an extraction target, any one of an ancestor element of the data unit and its attribute, a descendant element and its attribute, and an element of the data unit itself and its attribute can be designated. However, an element cannot be specified as an extraction target unless it itself has a value.

例えば、“ct5”をデータ単位とした場合、データ単位は、図15(f)に示す[構造3]に対応する。[構造3]の子孫要素のうち、値を持つ、[構造3]の子要素の「名前」と「社員番号」、及び[構造1]の子要素の「期間」と「金額」が抽出対象となることができる。[構造3]の祖先要素には、値を持つものがないので、祖先要素は抽出対象になることができない。また、[構造3]の祖先要素の属性または子孫要素の属性である、[構造6]の「名前」、[構造5]の「名前」、及び[構造1]の「地域」が抽出対象となることができる。   For example, when “ct5” is a data unit, the data unit corresponds to [Structure 3] illustrated in FIG. Of the descendant elements of [Structure 3], the “Name” and “Employee number” of the [Structure 3] child element and the “Period” and “Price” of the [Structure 1] child elements that have values Can be. Since none of the ancestor elements of [Structure 3] has a value, the ancestor element cannot be an extraction target. Also, the attribute of [Structure 3] ancestor element or descendant element, “Structure 6” “name”, “Structure 5” “Name”, and “Structure 1” “Region” are extracted. Can be.

抽出対象1個は、ボタン生成用ソースデータテーブルのフィールド1個に対応する。ボタン生成用ソースデータテーブルに出力する際のフィールド名称も同時に指定できる。抽出対象をどのようにボタン生成用ソースデータテーブルに出力するかは、ボタン生成用ソースデータ生成機能で説明する。   One extraction object corresponds to one field of the button generation source data table. You can also specify the field name when outputting to the button generation source data table. How to output the extraction target to the button generation source data table will be described in the button generation source data generation function.

ユーザは、ここでアプリケーションを介して、例えば、「営業成績.xml」から生成されたスキーマ定義部のXML表現における「id」属性の値として“at2”、“el7”、“at3”、及び“el11”を持つ要素及び属性をボタン化対象とし、同じく「id」属性の値として“el12”を持つ要素を参照対象として指定したとする。同時に、指定したそれぞれの抽出対象のボタン生成用ソースデータテーブルのフィールド名として「所属」、「社員名」、「地域」、「実績月」、及び「金額」を指定したとする。   The user uses the application, for example, “at2”, “el7”, “at3”, and “at3” as values of the “id” attribute in the XML expression of the schema definition part generated from “business results.xml”. Assume that an element and an attribute having “el11” are designated as buttons, and an element having “el12” as the value of the “id” attribute is designated as a reference subject. At the same time, it is assumed that “affiliation”, “employee name”, “region”, “actual month”, and “money amount” are designated as field names of the respective button generation source data tables to be extracted.

XMLボタン化条件を、アプリケーションを介してユーザに指定させると、構造管理機能22は、このXMLボタン化条件をXMLデータ構造定義テーブルのボタン情報部に保存する。表5は、入力XML「営業成績.xml」のデータに対して指定したXMLデータ構造定義テーブルのボタン情報部の例(XML形式で保存したもの)である。   When the user designates the XML button conversion condition via the application, the structure management function 22 saves the XML button conversion condition in the button information part of the XML data structure definition table. Table 5 shows an example (stored in XML format) of the button information portion of the XML data structure definition table designated for the data of the input XML “business results.xml”.

Figure 0004593580
Figure 0004593580

表5に示す「ボタン情報部」要素の子として、まず「データ単位」要素が現れる。この要素の属性「id」にスキーマ定義部の「element」及び「complexType」の各要素が持つ「id」属性の値を指定することにより、当該構造をデータ単位とすることを定義する。ここでは、“ct5” を指定しているので、図15(f)に示す[構造3]をデータ単位として定義したことになる。   As a child of the “button information part” element shown in Table 5, a “data unit” element first appears. By specifying the value of the “id” attribute of each element of the “element” and “complexType” in the schema definition section in the attribute “id” of this element, it is defined that the structure is a data unit. Since “ct5” is designated here, [Structure 3] shown in FIG. 15F is defined as a data unit.

「データ単位」要素は、子要素「除外インスタンスリスト」を持ち、これは除外インスタンス条件の指定を複数まとめる役割を果たす。この要素の子として、除外インスタンスの定義を表す「除外インスタンス」要素が0個以上配置される。除外インスタンス条件は、「除外インスタンス」要素が持つ「Xpath」属性に指定する。この例では、除外インスタンス条件として“//組織階層1/社員リスト/社員”を指定している。   The “data unit” element has a child element “exclusion instance list”, which plays a role of collecting a plurality of designation of exclusion instance conditions. As children of this element, zero or more “exclusion instance” elements representing the definition of the exclusion instance are arranged. The excluded instance condition is specified in the “Xpath” attribute of the “excluded instance” element. In this example, “// organization hierarchy 1 / employee list / employee” is specified as the excluded instance condition.

「ボタン情報部」要素の子として、「データ単位」の次に「抽出対象リスト」要素が現れるが、これは抽出対象の指定を複数まとめる役割を果たす。この要素の子として、抽出対象の定義を表す「抽出対象」要素が1個以上配置される。「抽出対象」要素は、この例では、「type」、「id」及び「fieldName」の3個の属性を持つ。「type」属性には、当該抽出対象がボタン化対象か参照対象かを指定する。ボタン化対象の場合は“ボタン”を、参照対象の場合は“参照”を指定する。「id」属性には、スキーマ定義部のXML表現で現れる構造のうち、当該抽出対象を表す要素または属性を指定するが、その際、スキーマ定義部のXML表現において対応する要素または属性の「id」属性によって行う。「fieldName」属性には、当該抽出対象をボタン生成用ソースデータテーブルに出力する際のフィールド名を指定する。ここでは、1個目の「抽出対象」要素で「type」属性が“ボタン”、「id」属性が“at2”、「fieldName」属性が“所属”となっているので、ボタン化対象として、図15(d)に示す「構造5」の「名前」属性が選択され、ボタン生成用ソースデータテーブルに出力する際のフィールド名として「所属」であることが指定されたことになる。他の「抽出対象」要素についても同様であり、ボタン化対象として4個、参照対象として1個の抽出対象が定義されている。   As a child of the “button information part” element, an “extraction target list” element appears after the “data unit”, and this plays a role of collecting a plurality of extraction target designations. As a child of this element, one or more “extraction target” elements representing the definition of the extraction target are arranged. In this example, the “extraction target” element has three attributes “type”, “id”, and “fieldName”. The “type” attribute specifies whether the extraction target is a buttonization target or a reference target. Specify “button” for buttonization, and “reference” for reference. In the “id” attribute, an element or attribute representing the extraction target is specified in the structure appearing in the XML expression of the schema definition part. At this time, the “id” of the corresponding element or attribute in the XML expression of the schema definition part is specified. ”Attribute. In the “fieldName” attribute, a field name when the extraction target is output to the button generation source data table is designated. In this case, in the first “extraction target” element, the “type” attribute is “button”, the “id” attribute is “at2”, and the “fieldName” attribute is “affiliation”. The “name” attribute of “structure 5” shown in FIG. 15D is selected, and “affiliation” is designated as the field name when output to the button generation source data table. The same applies to the other “extraction target” elements, and four extraction targets are defined as button targets and one reference target.

以上のように、ユーザはアプリケーションを介して構造管理機能22によって、XMLデータ構造定義テーブルの生成を行うことができる。   As described above, the user can generate the XML data structure definition table by the structure management function 22 through the application.

3.ボタン生成用ソースデータ生成機能
図6に示すように、ボタン生成用ソースデータ生成機能24は、入力XML32とそれに対応するXMLデータ構造定義テーブル40を受け取ると、ボタン生成用ソースデータテーブルの生成を開始する。以下、ユーザによって、アプリケーション30を介し、入力XML32として「営業成績.xml」が、それに対応するXMLデータ構造定義テーブル40として「営業成績.xdst」が渡されたとする。ボタン生成用ソースデータ生成機能24は、XMLデータ構造定義テーブルのボタン情報部で定義されているデータ単位に該当する要素を、XMLパース機能20を使って入力XMLから全て取り出し、前記要素を対象インスタンス候補とする。
3. As shown in FIG. 6, the button generation source data generation function 24 receives the input XML 32 and the corresponding XML data structure definition table 40, and starts generating the button generation source data table. To do. Hereinafter, it is assumed that “sales results.xml” is passed as the input XML 32 and “sales results.xdst” is passed as the corresponding XML data structure definition table 40 by the user via the application 30. The button generation source data generation function 24 extracts all the elements corresponding to the data unit defined in the button information part of the XML data structure definition table from the input XML using the XML parsing function 20, and extracts the elements as target instances. Candidate.

この例において、「営業成績.xdst」のボタン情報部では、表5に示すように、“ct5”、すなわち図15(f)に示す[構造3]
をデータ単位として指定しているので、「営業成績.xml」で前記指定された構造を持つ、以下のXPathで示される要素を取り出す。
//組織階層2/社員リスト/社員[名前='中村 里沙']
//組織階層2/社員リスト/社員[名前='山本 弘']
//組織階層2/社員リスト/社員[名前='中田 隆史']
//組織階層1/社員リスト/社員[名前='高橋 雅人']
//組織階層1/社員リスト/社員[名前='横山 美雪']
これら5個の要素がデータ単位の対象インスタンス候補となる。
In this example, in the button information part of “business results.xdst”, as shown in Table 5, “ct5”, that is, [Structure 3] shown in FIG.
Is specified as a data unit, and the element indicated by the following XPath having the specified structure in “business results.xml” is extracted.
// Organization level 2 / Employee list / Employee [Name = 'Risa Nakamura']
// Organization level 2 / Employee list / Employee [Name = 'Hiroshi Yamamoto']
// Organization level 2 / Employee list / Employee [Name = 'Takashi Nakata']
// Organization level 1 / Employee list / Employee [Name = 'Masato Takahashi']
// Organization level 1 / Employee list / Employee [Name = 'Miyuki Yokoyama']
These five elements are the target instance candidates for the data unit.

次にボタン生成用ソースデータ生成機能24は、ボタン情報部の除外インスタンスで指定されたものを対象インスタンス候補から除き、残ったものを対象インスタンスとして決定する。この例では、「営業成績.xdst」の「除外インスタンスリスト」の子である「除外インスタンス」要素における「Xpath」属性値“//組織階層1/社員リスト/社員”に当てはまる要素を、「営業成績.xml」から取り出された5個の対象インスタンス候補から除く。5個の対象インスタンス候補のうち、除外インスタンス条件であるXPathに当てはまるのは、以下の要素である。
//組織階層1/社員リスト/社員[名前='高橋 雅人']
//組織階層1/社員リスト/社員[名前='横山 美雪']
Next, the button generation source data generation function 24 removes those specified by the excluded instances in the button information section from the target instance candidates and determines the remaining ones as target instances. In this example, the element that corresponds to the “Xpath” attribute value “// Organization hierarchy 1 / Employee list / Employee” in the “Excluded instance” element that is a child of “Excluded instance list” of “Sales results.xdst” It is removed from the five candidate instance candidates extracted from “Grades.xml”. Among the five target instance candidates, the following elements apply to XPath, which is an excluded instance condition.
// Organization level 1 / Employee list / Employee [Name = 'Masato Takahashi']
// Organization level 1 / Employee list / Employee [Name = 'Miyuki Yokoyama']

これら2個の要素がデータ単位の対象インスタンス候補から除かれ、最終的に以下の3個の要素が対象インスタンスとなる。
//組織階層2/社員リスト/社員[名前='中村 里沙']
//組織階層2/社員リスト/社員[名前='山本 弘']
//組織階層2/社員リスト/社員[名前='中田 隆史']
These two elements are excluded from the target instance candidates in the data unit, and finally the following three elements become target instances.
// Organization level 2 / Employee list / Employee [Name = 'Risa Nakamura']
// Organization level 2 / Employee list / Employee [Name = 'Hiroshi Yamamoto']
// Organization level 2 / Employee list / Employee [Name = 'Takashi Nakata']

対象インスタンスが決定すると、ボタン生成用ソースデータ生成機能24は、これらの対象インスタンスを基に、ボタン生成用ソースデータテーブルの生成を行う。ボタン生成用ソースデータテーブルは、フィールドから構成されるデータレコードの集合を記憶したものである。   When the target instance is determined, the button generation source data generation function 24 generates a button generation source data table based on these target instances. The button generation source data table stores a set of data records composed of fields.

XMLデータ構造定義テーブルのボタン情報部で、「抽出対象リスト」要素下で定義された「抽出対象」要素1個が、ボタン生成用ソースデータテーブルのフィールド1個に対応し、前記フィールドの名称は、対応する前記「抽出対象」要素の属性「fieldName」の値となる。また、「抽出対象リスト」要素下に現れる「抽出対象」要素の順が、そのままボタン生成用ソースデータテーブルに出力されるフィールドの順となる。更に、抽出対象のうち、参照対象に対応するフィールドには、出力時に目印が付けられてボタン生成機能がボタン化対象とは区別できるようになっている。ボタン生成用ソースデータテーブルにおいて、ボタン化対象に対応するフィールドを「ボタン化フィールド」と呼び、参照対象に対応するフィールドを「参照フィールド」と呼ぶ。   In the button information part of the XML data structure definition table, one “extraction target” element defined under the “extraction target list” element corresponds to one field of the button generation source data table, and the name of the field is , The value of the attribute “fieldName” of the corresponding “extraction target” element. Further, the order of the “extraction target” elements appearing under the “extraction target list” element is the order of the fields output to the button generation source data table as they are. Furthermore, among the extraction targets, the field corresponding to the reference target is marked at the time of output so that the button generation function can be distinguished from the button conversion target. In the button generation source data table, a field corresponding to a button object is referred to as a “button field”, and a field corresponding to a reference object is referred to as a “reference field”.

具体的には、「営業成績.xdst」において「抽出対象リスト」要素の最初の子要素「抽出対象」は、「fieldName」属性の値に“所属”が指定されているので、当該抽出対象に対応するボタン生成用ソースデータテーブルのフィールド名称は“所属”となる。同様に、続いて4個の「抽出対象」要素が現れていて、ボタン生成用ソースデータテーブルのフィールド名称は、「社員名」、「地域」、「実績月」及び「金額」となって、表6に示す1行目のようにフィールドが決定される。   Specifically, the first child element “extraction target” of the “extraction target list” element in “business results.xdst” has “affiliation” specified as the value of the “fieldName” attribute. The field name of the corresponding button generation source data table is “affiliation”. Similarly, four “extraction target” elements appear, and the field names of the button generation source data table are “employee name”, “region”, “actual month”, and “amount”, The fields are determined as shown in the first row shown in Table 6.

Figure 0004593580
Figure 0004593580

表6において、最後に現れる「抽出対象」は参照対象なので、ボタン化対象と区別できるように、対応する「金額」フィールド名称の先頭に「*」が付加されている。すなわち、表6に示すように出力されるボタン生成用ソースデータテーブルのフィールドのうち、「所属」、「社員名」、「地域」及び「実績月」はボタン化フィールドであり、「金額」は参照フィールドである。   In Table 6, since the “extraction object” that appears last is a reference object, “*” is added to the head of the corresponding “amount” field name so that it can be distinguished from the button object. That is, among the fields of the button generation source data table output as shown in Table 6, “affiliation”, “employee name”, “region”, and “actual month” are buttoned fields, and “amount” is This is a reference field.

ボタン生成用ソースデータテーブルのフィールドが出力されると、次にボタン生成用ソースデータ生成機能は、ボタン生成用ソースデータテーブルの実データであるレコードを生成するが、それに先立ち、入力XMLにおける各抽出対象同士の関係を前記テーブルのレコードに反映させるため、抽出対象の上下関係を、各抽出対象に対応するスキーマ定義部の構造を基に決定する。   When the field of the button generation source data table is output, the button generation source data generation function next generates a record that is the actual data of the button generation source data table. Prior to that, each extraction in the input XML is performed. In order to reflect the relationship between the objects in the record of the table, the vertical relationship of the extraction objects is determined based on the structure of the schema definition unit corresponding to each extraction object.

図11に示す、正規化されていない要素構造ツリーにおいて、スキーマ定義部の自動生成時は、属性をノードと見なさなかったが、ここでは属性を該属性が現れる要素ノードの子ノードと見なして、ルートノードから、各抽出対象に対応するノードまでの距離を測定する。距離は、図11において、ルートノードから当該抽出対象に対応するノードに至るまでいくつの矢印(実線矢印及び破線矢印)を経るかによって決定される。出現場所が不特定の抽出対象の場合、最も長い距離のものを採用する。具体的には、ボタン情報部における1個目の抽出対象“at2”は、図11に示す要素構造ツリーでは、「組織階層2」要素の「名前」属性のノードとして表現されているが、ルートノードから矢印3個(実線矢印2個と破線矢印1個)を経るので、距離が3となる。また、2個目の抽出対象“el7”は、「//組織階層1/社員リスト/社員」の子ノード(距離5)と「//組織階層2/社員リスト/社員」の子ノード(距離4)の2つで出現するが、距離が長い方を採用するので、距離は5となる。同様に3個目の抽出対象“at3”は距離が7、4個目の抽出対象“el11”は距離が7で、5個目の抽出対象“el12”は距離が7となる。   In the unnormalized element structure tree shown in FIG. 11, the attribute is not regarded as a node at the time of automatic generation of the schema definition part, but here, the attribute is regarded as a child node of the element node in which the attribute appears. The distance from the root node to the node corresponding to each extraction target is measured. In FIG. 11, the distance is determined by how many arrows (solid line arrow and broken line arrow) pass from the root node to the node corresponding to the extraction target. When the appearance location is an unspecified extraction target, the one with the longest distance is adopted. Specifically, the first extraction target “at2” in the button information part is expressed as a node of the “name” attribute of the “organization hierarchy 2” element in the element structure tree shown in FIG. The distance is 3 because three arrows (two solid arrows and one dashed arrow) pass from the node. The second extraction target “el7” is a child node (distance 5) of “// organization hierarchy 1 / employee list / employee” and a child node (distance of “// organization hierarchy 2 / employee list / employee”). It appears in two of 4), but since the longer distance is adopted, the distance is 5. Similarly, the third extraction object “at3” has a distance of 7, the fourth extraction object “el11” has a distance of 7, and the fifth extraction object “el12” has a distance of 7.

前記のようにして、各抽出対象までの距離を測定したら、相対的に距離が短いものを「上位」、距離が長いものを「下位」、同じものを「同位」として、上下関係を決定する。具体的には、図16に示すように上下関係が決まる。図16では、左に現れるものを上位、右に現れるものを下位として表現した。図16に示すように、抽出対象“at2”は、他の抽出対象全てに対して上位である。抽出対象“el7”は、抽出対象“at2”に対して下位であり、抽出対象“at3”、“el11”及び“el12”に対して上位である。抽出対象“at3”、“el11”及び“el12”は、互いに同位であり、抽出対象“at2”と“el7”に対して下位である。
ボタン生成用ソースデータ生成機能は抽出対象の上下関係を決定すると、ボタン生成用ソースデータテーブルのレコード生成を開始する。
As described above, when the distance to each extraction target is measured, the upper and lower relations are determined by setting the relatively short distance as “upper”, the longer distance as “lower”, and the same as “same”. . Specifically, the vertical relationship is determined as shown in FIG. In FIG. 16, what appears on the left is represented as a higher level, and what appears on the right is represented as a lower level. As shown in FIG. 16, the extraction target “at2” is higher than all other extraction targets. The extraction object “el7” is lower than the extraction object “at2” and higher than the extraction objects “at3”, “el11”, and “el12”. The extraction objects “at3”, “el11”, and “el12” are the same as each other, and are lower than the extraction objects “at2” and “el7”.
When the button generation source data generation function determines the top / bottom relationship of the extraction target, the button generation source data table starts record generation.

まず、既に決定している対象インスタンスのうち、1個目に現れるものを取り出す。具体的には、「営業成績.xml」で1個目に現れる対象インスタンスは「//組織階層1/組織階層2/社員リスト/社員[名前=‘中村 里沙’]」のXPathで表される要素である。以降、この要素を「社員「中村
里沙」の対象インスタンス」と呼ぶ。次に、最下位に現れる抽出対象に着目する。最下位に同位で抽出対象が現れた場合は、同位同士を直列に組み合わせて取り出す。直列に取り出す順序は、ボタン情報部で指定されている抽出対象の順序に準ずる。
First, the target instance that has already been determined is extracted. Specifically, the first target instance that appears in “Sales Results.xml” is represented by the XPath of “// Organization hierarchy 1 / Organization hierarchy 2 / Employee list / Employee [name = 'Risa Nakamura']” Is an element. Hereinafter, this element is referred to as “target instance of employee“ Risa Nakamura ””. Next, attention is focused on the extraction target appearing at the bottom. If extraction targets appear at the lowest level, they are taken out by combining them in series. The order of taking out in series follows the order of extraction targets specified in the button information section.

この例では、「営業成績.xml」の社員「中村 里沙」の対象インスタンスにおいて、最下位に現れる抽出対象は、図16で示すように、3個の同位抽出対象である“at3”、“el11”及び“el12”である。同位同士は関係を直列とするので、[“神奈川”,“2006年4月”, “2,500,000”]の組み合わせと、[“埼玉”,“2006年4月”,“5,800,000”]の組み合わせと、[“埼玉”,“2006年5月”,“6,100,000”]の3つの組み合わせが取り出せる。次に、取り出した最下位の抽出対象に対して、入力XMLにおける関係を保つように、上位の抽出対象を取り出して、抽出対象の組み合わせに直列に加える。   In this example, in the target instance of the employee “Risa Nakamura” of “business results.xml”, the extraction targets that appear at the bottom are “at3”, “el11”, which are three peer extraction targets, as shown in FIG. "And" el12 ". Since the relationships between the peers are in series, the combination of [“Kanagawa”, “April 2006”, “2,500,000”] and the combination of [“Saitama”, “April 2006”, “5,800,000”] [“Saitama”, “May 2006”, “6,100,000”] can be extracted. Next, in order to maintain the relationship in the input XML with respect to the extracted lowest extraction object, the upper extraction object is extracted and added in series to the combination of extraction objects.

具体的には、社員「中村 里沙」の対象インスタンスの最下位の3個の抽出対象に対する上位は、図16に示すように、“at2”と“el7”なので、最下位の抽出対象を取り出した組み合わせに直列に加えて、[“菓子販売部”,“中村 里沙”,“神奈川”,“2006年4月”,“2,500,000”]、[“菓子販売部”,“中村 里沙”,“埼玉”,“2006年4月”,“ 5,800,000”]、及び[“菓子販売部”,“中村 里沙”,“埼玉”,“2006年5月”,“6,100,000”]のようになる。これらの組み合わせ1個を、ボタン生成用ソースデータテーブルのレコード1件に対応させる。すなわち、前述の表6に示すように、社員「中村
里沙」の対象インスタンスから、3件のレコードが生成される。
Specifically, the top of the three lowest extraction targets of the target instance of employee “Risa Nakamura” is “at2” and “el7” as shown in FIG. In addition to the combination, [“confectionery sales department”, “Risa Nakamura”, “Kanagawa”, “April 2006”, “2,500,000”], [“confectionery sales department”, “Risa Nakamura”, “Saitama” , “April 2006”, “5,800,000”] and [“Confection Sales Department”, “Risa Nakamura”, “Saitama”, “May 2006”, “6,100,000”]. One of these combinations is made to correspond to one record of the button generation source data table. That is, as shown in Table 6 above, three records are generated from the target instance of the employee “Risa Nakamura”.

入力XMLが対象インスタンスを複数持つ場合、2個目以降の全ての対象インスタンスに対し、1個目の対象インスタンスの場合と同様の方法で、ボタン生成用ソースデータテーブルのレコードを生成する。具体的には、「営業成績.xml」の社員「山本 弘」の対象インスタンスからは4件のレコードが、社員「中田 隆史」の対象インスタンスからは1件のレコードが生成され、表7に示すようにボタン生成用ソースデータテーブルに記憶される。   When the input XML has a plurality of target instances, a record of the button generation source data table is generated for all second and subsequent target instances in the same manner as in the case of the first target instance. Specifically, four records are generated from the target instance of the employee “Hiroshi Yamamoto” in “Sales Results.xml”, and one record is generated from the target instance of the employee “Takashi Nakata”, as shown in Table 7. In this way, it is stored in the source data table for button generation.

Figure 0004593580
Figure 0004593580

以上の方法で、ボタン生成用ソースデータ生成機能によるボタン生成用ソースデータテーブルの生成が完了し、表7に示すボタン生成用ソースデータテーブルを「営業成績.table」として記憶装置に保存する。   With the above method, generation of the button generation source data table by the button generation source data generation function is completed, and the button generation source data table shown in Table 7 is stored in the storage device as “business results.table”.

4.ボタン生成機能とボタン機能
図6に示すように、アプリケーション30は、ボタン生成用ソースデータ生成機能24によってボタン生成用ソースデータテーブルの生成が完了すると、生成されたボタン生成用ソースデータテーブルをボタン生成機能24に渡してXMLボタンの生成を要求する。尚、XMLボタンは、少なくとも「ボタンクラス」と「個別ボタン」を構成要素とする。 以下、XMLボタンが自動生成される過程及び当該ボタンの操作手順を説明する。
4). Button Generation Function and Button Function As shown in FIG. 6, the application 30 generates the button generation source data table after the button generation source data generation function 24 completes the button generation source data table generation. Pass to function 24 to request generation of XML button. The XML button includes at least “button class” and “individual button” as components. Hereinafter, a process of automatically generating an XML button and an operation procedure of the button will be described.

「ボタンクラス」は、ボタン生成用ソースデータテーブルの各レコードを構成するフィールドの内、ボタン化フィールドに対応し、そのフィールドの名称をボタンクラス名称とする。具体的には、表7に示すボタン生成用ソースデータテーブル「営業成績.table」を基にXMLボタンを生成する際は、4個のボタン化フィールド「所属」、「社員名」、「地域」、及び「実績月」が順番にそれぞれのボタンクラスに対応し、それらのボタンクラス名称はそれぞれ「所属」、「社員名」、「地域」、及び「実績月」となる。表7に示すボタン生成用ソースデータテーブル「営業成績.table」から生成されるXMLボタンのイメージを図17に示す。図17では、縦に4個の区画に分かれていて、それぞれがボタンクラスに対応する。ボタンクラスの上部に二重枠で囲まれた文字列があるが、これがボタンクラス名称を表す。   The “button class” corresponds to a buttoned field among the fields constituting each record of the button generation source data table, and the name of the field is the button class name. Specifically, when generating an XML button based on the button generation source data table “Sales Results.table” shown in Table 7, four button fields “affiliation”, “employee name”, “region” , And “actual month” correspond to the respective button classes in order, and the button class names are “affiliation”, “employee name”, “region”, and “actual month”, respectively. FIG. 17 shows an image of an XML button generated from the button generation source data table “business results.table” shown in Table 7. In FIG. 17, it is divided vertically into four sections, each corresponding to a button class. There is a character string enclosed in a double frame at the top of the button class, which represents the button class name.

「個別ボタン」は、ボタンクラスに属し、ボタン生成用ソースデータテーブルの各レコードの当該ボタン化フィールドに出現するユニークなデータ値に対応する。あるボタンクラスに属する個別ボタンは、ボタン生成機能によって次のように決定される。ボタン生成用ソースデータテーブルにおいて、前記ボタンクラスに対応するボタン化フィールドに着目する。着目した前記フィールドに出現するデータのうち、ユニークな値を全て取り出す。取り出した値をキャプションとした個別ボタンを生成し、当該ボタンクラスに関連付けて従属させる。   An “individual button” belongs to a button class and corresponds to a unique data value that appears in the buttoned field of each record of the button generation source data table. Individual buttons belonging to a certain button class are determined by the button generation function as follows. In the button generation source data table, attention is paid to the buttoned field corresponding to the button class. All unique values are extracted from the data appearing in the noted field. An individual button having the extracted value as a caption is generated, and is associated with the button class.

具体的には、表7に示すボタン生成用ソースデータテーブル「営業成績.table」からボタン化フィールド「所属」に対応するボタンクラスに属する個別ボタンは、当該フィールドに出現するデータが、順に「菓子販売部」、「菓子販売部」、「菓子販売部」、「健康食品販売部」、「健康食品販売部」、「健康食品販売部」、「健康食品販売部」、及び「健康食品販売部」なので、これらからユニークな値を取り出して、「菓子販売部」と「健康食品販売部」の2個となる。ボタン生成機能は、これらをキャプションとする個別ボタンを2個生成し、「所属」ボタンクラスに関連付けて従属させる。以上により、「所属」ボタンクラスに属する個別ボタン生成が完了する。図17に示すXMLボタンのイメージでは、一番左のボタンクラスで、ボタンクラス名の下にこれら2個の個別ボタンがそれぞれ一重線で囲まれて文字列として表現している。ボタン生成用ソースデータテーブルを基に、各レコードの全てのボタン化フィールドに対して、同様に当該ボタンクラスに属する個別ボタンを生成できる。   Specifically, individual buttons belonging to the button class corresponding to the buttoned field “Affiliation” from the button generation source data table “Sales Results.table” shown in Table 7 are displayed in the order of “confectionery”. Sales Department, Confectionery Sales Department, Confectionery Sales Department, Health Food Sales Department, Health Food Sales Department, Health Food Sales Department, Health Food Sales Department, and Health Food Sales Department Therefore, a unique value is taken out from these, and becomes “confectionery sales department” and “health food sales department”. The button generation function generates two individual buttons using these as captions and associates them with the “affiliation” button class. Thus, the generation of the individual buttons belonging to the “affiliation” button class is completed. In the image of the XML button shown in FIG. 17, the leftmost button class is represented as a character string surrounded by a single line under the button class name. Based on the button generation source data table, individual buttons belonging to the button class can be similarly generated for all button fields of each record.

個別ボタン生成時、各個別ボタンがボタン生成用ソースデータテーブルのどのレコードから生成されたかを後で検索可能とするために、ここでは図示していないが、当該レコード番号を、別途領域を確保して個別ボタンと関連付けて記憶させておくことが好ましい。   When creating an individual button, to make it possible to search later from which record in the button generation source data table each individual button was created, a separate area is allocated for the record number, although not shown here. It is preferable to store them in association with individual buttons.

具体的には、表7に示すボタン生成用ソースデータテーブル「営業成績.table」から生成されたボタンクラス「地域」に属する個別ボタン「神奈川」は、表7に示すボタン生成用ソースデータテーブルの上から1番目、4番目及び6番目のレコードから生成されるので、それらのレコード番号を記憶する。同様に、ボタンクラス「実績月」に属する個別ボタン「2006年5月」は、表7に示すボタン生成用ソースデータテーブルの上から3番目、6番目及び7番目のレコードから生成されるので、それらのレコード番号を記憶する。以上の方法で生成されたXMLボタンは、ボタンクラス毎に並べて表示装置に表示される。以上で、ボタン生成機能によるXMLボタン生成が完了する。   Specifically, the individual button “Kanagawa” belonging to the button class “Region” generated from the button generation source data table “Sales Results.table” shown in Table 7 is stored in the button generation source data table shown in Table 7. Since the first, fourth and sixth records from the top are generated, the record numbers are stored. Similarly, the individual button “May 2006” belonging to the button class “actual month” is generated from the third, sixth and seventh records from the top of the button generation source data table shown in Table 7. Store those record numbers. The XML buttons generated by the above method are displayed on the display device side by side for each button class. This completes the XML button generation by the button generation function.

ボタン生成機能によってXMLボタンの生成と表示が完了すると、アプリケーションは表示しているXMLボタンに対するユーザの選択指示を待つ。ユーザが入力装置によって個別ボタンを選択すると、アプリケーションはその選択情報をボタン機能28に伝える。ボタン機能28は個別ボタンの選択情報を受け取ると、当該個別ボタンが記憶しているボタン生成用ソースデータテーブル内で当該番号が一致するレコードをマークする。   When the generation and display of the XML button is completed by the button generation function, the application waits for a user's selection instruction for the displayed XML button. When the user selects an individual button with the input device, the application transmits the selection information to the button function 28. When the button function 28 receives the selection information of the individual button, the button function 28 marks the record having the same number in the button generation source data table stored in the individual button.

具体的には、「営業成績.table」から生成されたXMLボタンにおいて、ボタンクラス「社員名」に属する個別ボタン「山本 弘」が選択された場合、ボタン機能28は、当該個別ボタンと関連付けて記憶されているレコード番号4、5、6及び7と一致するレコードをマークする。ボタン機能がマークしたレコードは、いつでも取り出すことが可能である。   Specifically, when the individual button “Hiroshi Yamamoto” belonging to the button class “employee name” is selected in the XML button generated from “business results.table”, the button function 28 is associated with the individual button. Mark records that match the stored record numbers 4, 5, 6, and 7. Records marked by the button function can be retrieved at any time.

すなわち、ユーザは、個別ボタン「山本 弘」を選択することにより、「営業成績.xml」が保持しているデータのうち、「山本 弘」に関するものを特定して取り出すことができる。ボタン選択によってマークされたレコードをどのように活用するかはアプリケーション次第であるが、ここでは言及しない。   That is, by selecting the individual button “Hiroshi Yamamoto”, the user can specify and retrieve the data related to “Hiroshi Yamamoto” from the data held in “Sales Results.xml”. How to utilize the record marked by the button selection is up to the application, but it is not mentioned here.

XMLは、階層化(構造化)されたデータを保持するが、XMLボタンを生成する際、この階層情報を有効活用することも考えられる。
XMLデータ構造定義テーブルのボタン情報部の抽出対象を階層化してボタン化することを指定し、ボタン生成用ソースデータテーブルに階層情報を付加して、XMLボタンを自動生成し、表示装置に階層付きのXMLボタンを表示すれば、これは、階層データを直観的に操作できるアプリケーションのフロントエンドとして便利である。
XML holds hierarchical (structured) data, but it is also conceivable that this hierarchical information can be used effectively when generating an XML button.
Specifies that the extraction target of the button information part of the XML data structure definition table is hierarchized and buttoned, adds hierarchy information to the button generation source data table, automatically generates an XML button, and adds a hierarchy to the display device If the XML button is displayed, this is convenient as a front end of an application that can intuitively manipulate hierarchical data.

例えば「営業成績.xdst」で、フィールド名「所属」に対応する抽出対象とフィールド名「社員名」に対応する抽出対象の階層化ボタン生成を指定したとすると、図18に示すような階層付きのXMLボタン表示が考えられる。この例のように、「所属 > 社員」という階層化された2個のボタンクラスをまとめて表示すると、階層化されたデータを扱うアプリケーションのフロントエンドとして便利である。   For example, in “business results.xdst”, if the extraction target corresponding to the field name “affiliation” and the generation button generation of the extraction target corresponding to the field name “employee name” are specified, a hierarchy with a hierarchy as shown in FIG. XML button display can be considered. As shown in this example, displaying two hierarchical button classes of “Affiliation> Employee” together is convenient as a front end for applications that handle hierarchical data.

本発明を実施するためのコンピュータシステムの構成図である。It is a block diagram of the computer system for implementing this invention. XMLデータ用ボタンシステムのソフトウェア構成図である。It is a software block diagram of the button system for XML data. XMLパース機能の概要を示す図である。It is a figure which shows the outline | summary of an XML parsing function. 入力XML「営業成績.xml」のツリー構造を示す図である。It is a figure which shows the tree structure of input XML "business results.xml". 各データの凡例を示す図である。It is a figure which shows the legend of each data. 本発明の基本シーケンスを示す図である。It is a figure which shows the basic sequence of this invention. 入力XMLのツリー表現の一部を示す図である。It is a figure which shows a part of tree representation of input XML. XMLデータテーブルのノード構造及びノードリスト構造を示す図である。It is a figure which shows the node structure and node list structure of an XML data table. 「営業成績.xml」の文書要素を示す図である。It is a figure which shows the document element of "business results.xml". 最初に現れる「社員」要素のツリー構造を示す図である。It is a figure which shows the tree structure of the "employee" element which appears first. 「営業成績.xml」の全てに対して要素構造の連続性判断を行った時の要素構造ツリー(スキーマ)を示す図である。It is a figure which shows the element structure tree (schema) when the continuity determination of an element structure is performed with respect to all of "business results.xml". 図11に示す要素構造ツリーに対して、要素間での構造同一性の判断を行った時の要素構造ツリーと要素構造サブツリーを示す図である。It is a figure which shows the element structure tree and element structure subtree when the structure identity between elements is determined with respect to the element structure tree shown in FIG. 図11に示す要素構造ツリーに対して、要素間での構造同一性の判断を更に行った時の要素構造ツリーと要素構造サブツリーを示す図である。It is a figure which shows the element structure tree and element structure subtree when the judgment of the structural identity between elements is further performed with respect to the element structure tree shown in FIG. 図11に示す要素構造ツリーに対して、要素間での構造同一性の判断を更に行った時の要素構造ツリーと要素構造サブツリーを示す図である。It is a figure which shows the element structure tree and element structure subtree when the judgment of the structural identity between elements is further performed with respect to the element structure tree shown in FIG. 図11に示す要素構造ツリーのルートノードまで要素構造サブツリー参照に変換した時の図である。FIG. 12 is a diagram when converting to the element structure subtree reference up to the root node of the element structure tree shown in FIG. 抽出対象の上下関係を示す図である。It is a figure which shows the vertical relationship of extraction object. XMLボタンの一例を示す図である。It is a figure which shows an example of an XML button. XMLボタンの他の例(階層化ボタン)を示す図である。It is a figure which shows the other example (hierarchical button) of an XML button.

符号の説明Explanation of symbols

10 中央処理装置
12 記憶装置
14 表示装置
16 入力装置
20 XMLパース機能
22 構造管理機能
24 ボタン生成用ソースデータ生成機能
26 ボタン生成機能
28 ボタン機能
30 アプリケーション
32 入力XML
34 XMLデータテーブル
40 XMLデータ構造定義テーブル
42 ボタン生成用ソースデータテーブル
10 central processing unit 12 storage device 14 display device 16 input device 20 XML parsing function 22 structure management function 24 button generation source data generation function 26 button generation function 28 button function 30 application 32 input XML
34 XML data table 40 XML data structure definition table 42 Button generation source data table

Claims (3)

記憶装置に記憶されているXMLデータを基に、操作ボタンを生成するプログラムされた中央処理装置が実行するXMLデータ用操作ボタン生成方法であって、
(1)XMLデータを構成する要素間の関連、要素と属性間の関連、及び要素と属性の持つ値から、前記XMLデータを木構造と見なして該XMLデータを構成する全ての要素や属性の相互関係や位置関係の情報を格納したXMLデータテーブルを自動生成して記憶装置に記憶し、
(2)前記XMLデータテーブルを参照しながら前記XMLデータの構造を解析してスキーマ言語で表したスキーマ定義を自動生成し、
(3)(i)前記XMLデータを構成する要素の内、XMLボタン生成対象の基準要素となるように前記スキーマ定義を介して指定されたデータ単位と、(ii)該データ単位自体、該データ単位のXMLデータ構造上の子孫及び祖先の各要素の値または各属性の値の内で、前記XMLデータから抽出したい値として前記スキーマ定義を介して指定されたボタン化対象を有する抽出対象と、から構成されるボタン情報を形成し、
(4)前記スキーマ定義と前記ボタン情報をまとめてXMLデータ構造定義テーブルとして記憶装置に記憶し、
(5)前記XMLデータから前記ボタン情報の前記データ単位に該当する要素を全て取り出し、該取り出した要素自体、該要素の子孫要素または祖先要素に含まれる各要素の値または各属性の値から前記ボタン情報の前記ボタン化対象に指定されたものを抽出し、前記データ単位に該当してXMLデータから取り出された要素を前記ボタン化対象に対応するボタン化フィールドを有するレコードとし、前記ボタン化対象に指定されたものとして抽出された前記要素の値または前記属性の値を前記ボタン化フィールドのフィールド値とした1つ以上のレコードから成るボタン生成用ソースデータテーブルを自動生成して記憶装置に記憶し、
(6)前記ボタン生成用ソースデータテーブルの前記各ボタン化フィールドに現れるユニークな値に対応させて生成される個別ボタンと、前記各ボタン化フィールドに対応させて生成されて前記個別ボタンを前記各ボタン化フィールド毎に統括するボタンクラスとから構成され、前記個別ボタンの選択によってXMLデータにアクセスできるようにしたXMLボタンを自動生成して表示装置に表示する、
ことを特徴とするXMLデータ用操作ボタン生成方法。
Based on the XML data stored in the storage device, a programmed central processing unit operation button generation method for XML data to execute to generate the operation button,
(1) From the relation between elements constituting XML data, the relation between elements and attributes, and the values possessed by the elements and attributes, the XML data is regarded as a tree structure and all elements and attributes constituting the XML data are An XML data table storing information on mutual relationships and positional relationships is automatically generated and stored in a storage device.
(2) automatically generating a schema definition expressed in a schema language by analyzing the structure of the XML data while referring to the XML data table;
(3) (i) a data unit designated through the schema definition so as to be a reference element for generating an XML button among elements constituting the XML data, and (ii) the data unit itself, the data An extraction object having a buttonization object designated via the schema definition as a value to be extracted from the XML data, among the values of the descendant and ancestor elements or the values of the attributes on the unit XML data structure; Form button information consisting of
(4) The schema definition and the button information are collectively stored in a storage device as an XML data structure definition table,
(5) All the elements corresponding to the data unit of the button information are extracted from the XML data, and the element value or the attribute value included in the extracted element itself, a descendant element or an ancestor element of the element is used. The button information extracted from the XML data corresponding to the data unit is extracted as a record having a buttonization field corresponding to the buttonization target, and the button information is designated as the buttonization target. A button generation source data table consisting of one or more records with the value of the element or attribute extracted as specified in the field as the field value of the buttoned field is automatically generated and stored in the storage device. And
(6) An individual button generated corresponding to a unique value appearing in each buttoned field of the button generation source data table, and each individual button generated corresponding to each buttoned field A button class that controls each buttoned field, and automatically generates an XML button that can access XML data by selecting the individual button, and displays the XML button on a display device.
An operation button generation method for XML data characterized by the above.
前記ボタン情報は、前記データ単位に該当してXMLデータから取り出された要素に含まれるが、該要素から除外したい要素がある場合に、該除外したい要素を前記データ単位に該当してXMLデータから取り出された要素から除外するように指定された除外インスタンスを有することを特徴とする請求項1記載のXMLデータ用操作ボタン生成方法。   The button information is included in an element extracted from the XML data corresponding to the data unit. When there is an element to be excluded from the element, the element to be excluded corresponds to the data unit from the XML data. 2. The method for generating an operation button for XML data according to claim 1, further comprising: an excluded instance designated to be excluded from the extracted element. 前記表示装置に表示されたXMLボタンは、ユーザが選択した個別ボタンに対応するデータを前記ボタン生成用ソースデータテーブルから取り出すのに使用されることを特徴とする請求項1または2記載のXMLデータ用操作ボタン生成方法。   3. The XML data according to claim 1, wherein the XML button displayed on the display device is used to extract data corresponding to the individual button selected by the user from the button generation source data table. Operation button generation method.
JP2007053858A 2007-03-05 2007-03-05 Method for generating operation buttons for XML data Expired - Fee Related JP4593580B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007053858A JP4593580B2 (en) 2007-03-05 2007-03-05 Method for generating operation buttons for XML data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007053858A JP4593580B2 (en) 2007-03-05 2007-03-05 Method for generating operation buttons for XML data

Publications (2)

Publication Number Publication Date
JP2008217408A JP2008217408A (en) 2008-09-18
JP4593580B2 true JP4593580B2 (en) 2010-12-08

Family

ID=39837373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007053858A Expired - Fee Related JP4593580B2 (en) 2007-03-05 2007-03-05 Method for generating operation buttons for XML data

Country Status (1)

Country Link
JP (1) JP4593580B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5225331B2 (en) * 2010-06-30 2013-07-03 ヤフー株式会社 Data extraction apparatus and method
JP5644218B2 (en) * 2010-07-12 2014-12-24 富士通株式会社 Database control method, information processing apparatus, and database control program
CN107451225B (en) * 2011-12-23 2021-02-05 亚马逊科技公司 Scalable analytics platform for semi-structured data
JP6932064B2 (en) * 2017-11-01 2021-09-08 株式会社エヌ・ティ・ティ・データ Database support device, database support method, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0876954A (en) * 1994-08-31 1996-03-22 N J K:Kk Method for generating operation button for computer processing and method for storing selection state of the operation button
JP2001290811A (en) * 2000-04-10 2001-10-19 Just Syst Corp Method and device for document processing and recording medium
JP2002073614A (en) * 2000-08-24 2002-03-12 Nec Nexsolutions Ltd System for providing reservation relating information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0876954A (en) * 1994-08-31 1996-03-22 N J K:Kk Method for generating operation button for computer processing and method for storing selection state of the operation button
JP2001290811A (en) * 2000-04-10 2001-10-19 Just Syst Corp Method and device for document processing and recording medium
JP2002073614A (en) * 2000-08-24 2002-03-12 Nec Nexsolutions Ltd System for providing reservation relating information

Also Published As

Publication number Publication date
JP2008217408A (en) 2008-09-18

Similar Documents

Publication Publication Date Title
USRE48030E1 (en) Computer-implemented system and method for tagged and rectangular data processing
US7096226B2 (en) Database system, particularly for multimedia objects
JP4822889B2 (en) Database integrated reference program, database integrated reference method, and database integrated reference device
US20030037076A1 (en) Method, computer program and system for style sheet generation
US7080067B2 (en) Apparatus, method, and program for retrieving structured documents
TWI290698B (en) System and method for updating and displaying patent citation information
US7363581B2 (en) Presentation generator
KR100969656B1 (en) An excel-based composing system for analyzing reports or views and the method thereof
US8990717B2 (en) Context-aware charting
JP2003067402A (en) Structured document managing device and method therefor
KR20080027251A (en) Dynamic method for generating xml documents from a database
KR20170098854A (en) Building reports
JP4593580B2 (en) Method for generating operation buttons for XML data
KR20200037151A (en) Database integrated management system of a medical institution based xml
KR100899616B1 (en) Method and system of management metadata using relational database management system
JPH07239850A (en) Structured document preparation supporting system
JP4373470B2 (en) Document conversion utilization system
KR20090032298A (en) Method for making report be created using object-oriented program and system therefor
JP5458480B2 (en) Inquiry screen generation device for tagged document data inquiry processing system
JP2006031377A (en) Structured document management apparatus, retrieval apparatus, storage method, retrieval method, and program
JPH08161342A (en) Data base display device
JP3842576B2 (en) Structured document editing method and structured document editing system
JP6638053B1 (en) Document creation support system
JP2003323427A (en) Xml information retrieving device and method, program for executing method, and recording medium for recording program for executing method
Koch et al. Representation of CityGML instance models in BaseX

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091124

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100309

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100423

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100824

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100915

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160924

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees