JP2003058530A - Program for generating xml document conversion rule - Google Patents

Program for generating xml document conversion rule

Info

Publication number
JP2003058530A
JP2003058530A JP2001248003A JP2001248003A JP2003058530A JP 2003058530 A JP2003058530 A JP 2003058530A JP 2001248003 A JP2001248003 A JP 2001248003A JP 2001248003 A JP2001248003 A JP 2001248003A JP 2003058530 A JP2003058530 A JP 2003058530A
Authority
JP
Japan
Prior art keywords
conversion
xml document
logic
node
function
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.)
Pending
Application number
JP2001248003A
Other languages
Japanese (ja)
Inventor
Kazutoshi Ono
和俊 小野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
APPRESSO KK
Original Assignee
APPRESSO KK
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 APPRESSO KK filed Critical APPRESSO KK
Priority to JP2001248003A priority Critical patent/JP2003058530A/en
Publication of JP2003058530A publication Critical patent/JP2003058530A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a program which enables anybody to easily generate a conversion rule for converting an XML document to another XML document. SOLUTION: A computer is provided with a function which generates relevant information object representative of the structure of a conversion destination XML document and a part related to the conversion destination XML document in a conversion source XML document, a function which specifies a route node of the conversion destination, and a function which starts processing for describing an individual rule for generation of a specific node of the conversion destination and processing for describing a rule specifying the position of a source node of the conversion source from the route node and alternately and recurrently executes these processing.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、あるXML文書
を、他のXML文書に変換するために用いる、変換ルー
ルを自動生成するプログラムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program for automatically generating conversion rules used for converting one XML document into another XML document.

【0002】[0002]

【従来の技術】XML文書で作成された文書によって、
異なるOSやアプリケーション間でのデータをやり取り
することができる。ただし、あるXML文書を、他のX
ML文書に変換する際には、その変換ルールが必要であ
る。ここでいう、あるXML文書と、他のXML文書と
は、どちらもXML文書で作成された文書であるが、そ
のデータ構造が異なっていたり、データの内容が違って
いたりする文書である。上記変換ルールとしてXSLT
(Extensible Style Language Transformation)と
いうものがある。このXSLTは、XML文書を、プロ
グラミング処理によって別の形のXML文書に変換する
機能を備えたスクリプトである。そのため、あるXML
文書を、構造の異なるXML文書に変換するためには、
両XML文書に応じたXSLTを作成しなければならな
い。
2. Description of the Related Art A document created by an XML document
Data can be exchanged between different OSs and applications. However, if one XML document is
When converting to an ML document, the conversion rule is necessary. The XML document and the other XML document referred to here are both documents created by the XML document, but the data structures thereof are different or the contents of the data are different. As the above conversion rule, XSLT
There is an (Extensible Style Language Transformation). The XSLT is a script having a function of converting an XML document into another form of XML document by a programming process. Therefore, some XML
To convert a document to an XML document with a different structure,
An XSLT corresponding to both XML documents must be created.

【0003】[0003]

【発明が解決しようとする課題】従来、上記XSLTの
作成は、変換元のXML文書と、変換先のXML文書の
構造に応じて、プログラマーが人手で行っていた。しか
し、上記XSLTの生成には、XML文書や、XSLT
についての高度な知識が必要であり、誰でもXSLTを
生成することができるというわけではない。しかも、X
ML文書の構造や書式は、千差万別で、そのようなXM
L文書による変換元と変換先の組み合わせは無限大であ
る。このような個々の組み合わせに対して、人手で、X
SLTを作成するのはほとんど不可能である。この発明
の目的は、XML文書を、他のXML文書に変換する変
換ルールを、誰でも簡単に作成できるようにするプログ
ラムを提供することである。
Conventionally, a programmer manually creates the above XSLT according to the structures of the conversion source XML document and the conversion destination XML document. However, in order to generate the above XSLT, an XML document or XSLT is used.
Advanced knowledge is required and not everyone can generate an XSLT. Moreover, X
The structure and format of ML documents vary widely, and such XM
The combination of the conversion source and the conversion destination by the L document is infinite. For such individual combinations, manually
Creating an SLT is almost impossible. An object of the present invention is to provide a program that enables anyone to easily create a conversion rule for converting an XML document into another XML document.

【0004】[0004]

【課題を解決するための手段】第1の発明は、変換元X
ML文書を変換先XML文書に変換する変換ルールを作
成するプログラムであって、コンピュータに、変換先X
ML文書の構造と、変換元XML文書における変換先X
ML文書に関連する部分とを表す関連情報オブジェクト
を生成する機能と、変換先のルートノードを特定する機
能と、変換先の特定のノードを生成するための個別ルー
ルを記述する処理と、変換元のソースノードの位置を特
定するルールを記述する処理とを、上記ルートノードか
ら始めて、交互に、しかも、再帰的に実行する機能と
を、実現させるためのプログラムである。
A first aspect of the present invention is a conversion source X.
A program for creating a conversion rule for converting an ML document into a conversion destination XML document, the conversion destination X being stored in a computer.
Structure of ML document and conversion destination X in conversion source XML document
A function of generating a related information object representing a portion related to an ML document, a function of identifying a root node of a conversion destination, a process of describing an individual rule for generating a specific node of the conversion destination, and a conversion source Is a program for realizing the process of writing the rule for specifying the position of the source node of (1) and the function of starting recursively and recursively.

【0005】第2の発明は、第1の発明のプログラム
に、コンピュータに、入力されたXML文書のツリー構
造を解析する機能を付加した点を特徴とする。第3の発
明は、変換元XML文書および変換先XML文書のツリ
ー構造を画面表示させる機能と、画面上で線によって特
定された関係を認識する機能と、上記認識した関係に基
づいて、関連情報オブジェクトを作成する機能とを、付
加した点に特徴を有する。
A second invention is characterized in that the program of the first invention is provided with a function of analyzing a tree structure of an input XML document in a computer. A third aspect of the invention relates to a function of displaying a tree structure of a conversion source XML document and a conversion destination XML document on a screen, a function of recognizing a relationship specified by a line on the screen, and related information based on the recognized relationship. It is characterized by the addition of the function of creating an object.

【0006】第4の発明は、複数のロジックおよびこれ
らのロジックに対応させたロジックアイコンを備え、上
記ロジックアイコンを介して変換元XML文書の特定の
ノードと変換先XML文書のノードとが接続されたと
き、上記ロジックアイコンに対応するロジックに基づい
てXML文書変換ルールーを作成する点に特徴を有す
る。第5の発明は、目的のロジックアイコンをオペレー
タが選択することによって、対応するロジックを差し替
え、そのロジックに基づいたXML文書変換ルールを作
成する点に特徴を有する。
A fourth invention comprises a plurality of logics and logic icons corresponding to these logics, and a specific node of the conversion source XML document and a node of the conversion destination XML document are connected via the logic icon. In this case, the XML document conversion rule is created based on the logic corresponding to the logic icon. The fifth invention is characterized in that the operator selects a desired logic icon to replace the corresponding logic and create an XML document conversion rule based on the logic.

【0007】第6の発明は、上記ロジックが、変換元の
特定のノードの、データの中身に対する加工方法を規定
した点に特徴を有する。第7の発明は、ロジックが、変
換元の個別ノードの分割・統合する方法を規定した点に
特徴を有する。なお、上記ノードの分割・統合には、ノ
ード単位での分割・統合と、ノードを構成するインスタ
ンス単位での分割・統合とがある。第8の発明は、ロジ
ックが、変換元の特定のノードの中からどのインスタン
スを選択するのかを規定した点に特徴を有する。
A sixth aspect of the present invention is characterized in that the above logic defines a processing method for the contents of data in a specific node of a conversion source. The seventh invention is characterized in that the logic defines a method of dividing / integrating individual nodes of a conversion source. Note that the above-mentioned division / integration of nodes includes division / integration in units of nodes and division / integration in units of instances forming nodes. The eighth invention is characterized in that the logic defines which instance is to be selected from a specific node that is a conversion source.

【0008】[0008]

【発明の実施の形態】図1〜図10を用いて、この発明
の実施例を説明する。ここでは、図1に示す変換元XM
L文書αを、図2に示す変換先XML文書βに変換する
際に利用する、変換ルールであるXSLTを作成する実
施例を説明する。ここで、上記変換ルールは図3に示す
XSLT文書γである。つまり、コンピュータは、上記
変換元XML文書αと、変換先XSL文書βとを前提と
して、上記変換ルール、すなわち、XSLYγを自動作
成するが、その詳細を以下に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described with reference to FIGS. Here, the conversion source XM shown in FIG.
An example of creating an XSLT which is a conversion rule used when converting the L document α into the conversion destination XML document β shown in FIG. 2 will be described. Here, the conversion rule is the XSLT document γ shown in FIG. That is, the computer automatically creates the conversion rule, that is, XSLYγ, based on the conversion source XML document α and the conversion destination XSL document β, the details of which will be described below.

【0009】上記XSLT作成プログラムによるコンピ
ュータの処理手順を、図4〜図6のフローチャートに従
って説明する。まず、図4のステップS1で、変換元X
ML文書と、変換先XML文書とを読み込む。ステップ
S2で、両XML文書のツリー構造を認識する。XML
文書のツリー構造とは、図7,図8に示すような階層構
造のことである。図7には、上記変換元XML文書αの
ツリー構造を示し、図8には、変換先XML文書βのツ
リー構造を示している。ただし、図7において、一部を
省略している。
The processing procedure of the computer by the XSLT creating program will be described with reference to the flow charts of FIGS. First, in step S1 of FIG.
The ML document and the conversion destination XML document are read. In step S2, the tree structure of both XML documents is recognized. XML
The document tree structure is a hierarchical structure as shown in FIGS. FIG. 7 shows the tree structure of the conversion source XML document α, and FIG. 8 shows the tree structure of the conversion destination XML document β. However, in FIG. 7, a part thereof is omitted.

【0010】ステップS3で、全てのノードのパスを特
定する。ここで、ノードとは、XML文書の単位となっ
ているものである。また、パスとは、上記ノードの場所
を、上記ツリー構造におけるルートノードからの相対位
置によって指定するものである。ここでは、変換元XM
L文書と、変換先XML文書の、全てのノードの位置を
認識する。
In step S3, the paths of all the nodes are specified. Here, a node is a unit of an XML document. Further, the path specifies the location of the node by the relative position from the root node in the tree structure. Here, the conversion source XM
The positions of all the nodes in the L document and the conversion destination XML document are recognized.

【0011】ステップS4で、上記変換元XML文書α
および変換先XML文書βのツリー構造を画面表示す
る。図7、図8に示したツリー構造のうち必要な部分
を、例えば、図9に示すようにして表示させる。図9で
は、左側に、変換元XML文書αを示し、右側に変換先
XML文書βが表示されている。次に、ステップS5
で、オペレータが、変換先XML文書αのノードと、そ
れに関連する変換元XML文書βのノードとを図9に示
す画面上で線で結んで、変換ルール作成ボタンをクリッ
クすると、ルール作成が開始される。
In step S4, the conversion source XML document α
And the tree structure of the conversion destination XML document β is displayed on the screen. Necessary portions of the tree structure shown in FIGS. 7 and 8 are displayed as shown in FIG. 9, for example. In FIG. 9, the conversion source XML document α is shown on the left side, and the conversion destination XML document β is displayed on the right side. Next, step S5
Then, when the operator connects the node of the conversion destination XML document α and the node of the related conversion source XML document β with a line on the screen shown in FIG. 9 and clicks the conversion rule creation button, rule creation starts. To be done.

【0012】ステップS6で、線で結ばれた変換先のノ
ードと、変換元のソースノードとの組を上記パスによっ
て特定する。この組とは、変換先XML文書の特定のノ
ードと、そのノードに関連する変換元のノードとの組の
ことである。そして、上記一組のノードのうち、変換元
のノードをソースノードという。言い換えれば、変換元
のノードのうち、変換先に関連するノードがソースノー
ドである。
In step S6, a set of a conversion destination node and a conversion source source node, which are connected by a line, is specified by the path. This set is a set of a specific node of the conversion destination XML document and a conversion source node related to the node. Then, of the set of nodes, the conversion source node is called a source node. In other words, among the conversion source nodes, the node related to the conversion destination is the source node.

【0013】こうすることによって、ステップS7で、
ノードマップが完成する。ノードマップとは、上記線に
よって特定された両者の関係を上記パスによって表した
ものである。例えば、図9のように、変換先のノード
「row」と変換元のノード「row」とを結んだ線1と、変
換先の「column」と変換元の「column」とを結んだ線2
によって、ノードマップが生成される。なお、上記線
1,2を引く際に、変換元のノードと、変換先のノード
との間に、上記データの持って行き方を指示した特別の
ロジックアイコンを介在さてもよい。このロジックアイ
コンには、それぞれロジックを対応させている。
By doing so, in step S7,
The node map is completed. The node map represents the relationship between the two specified by the line by the path. For example, as shown in FIG. 9, a line 1 connecting the conversion destination node “row” and the conversion source node “row”, and a line 2 connecting the conversion destination “column” and the conversion source “column”.
Produces a node map. When the lines 1 and 2 are drawn, a special logic icon for instructing how to take the data may be interposed between the conversion source node and the conversion destination node. Each logic is associated with this logic icon.

【0014】そして、上記ロジックには、次のような機
能が含まれている。これらの機能は、変換元の特定のノ
ードの、データの中身に対する加工方法を規定する機能
や、変換元の個別ノードの分割・統合する方法を規定す
る機能、変換元の特定のノードの中からどのインスタン
スを選択するのかを規定する機能などである。
The above logic includes the following functions. These functions include a function that defines the processing method for the contents of the data of a specific conversion source node, a function that specifies the method of dividing / integrating individual nodes of the conversion source, and a specific node of the conversion source. It is a function that regulates which instance is selected.

【0015】ステップS8で、上記ノードマップから、
関連情報オブジェクトを生成する。この関連情報オブジ
ェクトとは、次のようなデータとプログラムとを含んだ
ものである。そのデータは、上記変換先XML文書βの
構造と、この変換先XML文書βのどの部分が変換元の
どの部分に関連しているかを表した構造情報のことであ
る。この構造情報を図示すると図10に示すようにな
る。図10からもわかるように、この構造情報は、上記
変換先XML文書βの構造と、変換元XML文書αにお
いて、上記XML文書βに関連する部分のみを示したも
のである。また、上記関連情報オブジェクトのプログラ
ムには、変換元XML文書αから変換先XML文書βへ
の、データの持っていき方などを指示したロジックへの
参照も含まれている。
In step S8, from the above node map,
Generate related information object. This related information object includes the following data and program. The data is structure information indicating the structure of the conversion destination XML document β and which part of the conversion destination XML document β is related to which part of the conversion source. This structural information is shown in FIG. As can be seen from FIG. 10, this structure information indicates only the structure of the conversion destination XML document β and the portion of the conversion source XML document α related to the XML document β. The program of the related information object also includes a reference from the conversion source XML document α to the conversion destination XML document β to the logic that instructs how to bring the data.

【0016】ステップS9で、変換先のルートノードを
特定する。ルートノードとは、XML文書のツリー構造
における根の部分に当たるノードである。ツリー構造
は、根から幹が伸び、枝別れしてゆく構造であるが、図
7,図8に示すツリー構造は、上下を逆さに示してい
る。すなわち、図7、図8においては、最も上部に示さ
れたノードがルートノードである。このステップS9で
は、変換先XML文書βにおけるルートノード、すなわ
ち、「csvfile」を特定する。以上ステップS9まで
が、上記関連情報オブジェクトを完成させるステップで
ある。
In step S9, the root node of the conversion destination is specified. The root node is a node corresponding to the root part in the tree structure of the XML document. The tree structure is a structure in which the trunk extends from the root and branches off. The tree structures shown in FIGS. 7 and 8 are shown upside down. That is, in FIG. 7 and FIG. 8, the node shown at the top is the root node. In step S9, the root node in the conversion destination XML document β, that is, “csvfile” is specified. The steps up to step S9 are the steps for completing the related information object.

【0017】以下、実際にXSLTを記述するステップ
に入るが、ここからは、変換元XML文書および変換先
XML文書を、図1,図2の文書に特定しないで、以下
のフローを説明する。ステップS10では、XSLTの
ヘッダーを記述し、ステップS11で、上記変換先のル
ートノードの開始タグを記述する。
In the following, the step of actually describing the XSLT is entered, but from here onward, the following flow will be described without specifying the conversion source XML document and the conversion destination XML document as the documents of FIGS. 1 and 2. In step S10, the header of XSLT is described, and in step S11, the start tag of the root node of the conversion destination is described.

【0018】次に、ステップS12で、上記変換先のル
ートノードの子ノードを特定する。ステップS13で、
変換先のルートノードの子ノードを引数としてコンパイ
ルターゲットエレメント機能を呼び出す。このコンパイ
ルターゲットエレメント機能は、以下のステップで再度
説明するが、上記関連情報オブジェクトの中の変換先X
ML文書の特定のノードに対応するソースノードの位置
を記述する機能のことである。ただし、上記ソースノー
ドの位置は、変換元ツリー構造におけるノードの親子関
係として特定するようにしている。そして、このコンパ
イルターゲットエレメント機能Aのフローチャートを図
5に示している。
Next, in step S12, a child node of the root node of the conversion destination is specified. In step S13,
Call the compile target element function with the child node of the transformation destination root node as an argument. This compile target element function will be described again in the following steps.
This is a function to describe the position of the source node corresponding to a specific node of the ML document. However, the position of the source node is specified as the parent-child relationship of the nodes in the conversion source tree structure. A flowchart of this compile target element function A is shown in FIG.

【0019】ステップS14で、上記コンパイルターゲ
ットエレメント機能を開始する。ステップS15で、ソ
ースノードを取得する。ここで、ソースノードがない場
合には、そのことを記録する。ステップS16で、引数
に指定された変換先のノードに対するエレメントロジッ
クを取得する。ここで、エレメントロジックがない場合
には、そのことを記録する。
In step S14, the compile target element function is started. In step S15, the source node is acquired. If there is no source node, record that fact. In step S16, the element logic for the conversion destination node designated by the argument is acquired. Here, if there is no element logic, that fact is recorded.

【0020】ステップS17で、上記ノードすなわちル
ートノードの子ノードにソースノードがあるか判定す
る。ここで、上記ルートノードの子ノードに対応するソ
ースノードがあれば、ステップS23へ進み、なけれ
ば、ステップS18へ進む。ソースノードがなかった場
合、ステップS18へ進み、上記エレメントロジックに
基づいたゲットエレメントボディ機能を呼び出す。ゲッ
トエレメントボディ機能とは、エレメントロジックの種
類に基づいて、変換先の特定のエレメントを生成するた
めに、そのエレメントに対応した個別ルールを記述する
機能のことであり、その処理内容を図6に示している。
In step S17, it is determined whether or not the above node, that is, the child node of the root node has a source node. If there is a source node corresponding to the child node of the root node, the process proceeds to step S23, and if not, the process proceeds to step S18. If there is no source node, the process proceeds to step S18 to call the get element body function based on the above element logic. The get element body function is a function that describes an individual rule corresponding to a specific element to be converted based on the type of element logic, and the processing content thereof is shown in FIG. Shows.

【0021】そして、ステップS18から、図6のステ
ップS201へ進む。ステップS201ではエレメント
ロジックに基づいたゲットエレメントボディ機能を開始
する。ステップS202では、開始タグを記述する。こ
こで記述するタグは、変換先の特定のノード、すなわ
ち、ルートノードの子ノードに対応する要素の開始タグ
である。ステップS203で、そのノードに子ノードが
あるかどうか判定する。子ノードがなければ、ステップ
S208へ進み、子ノードがあった場合には、ステップ
S204へ進む。ステップS204では、変換先ルート
ノードの子ノードの子ノードを引数とするコンパイルタ
ーゲットエレメント機能を呼び出す。
Then, the process proceeds from step S18 to step S201 in FIG. In step S201, the get element body function based on the element logic is started. In step S202, a start tag is described. The tag described here is the start tag of the element corresponding to the specific node of the conversion destination, that is, the child node of the root node. In step S203, it is determined whether the node has a child node. If there is no child node, the process proceeds to step S208, and if there is a child node, the process proceeds to step S204. In step S204, the compile target element function having the child node of the child node of the conversion destination root node as an argument is called.

【0022】ステップS205で、コンパイルターゲッ
トエレメント機能を開始する。このステップS205
は、図5のステップS101と同一のステップである。
図5のステップS101〜ステップS118の処理は、
図4のステップS11〜ステップS31までの処理とほ
ぼ同じなので、ここでの説明は省略する。そして、図5
のステップS118から、図6のステップS206へ戻
り、コンパイルターゲットエレメント機能が終了する。
In step S205, the compile target element function is started. This step S205
Is the same step as step S101 in FIG.
The processing of steps S101 to S118 in FIG.
Since it is almost the same as the processing from step S11 to step S31 in FIG. 4, description thereof will be omitted here. And FIG.
6 returns to step S206 of FIG. 6 and the compile target element function ends.

【0023】ステップS207で、コンテントロジック
が、現在特定しているノードについているかどうか判断
する。そして、コンテントロジックがあれば、ステップ
S214へ進み、そのコンテントロジックに応じた機能
を呼び出すが、コンテントロジックがない場合には、ス
テップ208へ進み、デフォルトコンテントロジック機
能を呼び出す。上記コンテントロジック機能とは、変換
先の特定のノードの中に入るデータの内容を特定する個
別ルールを記述する機能のことであり、上記コンテント
ロジックは、変換先の特定のノードへ持ってくるデータ
の内容に対する特別の操作を規定したものである。
In step S207, it is determined whether the content logic is for the currently specified node. Then, if there is content logic, the process proceeds to step S214, and the function corresponding to the content logic is called. If there is no content logic, the process proceeds to step 208, and the default content logic function is called. The content logic function is a function that describes an individual rule that specifies the content of the data that enters the specific node of the conversion destination, and the content logic is the data that is brought to the specific node of the conversion destination. It specifies a special operation for the contents of.

【0024】ステップS209で、コンテントロジック
機能を開始して、ステップS210で、データ内容を特
定する個別ルールを記述する。ステップS211で、デ
フォルトコンテントロジック機能を終了する。
In step S209, the content logic function is started, and in step S210, an individual rule for specifying the data content is described. In step S211, the default content logic function ends.

【0025】なお、今回は、エレメントロジックが指定
されていないデフォルトゲットエレメントボディ機能
を、図6のフローチャートに基づいて説明した。ただ
し、エレメントロジックが指定されている場合には、そ
の指定されたロジックに基づいたゲットエレメントボデ
ィ機能を実現する。その場合のフローチャートは、図6
のものとは異なるが、その機能を実現して、ステップS
213へ到達する。このように、エレメントロジックを
差し替えることによって、種々の変換ルールを自動生成
することができる。ステップS211では、上記ステッ
プS202で記述した開始タグに対応する終了タグを記
述する。これで、ゲットエレメントボディ機能が終了す
る(ステップS213)。
Incidentally, this time, the default get element body function in which the element logic is not specified has been described based on the flowchart of FIG. However, when the element logic is designated, the get element body function based on the designated logic is realized. The flowchart in that case is shown in FIG.
Although it is different from the above, it realizes that function and
Reach 213. As described above, various conversion rules can be automatically generated by replacing the element logic. In step S211, an end tag corresponding to the start tag described in step S202 is described. This completes the get element body function (step S213).

【0026】一方、ステップS203で、子ノードがな
いと判断した場合には、ステップS207へ進み、以下
ステップS213まで、上記と同様に進む。上記ステッ
プS213から、図4のステップS19にもどって、ス
テップS20へ進む。ステップS20で、上記ルートノ
ードの子ノードのコンパイルターゲットエレメント機能
が終了し、ステップS21で、上記ルートノードの終了
タグを記述する。そして、ステップS22でXSLTの
フッターを記述すると、変換ルールであるXSLTが完
成する。
On the other hand, if it is determined in step S203 that there is no child node, the process proceeds to step S207, and the process proceeds to step S213 as described above. From step S213, the procedure returns to step S19 of FIG. 4 and proceeds to step S20. In step S20, the compilation target element function of the child node of the root node ends, and in step S21, the end tag of the root node is described. Then, when the footer of XSLT is described in step S22, the conversion rule XSLT is completed.

【0027】また、図4のステップS17で、ルートノ
ードの子ノードのソースノードがあると判断した場合、
ステップS23へ進む。ステップS23では、ソースノ
ードの親の配列を取得する。つまり、ここで特定されて
いるソースノードの親ノードを全て特定する。変換元の
ツリー構造において、全てのパスがすでに認識されてい
るので、そのパスから、上記ソースノードの親の配列を
取得することができる。ステップS24で、上記親の配
列中で、まだセレクトされていない部分の配列を抜き出
して取得する。
If it is determined in step S17 of FIG. 4 that there is a source node that is a child node of the root node,
It proceeds to step S23. In step S23, the parent array of the source node is acquired. That is, all the parent nodes of the source node specified here are specified. Since all paths have already been recognized in the tree structure of the conversion source, it is possible to acquire the parent array of the source node from the paths. In step S24, the array of the part that has not been selected yet is extracted from the parent array and is acquired.

【0028】ステップS25で、上記抜きだして取得し
た各親ノードと、ソースノード自身に、ループロジック
があるかどうか判断する。ループロジックがある場合に
は、ステップS34へ進み、そのループロジックに応じ
た機能を開始するが、ループロジックがない場合、ステ
ップS26へ進み、デフォルトループロジックを開始す
る。ステップS27で、エレメントロジックのプリスト
リングを記述する。このプリストリングとは、エレメン
トロジックがある場合に、それに応じて変化するXSL
Tのコマンドなどのことである。ただし、デフォルトエ
レメントロジックの場合には、何も記述しない。
In step S25, it is determined whether or not each parent node obtained by the above extraction and the source node itself have a loop logic. If there is a loop logic, the process proceeds to step S34 to start the function according to the loop logic, but if there is no loop logic, the process proceeds to step S26 to start the default loop logic. In step S27, the pre-string of the element logic is described. This pre-string is an XSL that changes according to the element logic, if any.
This is a T command or the like. However, in the case of default element logic, nothing is written.

【0029】ステップS28で、デフォルトループロジ
ックに基づいた開始タグを記述する。ただし、上記ステ
ップS24で取得した親ノードとソースノードのうち最
上位のノードからソースノードまでの開始タグを、順番
に記述する。ステップS29で、ロジックに基づいたゲ
ットエレメントボディ機能を呼び出す。つまり、図6の
ステップS201〜213の処理を行って、図4のステ
ップS30へ戻り、上記ゲットエレメントボディ機能を
終了する。
In step S28, a start tag based on the default loop logic is described. However, the start tags from the highest node to the source node among the parent node and the source node obtained in step S24 are described in order. In step S29, the get element body function based on the logic is called. That is, the processes of steps S201 to 213 of FIG. 6 are performed, and the process returns to step S30 of FIG. 4 to end the get element body function.

【0030】ステップS31では、上記ステップS28
で記述した開始タグに対応する終了タグを、ソースノー
ドから親ノードへ、記述する。これで、特定のソースノ
ードに関連する変換元側のノードに対する処理が親から
子へ順に開始して、子から親へ順に終了することにな
る。ステップS32で、ポストストリングを記述する。
このポストリングとは、上記プリストリングに対応した
コマンドや終了タグなどである。ステップS33でルー
プロジックを終了したら、ステップS20へ進み、コン
パイルターゲットエレメント機能が終了する。
In step S31, the above step S28 is performed.
Describe the end tag corresponding to the start tag described in 1. from the source node to the parent node. With this, the processing for the node on the conversion source side related to the specific source node starts in order from parent to child, and ends in order from child to parent. In step S32, the post string is described.
The post ring is a command or end tag corresponding to the prestring. When the loop logic ends in step S33, the process proceeds to step S20, and the compile target element function ends.

【0031】以上が、変換ルール作成プログラムの流れ
である。上記したように、この変換ルール作成プログラ
ムでは、変換先のルートノードから、順に、そのノード
の位置と内容とを特定するために、上記コンパイルター
ゲットエレメント機能と、ゲットエレメントボディ機能
とを交互に再帰的に実行する。再帰的に処理を実行する
とは、上記ルートノードから、上記機能を開始して、そ
の処理を終了しないで、その途中で、子ノードの処理を
開始し、さらに子ノードがある場合には、その親の処理
の途中で、子ノードの処理を開始してゆき、全ての処理
を開始したら、子ノードから、順に終了してゆくことで
ある。また、図5、図6からも明らかなように、コンパ
イルターゲット機能の中に、ゲットエレメントボディ機
能の呼び出しが含まれ、さらに、このゲットエレメント
ボディ機能のなかに、コンパイルターゲット機能の呼び
出しが含まれているので、これらは、再帰的に実行され
ることになる。
The above is the flow of the conversion rule creating program. As described above, in this conversion rule creation program, the compile target element function and the get element body function are alternately recurred in order from the conversion destination root node in order to specify the position and content of the node. To execute. Executing a process recursively means starting the above function from the root node and not ending the process, but starting the process of the child node in the middle of the process, and if there are more child nodes, The processing of the child node is started in the middle of the processing of the parent, and when all the processing is started, the processing is sequentially ended from the child node. Further, as is clear from FIGS. 5 and 6, the compile target function includes a call to the get element body function, and further, the get element body function includes a call to the compile target function. Therefore, these will be executed recursively.

【0032】次に、実際に変換ルールを生成する例とし
て、図10に示す関連情報オブジェクトの構造情報か
ら、図3のXSLTγを生成する手順を説明する。図4
のステップS8までの、関連オブジェクトの完成までの
ステップは省略して、ステップS9から説明する。ま
ず、ステップS9で、変換先のルートノードを特定す
る。図10から明らかなように、変換先のルートノード
は、「csvfile」3である。ステップS10でヘッダー
を記述する。このヘッダーは、図3のヘッダー21の全
ての行である。
Next, as an example of actually generating a conversion rule, a procedure for generating XSLTγ of FIG. 3 from the structure information of the related information object shown in FIG. 10 will be described. Figure 4
The steps up to step S8 until completion of the related object will be omitted, and description will be given from step S9. First, in step S9, the root node of the conversion destination is specified. As is clear from FIG. 10, the root node of the conversion destination is “csvfile” 3. The header is described in step S10. This header is all the rows of header 21 of FIG.

【0033】ステップ11で、上記ルートノード「csvf
ile」3の開始タグ<csvfile>22を記述する(図3参
照)。ステップS12で、上記ルートノードの子ノード
を特定する。図10から明かなように、ルートノード
「csvfile」3の子ノードは、「row」4である。ステッ
プS13、14で、上記ルートノードの子ノード「ro
w」4を引数とするコンパイルターゲットエレメント機
能を呼び出し、それを開始する。ステップS15でソー
スノードを取得し、ステップS16でエレメントロジッ
クを取得する。
In step 11, the root node "csvf"
ile ”3 start tag <csvfile> 22 is described (see FIG. 3). In step S12, child nodes of the root node are identified. As is apparent from FIG. 10, the child node of the root node “csvfile” 3 is “row” 4. In steps S13 and S14, the child node "ro
Invokes the compile target element function with w "4 as an argument and starts it. The source node is acquired in step S15, and the element logic is acquired in step S16.

【0034】ステップS17で、ソースノードがあるか
判断する。図10に示すように、上記「row」4には、
線1によって、ソースノード「row」9が接続されてい
る。そこで、ステップS23へ進む。ステップS23で
は、ソースノードの親の配列を取得する。すなわち、ソ
ースノード「row」9の親の「rows」8、その親の「tab
ledata」7、その親の「table」6を特定する。ステッ
プS24で、すでにセレクトされていない部分の配列を
抜き出す。上記「row」9、「rows」8、「tabledata」
7、「table」6は全てセレクトされていないので、配
列「row」9―「rows」8―「tabledata」7―「tabl
e」6を抜き出す。
In step S17, it is determined whether there is a source node. As shown in FIG. 10, the above “row” 4 includes
The source node “row” 9 is connected by the line 1. Therefore, the process proceeds to step S23. In step S23, the parent array of the source node is acquired. That is, the parent "rows" 8 of the source node "row" 9 and the parent "tab"
"ledata" 7 and its parent "table" 6 are specified. In step S24, the array of the part that has not been selected is extracted. Above "row" 9, "rows" 8, "tabledata"
7 and "table" 6 are not all selected, array "row" 9- "rows" 8- "tabledata" 7- "tabl"
e ”6 is pulled out.

【0035】図10に示すように、上記ソースノード
「row」9と各親ノードにループロジックが内ので、ス
テップS25で、上記ソースノードと各親ノードにルー
プロジックがないと判断して、ステップS26へ進み、
デフォルトループロジックを開始する。ステップS27
では、エレメントロジックのプリストリングを記述する
が、ここでは、デフォルトロジックなので、何も記述し
ない。ステップS28で、ループロジックに基づいた開
始タグを、親ノードからソースノードの順に記述する。
As shown in FIG. 10, since the loop logic is included in the source node "row" 9 and each parent node, it is determined in step S25 that the source node and each parent node have no loop logic, Go to S26,
Start the default loop logic. Step S27
Then, describe the pre-string of the element logic, but here, since it is the default logic, do not describe anything. In step S28, start tags based on the loop logic are described in order from the parent node to the source node.

【0036】上記ループロジックに基づいた開始タグと
は、<xsl:for-each select="">である。すなわち、
ソースノード「row」9の親の親の親である「table」6
から順に、開始タグ<xsl:for-each select="table">
23、<xsl:for-each select="tabledata">24、<
xsl:for-each select="rows">25、<xsl:for-each
select="row">26を記述する(図3参照)。
The start tag based on the above loop logic is <xsl: for-each select = "">. That is,
"Table" 6 which is the parent of the parent of the source node "row" 9
Starting from <start tag <xsl: for-each select = "table">
23, <xsl: for-each select = "tabledata"> 24, <
xsl: for-each select = "rows"> 25, <xsl: for-each
Describe select = "row"> 26 (see FIG. 3).

【0037】次にステップS29へ進み、デフォルトロ
ジックのゲットエレメントボディ機能を呼び出す。つま
り、図6のステップS201へ進み、ゲットエレメント
ボディ機能を開始する。ゲットエレメントボディ機能と
は、先に説明したが、変換先の特定のエレメントを生成
するための個別ルールを記述する機能のことである。こ
こで、変換先の特定のエレメントは、ノード「row」4
である。ステップS202で、変換先のノード「row」
4の開始タグ<row>27を記述する(図3)。
Next, in step S29, the get element body function of the default logic is called. That is, the process proceeds to step S201 in FIG. 6 to start the get element body function. As described above, the get element body function is a function of writing an individual rule for generating a specific element of a conversion destination. Here, the specific element of the conversion destination is the node "row" 4
Is. In step S202, the conversion destination node "row"
The start tag <row> 27 of No. 4 is described (FIG. 3).

【0038】ステップS203で、上記ノード「row」
4の子ノードがあるか判断する。上記ノード「row」4
には、子ノード「column」5があるので、ステップS2
04へ進み、このノード「column」5を引数とするコン
パイルターゲットエレメント機能を呼び出す。ステップ
S205のコンパイルターゲットエレメントの開始は、
図5のステップS101なので、次に、ステップS10
2へ進む。ステップS102でソースノードを取得し、
ステップS103でエレメントロジックを取得する。
In step S203, the node "row"
It is determined whether there are 4 child nodes. Above node "row" 4
Has a child node "column" 5, so step S2
In step 04, the compile target element function having this node "column" 5 as an argument is called. The start of the compile target element in step S205 is
Since it is step S101 in FIG. 5, next step S10
Go to 2. In step S102, obtain the source node,
In step S103, the element logic is acquired.

【0039】ステップS104で、ノード「column」5
にソースノードがあるか判断する。上記ノード「colum
n」5には、図10に示すようにソースノード「colum
n」10があるので、ステップS107へ進む。ステッ
プS107では、ソースノード「column」10の親の配
列を取得する。「column」10の親は「row」9、その
親は「rows」8、その親は「tabledata」7、その親は
「table」6である。この中で、すでにセレクトされて
いない部分を、ステップS108で、抜き出す。「ro
w」9〜「table」6まではすでにセレクトされているの
で、ここでは、「column」10のみを抜き出す。
In step S104, the node "column" 5
Determine if there is a source node in. Above node "colum
In the “n” 5, as shown in FIG. 10, the source node “colum
Since there is n'10, the process proceeds to step S107. In step S107, the parent array of the source node "column" 10 is acquired. The parent of “column” 10 is “row” 9, its parent is “rows” 8, its parent is “tabledata” 7, and its parent is “table” 6. Of these, the part that has not been selected is extracted in step S108. "Ro
Since "w" 9 to "table" 6 have already been selected, only "column" 10 is extracted here.

【0040】図10に示すように、上記ソースノード
「column」10にはループロジックがないので、ステッ
プS109で、ループロジックがないと判断して、ステ
ップS110へ進み、デフォルトループロジックを開始
する。ステップS111で、エレメントロジックのプリ
ストリングを記述するが、デフォルトロジックなので、
何も記述しない。ステップS112で、ループロジック
に基づいた開始タグを、親ノードからソースノードの順
に記述する。ここでは、ソースノード「column」10だ
けしかないので、図3に示すように、<xsl:for-each s
elect="column">28を記述する。
As shown in FIG. 10, since the source node "column" 10 has no loop logic, it is determined in step S109 that there is no loop logic, and the process proceeds to step S110 to start the default loop logic. In step S111, the pre-string of element logic is described, but since it is the default logic,
Do not write anything. In step S112, start tags based on the loop logic are described in order from the parent node to the source node. Here, since there is only the source node “column” 10, as shown in FIG. 3, <xsl: for-each s
Describe elect = “column”> 28.

【0041】次に、ステップS113で、ゲットエレメ
ントボディ機能の呼び出しを行い、図6のステップS2
01へ進み、ゲットエレメントボディ機能を開始する。
ステップS202で、変換先のノード「column」5の開
始タグ<column>29を記述する(図3)。上記ノード
「column」5には、図10に示すように、子ノードがな
いので、ステップS203で、上記ノード「column」5
に子ノードがないと判断して、ステップS207へ進
む。
Next, in step S113, the get element body function is called, and in step S2 of FIG.
Proceed to 01 to start the get element body function.
In step S202, the start tag <column> 29 of the conversion destination node “column” 5 is described (FIG. 3). Since the node “column” 5 has no child node as shown in FIG.
When it is determined that there is no child node in, the process proceeds to step S207.

【0042】ステップS207では、コンテントロジッ
クがあるかを判断するが、上記ノード「column」5に
は、コンテントロジックがないので、ステップS208
へ進む。ステップS208で、デフォルトコンテントロ
ジック機能を呼び出して、ステップS208でそれを開
始する。ステップS210で、データ内容を特定するル
ールを記述する。実際には、図3の<xsl:value-of sel
ect="text()"/>30を記述する。これで、ノード「co
lumn」5に入るデータ内容が特定され、ステップS21
1で、コンテントロジック機能が終了する。ステップS
212で、上記ステップS202で記述した開始タグ<
column>29に対応する終了タグ</column>31を記
述して(図3)、ステップS213で、ゲットエレメン
トボディ機能を終了して、図5のステップS114へ戻
る。
In step S207, it is determined whether or not there is content logic. However, since the node "column" 5 has no content logic, step S208 is performed.
Go to. In step S208, the default content logic function is called and started in step S208. In step S210, a rule for specifying the data content is described. Actually, <xsl: value-of sel in Fig. 3
ect = “text ()” /> 30 is described. Now the node "co
The contents of data to be entered in "lumn" 5 are specified, and step S21
At 1, the content logic function ends. Step S
In 212, the start tag <described in step S202 above
An end tag </ column> 31 corresponding to column> 29 is described (FIG. 3), the get element body function is ended in step S213, and the process returns to step S114 in FIG.

【0043】ステップS115で、ループロジックの終
了タグ</xsl:for each>32を記述する。この終了タ
グは、上記開始タグ<xsl:for-each select="column"
>28に対応するものである。ステップS116のポス
トリングの記述では、ここではデフォルトロジックなの
で、何も記述しない。以下、ステップS117、ステッ
プS118へ進み、図6のステップS206へ戻る。こ
のステップSは、「row」4のゲットエレメントボディ
機能の途中である。従って、ステップS208のコンテ
ントロジック機能の呼び出しからステップS210のル
ールの記述までの処理によって、上記ノード「row」4
にはいるデータの内容を特定するルールを記述する。こ
のルールが、図3の<xsl:value-of select="text()"/
>33である。
At step S115, the end tag </ xsl: for each> 32 of the loop logic is described. This end tag is the above start tag <xsl: for-each select = "column"
It corresponds to> 28. In the description of the post ring in step S116, nothing is described because it is the default logic here. Hereinafter, the process proceeds to steps S117 and S118, and returns to step S206 in FIG. This step S is in the middle of the get element body function of "row" 4. Therefore, by the processing from the call of the content logic function of step S208 to the description of the rule of step S210, the node "row" 4
Describe the rules that specify the content of the data contained in. This rule is <xsl: value-of select = "text ()" / in Figure 3.
> 33.

【0044】ステップS212で終了タグ</ row>3
4を記述したら、「row」4のゲットエレメントボディ
が終了し(ステップS213)、図4のステップS30
に戻る。つまり、上記「row」4のソースノード「row」
9のループロジックの途中に戻ってきたのである。ステ
ップS31で、ソースノード「row」9から親ノード「t
able」6への終了タグを記述する。図3には4個の終了
タグ</xsl:for-each>35、36,37、38が記述
されているが、これらは、それぞれ、先に記述した開始
タグ26,25,24,23に対応している。すなわ
ち、一対のタグは、入れ子になっている。
End tag </ row> 3 in step S212
4 is described, the get element body of "row" 4 ends (step S213), and step S30 of FIG.
Return to. That is, the source node “row” of the above “row” 4
It came back in the middle of the loop logic of 9. In step S31, the source node "row" 9 to the parent node "t
The end tag to "able6" is described. In FIG. 3, four end tags </ xsl: for-each> 35, 36, 37, 38 are described, and these are added to the start tags 26, 25, 24, 23 described above, respectively. It corresponds. That is, the pair of tags are nested.

【0045】ステップS32で、ポストストリングの記
述、ステップS33でループロジック機能を終了する。
ステップS20で、上記ノード「row」4を引数とする
コンパイルターゲットエレメント機能を終了し、図6の
ステップS21へ進む。ステップS21では、変換先ル
ートノード「csvfile」3の終了タグを記述する。すな
わち、図3の<csvfile>22に対応する終了タグ</cs
vfile>39を記述する。ステップS22でフッター4
0を記述すれば、変換ルールであるXSLTγの完成で
ある。
At step S32, the post string is described, and at step S33, the loop logic function ends.
In step S20, the compile target element function with the node "row" 4 as an argument is terminated, and the process proceeds to step S21 in FIG. In step S21, the end tag of the conversion destination root node "csvfile" 3 is described. That is, the end tag </ cs which corresponds to <csvfile> 22 in FIG.
Describe vfile> 39. Footer 4 in step S22
If 0 is described, the conversion rule XSLTγ is completed.

【0046】以上の、XSLTγ作成の流れを整理する
と図11に示すようになる。なお、上記XSLTγの作
成は、図4、図5、図6に示したフローチャート間を行
ったり来たりするので、図11においては、同一フロー
チャート間の流れは、実線で示し、異なるフローチャー
トへ進む部分は、破線で示している。まず、図4に示す
フローチャートで、プログラムを起動して、ステップS
29まで進んだところで、図6のステップS201へ進
み、「row」4を引数とするコンパイルターゲットエレ
メント機能B1を開始する。ステップS205から、図
5のステップS101へ進み、ゲットエレメントボディ
機能A1を開始する。ステップS113から図6のステ
ップS201へ進み、「column」5を引数とするコンパ
イルターゲットエレメント機能B2を開始する。
The above-mentioned flow of XSLTγ preparation is summarized as shown in FIG. Since the creation of the above XSLT γ goes back and forth between the flowcharts shown in FIGS. 4, 5 and 6, the flow between the same flowcharts is shown by a solid line in FIG. Is indicated by a broken line. First, in the flowchart shown in FIG. 4, the program is started, and step S
When the process reaches 29, the process advances to step S201 in FIG. 6 to start the compile target element function B1 with “row” 4 as an argument. From step S205, the process proceeds to step S101 in FIG. 5, and the get element body function A1 is started. Proceeding from step S113 to step S201 in FIG. 6, the compile target element function B2 with "column" 5 as an argument is started.

【0047】ステップS213で、このコンパイルター
ゲットエレメント機能B2を終了したら、図5のステッ
プS118へ進み、上記ゲットエレメントボディ機能A
1の続きを始める。ステップS118で、上記ゲットエ
レメントボディ機能A1を終了して、図6のステップS
206へ進んで、上記コンパイルターゲットエレメント
機能B1の続きを始める。ステップS213で、上記コ
ンパイルターゲットエレメント機能B1を終了して、図
4のステップS30へ戻り、以下のステップを処理し
て、完成に至る。
When the compile target element function B2 is completed in step S213, the process proceeds to step S118 in FIG.
Start the continuation of 1. In step S118, the get element body function A1 is terminated, and step S in FIG.
Proceeding to 206, the compile target element function B1 is continued. In step S213, the compile target element function B1 is terminated, the process returns to step S30 in FIG. 4, and the following steps are processed to complete the process.

【0048】以上の処理は、図11からも明らかなよう
に、図4に示した処理の中で、第1のコンパイルターゲ
ットエレメント機能B1の処理を開始して、その処理の
途中で、ゲットエレメントボディ機能A1の処理を開始
して、さらに、その途中で、第2のコンパイルターゲッ
トエレメント機能B2を開始している。そして、後から
開始した処理から順に終了している。つまり、再帰的処
理が行われているのである。
As is apparent from FIG. 11, the above process starts the process of the first compile target element function B1 in the process shown in FIG. 4, and the get element is acquired in the middle of the process. The processing of the body function A1 is started, and further, in the middle of the process, the second compile target element function B2 is started. Then, the processing started later is ended in order. That is, recursive processing is being performed.

【0049】次に、変換元XML文書と、変換先XML
文書との間に、ロジックアイコンを介在させる場合につ
いて、図12、図13を用いて説明する。図12に示す
画面には、変換元XML文書のツリー構造と、変換先X
ML文書Wのツリー構造とが左右に対向表示されてい
る。そして、画面下部には、複数のロジックアイコン2
1〜27が表示されている。これらのロジックアイコン
21〜27は、それぞれ、別のロジックに対応してい
る。
Next, the conversion source XML document and the conversion destination XML document
A case where the logic icon is interposed between the document and the document will be described with reference to FIGS. 12 and 13. On the screen shown in FIG. 12, the tree structure of the conversion source XML document and the conversion destination X document are displayed.
The tree structure of the ML document W is displayed on the left and right sides so as to face each other. And at the bottom of the screen, a plurality of logic icons 2
1-27 are displayed. Each of these logic icons 21 to 27 corresponds to another logic.

【0050】これらのロジックには、先に説明したが、
変換元の特定のノードの、データの中身に対する加工方
法を規定する機能を備えた「エレメントロジック」や、
変換元の個別ノードの分割・統合する方法を規定する機
能を備えた「コンテントロジック」、変換元の特定のノ
ードの中からどのインスタンスを選択するのかを規定す
る機能を備えた「ループロジック」などがある。そし
て、上記ロジックアイコン21〜27は、上記ロジック
の機能のいずれか1つあるいは複数に対応したものであ
る。
These logics have been described above,
"Element logic" that has the function of defining the processing method for the contents of the data of the specific node of the conversion source,
"Content logic" that has a function that regulates the method of dividing / integrating individual nodes of the conversion source, "loop logic" that has a function that determines which instance is selected from the specific node of the conversion source, etc. There is. The logic icons 21 to 27 correspond to one or more of the functions of the logic.

【0051】そこで、上記複数のロジックアイコン21
〜27の中から、オペレータは、目的とする変換に合っ
たロジックアイコンを選択し、それをドラッグすること
によって、上記変換元XML文書のツリー構造と、変換
先XML文書のツリー構造の間に配置することができ
る。ここでは、ロジックアイコン21を、変換元のノー
ドと、返還先のノードとの間に介在させている。実際に
は、画面上に、目的のロジックアイコンを配置してか
ら、そのアイコンと、変換元のノードおよび変換先のノ
ードとを線で結んでいる。
Therefore, the plurality of logic icons 21 are
The operator selects a logic icon suitable for the desired conversion from among the above-mentioned items, and drags it to arrange it between the tree structure of the conversion source XML document and the tree structure of the conversion destination XML document. can do. Here, the logic icon 21 is interposed between the conversion source node and the return destination node. In practice, a desired logic icon is arranged on the screen and then the icon is connected to the conversion source node and the conversion destination node by a line.

【0052】このように、ロジックアイコン21が、画
面上に配置されると、コンピュータは、このロジックア
イコン21に対応したロジックを特定して、それに基づ
いた処理を行う。例えば、このロジックアイコン21
が、エレメントロジックの場合には、上記図4〜図6の
フローチャートの「エレメントロジックに基づいたゲッ
トエレメントボディ機能の呼び出し」というステップ
で、呼び出すゲットエレメントボディの内容が、先に説
明したデフォルトゲットエレメントボディとは、異な
る。ただし、全体の処理の流れは同じである。
As described above, when the logic icon 21 is arranged on the screen, the computer identifies the logic corresponding to the logic icon 21 and performs the processing based on the logic. For example, this logic icon 21
However, in the case of element logic, the contents of the get element body to be called in the step "call of get element body function based on element logic" in the flowcharts of FIGS. 4 to 6 are the default get elements described above. It is different from the body. However, the overall processing flow is the same.

【0053】また、コンテントロジックのアイコンを介
在させた場合には、図6のステップS214で、そのロ
ジックに応じた機能を呼び出すようにしている。さら
に、ループロジックのアイコンを介在させた場合には、
図4のステップS34や、図5のステップS119にお
いて、それぞれのロジックに基づいた機能を呼び出すこ
とにしている。
When the content logic icon is interposed, the function corresponding to the logic is called in step S214 of FIG. Furthermore, if you insert the icon of loop logic,
In step S34 of FIG. 4 and step S119 of FIG. 5, the function based on each logic is called.

【0054】次に、上記ロジックの機能の具体例とし
て、エレメントロジックに含まれる、ロジックについて
図13を用いて説明する。図13(a)〜(d)には、
それぞれ、エレメントロジックのなかの「SPLIT」、「C
ONCAT」、「JOIN」、「SELECT」の4つのロジックの機
能を表している。「SPLIT」は、図13(a)に示すよ
うに、1つのインスタンスを、複数のインスタンスに分
割する機能である。すなわち、「SPLIT」は、1つのノ
ードaのなかの「1,2,3,4」を含むインスタンス
を分割して4つのインスタンスに変換する。例えば、上
記「1,2,3,4」が、「東京都渋谷区渋谷1丁目」
の場合、「SPLIT」によって、「東京都」、「渋谷
区」、「渋谷」、「1丁目」という4つのインスタンス
に分割されることになる。
Next, as a specific example of the function of the above logic, the logic included in the element logic will be described with reference to FIG. 13 (a)-(d),
In the element logic, "SPLIT" and "C
It represents the functions of four logics, "ONCAT", "JOIN", and "SELECT". “SPLIT” is a function of dividing one instance into a plurality of instances as shown in FIG. That is, “SPLIT” divides an instance including “1, 2, 3, 4” in one node a and converts it into four instances. For example, “1, 2, 3, 4” above is “1 Shibuya, Shibuya-ku, Tokyo”
In this case, "SPLIT" divides it into four instances of "Tokyo", "Shibuya Ward", "Shibuya", and "1chome".

【0055】上記「CONCAT」は、図13(b)に示すよ
うに、複数のインスタンスを、1つのインスタンスに統
合する機能である。すなわち、上記「CONCAT」は、1つ
のノードaに含まれる4つのインスタンスbを、1つの
インスタンスに統合する機能であり、上記「SPLIT」と
は逆の機能である。また、上記「JOIN」は、別々の、複
数のノードを1つのノードに統合する機能である。この
とき、変換元の、個々のノードが、変換先の個々のノー
ドになる。上記「SELECT」は、1個のノードの、個々の
インスタンスを選択して、それを別々のノードにする機
能である。このとき、変換元のインスタンスの中から、
特定のインスタンスを選択し、選択されたインスタンス
のみが、変換先のノードになる。
The "CONCAT" is a function of integrating a plurality of instances into one instance, as shown in FIG. 13 (b). That is, the "CONCAT" is a function of integrating four instances b included in one node a into one instance, and is a function opposite to the "SPLIT". The "JOIN" is a function of integrating a plurality of separate nodes into one node. At this time, the individual nodes of the conversion source become the individual nodes of the conversion destination. The above "SELECT" is a function of selecting individual instances of one node and making them separate nodes. At this time, from the conversion source instance,
Select a specific instance and only the selected instance will be the destination node.

【0056】また、図14、図15に、上記の使用例を
示す。図14に示すように、画面表示された変換元XM
L文書のツリー構造と、変換先XML文書のツリー構造
との間に、「JOIN」のロジックアイコンを配置して、結
線する。そして、図示しない変換ルール作成ボタンをク
リックすると、上記した手順によって、XML文書の変
換ルールが作成される。つまり、図14の左側に表示さ
れた変換元XML文書の複数のノードを、1つのノード
に統合して、変換先XML文書を作成するための変換ル
ールが作成されるのである。ここで、作成される変換ル
ールであるXSLTを図15に示している。
Further, FIGS. 14 and 15 show the above-mentioned usage examples. As shown in FIG. 14, the conversion source XM displayed on the screen
A "JOIN" logic icon is arranged and connected between the tree structure of the L document and the tree structure of the conversion destination XML document. Then, when a conversion rule creation button (not shown) is clicked, a conversion rule for the XML document is created according to the procedure described above. That is, a plurality of nodes of the conversion source XML document displayed on the left side of FIG. 14 are integrated into one node to create a conversion rule for creating a conversion destination XML document. FIG. 15 shows the XSLT that is the conversion rule created here.

【0057】ここでは、エレメントロジックの例を説明
したが、コンテントロジックや、ループロジックにも、
それぞれ、機能が対応づけられている。コンピュータ
は、そのロジックに応じた、XML文書変換ルールを作
成するようにしている。すなわち、上記ロジックの機能
を利用して生成されるべきXML文書を、生成するため
の変換ルールが作成されるのである。上記のように、画
面上に配置されたロジックアイコンの種類によって、様
々な変換ルールが自動的に作成される。オペレータは、
画面上にロジックアイコンを配置するだけで、特別なプ
ログラムを記述する必要はない。なお、上記ロジックに
は、複数の機能を複合的に備えたものもあるし、複数の
アイコンを組み合わせて配置するようにしてもかまわな
い。ただし、ロジックの種類によって、組み合わせるこ
とができるものと、できないものとがある。
Although the example of the element logic has been described here, the content logic and the loop logic are also described.
Each has a function associated with it. The computer creates an XML document conversion rule according to the logic. That is, a conversion rule for generating an XML document to be generated by utilizing the function of the above logic is created. As described above, various conversion rules are automatically created according to the type of logic icon arranged on the screen. The operator
You don't need to write a special program, just place the logic icon on the screen. It should be noted that some of the above logics have a plurality of functions in combination, and a plurality of icons may be combined and arranged. However, there are some that can be combined and some that cannot be combined depending on the type of logic.

【0058】[0058]

【発明の効果】第1〜第8の発明のXML文書変換ルー
ル作成プログラムによれば、コンピュータが、変換元X
ML文書を変換先XML文書に変換するための変換ルー
ルを自動的に作成できる。従来のように、専門知識を有
する者が、人手で作成する場合と違って、様々な変換ル
ールを、自動的に作成することができる。そのため、ど
のような種類のXML文書の変換も可能になり、データ
連携の自由度が増すことになる。
According to the XML document conversion rule creating program of the first to eighth inventions, the computer can convert the conversion source X
A conversion rule for converting an ML document into a conversion destination XML document can be automatically created. Unlike the conventional method, a person having specialized knowledge can automatically create various conversion rules, unlike the case of manually creating it. Therefore, any kind of XML document can be converted, and the degree of freedom in data cooperation increases.

【0059】第2の発明によれば、変換元XML文書お
よび変換先XML文書を入力すると、コンピュータが上
記XML文書のツリー構造を解析するので、オペレータ
は、上記XML文書そのものを入力するだけでよい。ツ
リー構造を、解析して入力する必要がない。第3の発明
によれば、変換元ノードと変換先ノードとの関係を、画
面上に線を引くことによって特定できる。両ノードの関
係の特定が、簡単である。従って、XML文書に対する
高度な知識がないものにも、上記関係を簡単に特定する
ことができる。
According to the second aspect of the present invention, when the source XML document and the destination XML document are input, the computer analyzes the tree structure of the XML document, so that the operator only needs to input the XML document itself. . There is no need to parse and enter the tree structure. According to the third aspect, the relationship between the conversion source node and the conversion destination node can be specified by drawing a line on the screen. It is easy to identify the relationship between both nodes. Therefore, the above relationship can be easily specified even for those who do not have a high level knowledge of XML documents.

【0060】第4〜第8の発明によれば、ロジックの種
類によって、様々なXML文書変換ルールを作成するこ
とができる。第6の発明によれば、変換元XML文書の
データの中身を様々に変更して、変換先XML文書に持
ってゆくことができる。従って、様々なデータ変換がで
きる。第7の発明によれば、XML文書の、様々な構造
変換ができる。第8の発明によれば、データの抽出がで
きる。
According to the fourth to eighth inventions, various XML document conversion rules can be created depending on the type of logic. According to the sixth aspect, the contents of the data of the conversion source XML document can be variously changed and brought to the conversion destination XML document. Therefore, various data conversions can be performed. According to the seventh invention, various structure conversions of an XML document can be performed. According to the eighth invention, data can be extracted.

【図面の簡単な説明】[Brief description of drawings]

【図1】変換元XML文書の例である。FIG. 1 is an example of a conversion source XML document.

【図2】変換先XML文書の例である。FIG. 2 is an example of a conversion destination XML document.

【図3】図1に示した文書を図2の文書に変換する際
の、変換ルールであるXSLTである。
FIG. 3 is XSLT which is a conversion rule when converting the document shown in FIG. 1 into the document shown in FIG.

【図4】この実施例のフローチャートである。FIG. 4 is a flowchart of this embodiment.

【図5】この実施例のフローチャートであり、コンパイ
ルターゲットエレメント機能の処理手順を表したもので
ある。
FIG. 5 is a flowchart of this embodiment and shows a processing procedure of a compile target element function.

【図6】この実施例のフローチャートであり、ゲットエ
レメントボディ機能の処理手順を表したものである。
FIG. 6 is a flowchart of this embodiment showing a processing procedure of a get element body function.

【図7】変換元XML文書のツリー構造を示した図であ
る。
FIG. 7 is a diagram showing a tree structure of a conversion source XML document.

【図8】変換先XML文書のツリー構造を示したもので
ある。
FIG. 8 shows a tree structure of a conversion destination XML document.

【図9】XML文書のツリー構造を示した画面である。FIG. 9 is a screen showing a tree structure of an XML document.

【図10】実施例の関連情報オブジェクトの構造情報を
示した図である。
FIG. 10 is a diagram showing structure information of a related information object according to the embodiment.

【図11】実施例の処理の大まかな流れを示した図であ
る。
FIG. 11 is a diagram showing a rough flow of processing of the embodiment.

【図12】ロジックを配置させた場合の画面を示した図
である。
FIG. 12 is a diagram showing a screen when logic is arranged.

【図13】エレメントロジックの機能を説明する図であ
る。
FIG. 13 is a diagram illustrating the function of element logic.

【図14】ロジック「JOIN」を利用する際の画面を示し
た図である。
FIG. 14 is a diagram showing a screen when a logic “JOIN” is used.

【図15】図14に示した変換を行うための変換ルール
であるXSLTを示した図である。
15 is a diagram showing XSLT which is a conversion rule for performing the conversion shown in FIG.

【符号の説明】[Explanation of symbols]

α 変換元XML文書 β 変換先XML文書 γ 変換ルール(XSLT) 21〜27 ロジックアイコン α conversion source XML document β conversion destination XML document γ conversion rule (XSLT) 21-27 Logic icon

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 変換元XML文書を変換先XML文書に
変換する変換ルールを作成するプログラムであって、コ
ンピュータに、変換先XML文書の構造と、変換元XM
L文書における変換先XML文書に関連する部分とを表
す関連情報オブジェクトを生成する機能と、変換先のル
ートノードを特定する機能と、変換先の特定のノードを
生成するための個別ルールを記述する処理と、変換元の
ソースノードの位置を特定するルールを記述する処理と
を、上記ルートノードから始めて、交互に、しかも、再
帰的に実行する機能とを、実現させるためのXML文書
変換ルール作成プログラム。
1. A program for creating a conversion rule for converting a conversion source XML document into a conversion destination XML document, comprising a structure of the conversion destination XML document and a conversion source XML in a computer.
Describes a function of generating a related information object representing a portion of the L document related to the conversion destination XML document, a function of specifying a conversion destination root node, and an individual rule for generating a conversion destination specific node. XML document conversion rule creation for realizing processing and processing for describing rules for identifying the position of the source node of the conversion source, starting from the root node and alternately and recursively program.
【請求項2】 コンピュータに、入力されたXML文書
のツリー構造を解析する機能を付加した請求項1に記載
のXML文書変換ルール作成プログラム。
2. The XML document conversion rule creating program according to claim 1, wherein the computer is provided with a function of analyzing the tree structure of the input XML document.
【請求項3】 変換元XML文書および変換先XML文
書のツリー構造を画面表示させる機能と、画面上で線に
よって特定された関係を認識する機能と、上記認識した
関係に基づいて、関連情報オブジェクトを作成する機能
とを、付加した請求項1または2に記載のXML文書変
換ルール作成プログラム。
3. A function of displaying a tree structure of a conversion source XML document and a conversion destination XML document on a screen, a function of recognizing a relationship specified by a line on the screen, and a related information object based on the recognized relationship. The XML document conversion rule creating program according to claim 1 or 2, further comprising a function for creating.
【請求項4】 複数のロジックおよびこれらのロジック
に対応させたロジックアイコンを備え、上記ロジックア
イコンを介して変換元XML文書の特定のノードと変換
先XML文書のノードとが接続されたとき、上記ロジッ
クアイコンに対応するロジックに基づいてXML文書変
換ルールーを作成する請求項3のXML文書変換ルール
作成プログラム。
4. A plurality of logics and logic icons corresponding to these logics are provided, and when a specific node of a conversion source XML document and a node of a conversion destination XML document are connected via the logic icon, 4. The XML document conversion rule creating program according to claim 3, which creates an XML document conversion rule based on the logic corresponding to the logic icon.
【請求項5】 目的のロジックアイコンをオペレータが
選択することによって、対応するロジックを差し替え、
そのロジックに基づいたXML文書変換ルールを作成す
る請求項4に記載のXML文書変換ルール作成プログラ
ム。
5. An operator selects a desired logic icon to replace the corresponding logic,
The XML document conversion rule creating program according to claim 4, which creates an XML document conversion rule based on the logic.
【請求項6】 ロジックが、変換元の特定のノードの、
データの中身に対する加工方法を規定した請求項4また
は5に記載のXML文書変換ルール作成プログラム。
6. The logic of a specific node of a conversion source,
The XML document conversion rule creating program according to claim 4 or 5, which defines a processing method for the contents of data.
【請求項7】 ロジックが、変換元の個別ノードの分割
・統合する方法を規定した請求項4または5に記載のX
ML文書変換ルール作成プログラム。
7. The X according to claim 4 or 5, wherein the logic defines a method of dividing / integrating individual nodes of a conversion source.
ML document conversion rule creation program.
【請求項8】 ロジックが、変換元の特定のノードの中
からどのインスタンスを選択するのかを規定した請求項
4または5に記載のXML文書変換ルール作成プログラ
ム。
8. The XML document conversion rule creating program according to claim 4, wherein the logic defines which instance is to be selected from a specific node that is a conversion source.
JP2001248003A 2001-08-17 2001-08-17 Program for generating xml document conversion rule Pending JP2003058530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001248003A JP2003058530A (en) 2001-08-17 2001-08-17 Program for generating xml document conversion rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001248003A JP2003058530A (en) 2001-08-17 2001-08-17 Program for generating xml document conversion rule

Publications (1)

Publication Number Publication Date
JP2003058530A true JP2003058530A (en) 2003-02-28

Family

ID=19077235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001248003A Pending JP2003058530A (en) 2001-08-17 2001-08-17 Program for generating xml document conversion rule

Country Status (1)

Country Link
JP (1) JP2003058530A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006046666A1 (en) * 2004-10-27 2006-05-04 Justsystems Corporation Document processing device and document processing method
JP2007265197A (en) * 2006-03-29 2007-10-11 Toshiba Corp Data conversion apparatus, data conversion method, and data conversion program
JP2008108144A (en) * 2006-10-26 2008-05-08 Hitachi Ltd Information processing method, information processor, and program
JP2011150424A (en) * 2010-01-19 2011-08-04 Nec Corp Document preparation support system, document preparation support method and program
JP2012027626A (en) * 2010-07-22 2012-02-09 Nec Corp Data converter, program and method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006046666A1 (en) * 2004-10-27 2006-05-04 Justsystems Corporation Document processing device and document processing method
JP2007265197A (en) * 2006-03-29 2007-10-11 Toshiba Corp Data conversion apparatus, data conversion method, and data conversion program
JP2008108144A (en) * 2006-10-26 2008-05-08 Hitachi Ltd Information processing method, information processor, and program
JP2011150424A (en) * 2010-01-19 2011-08-04 Nec Corp Document preparation support system, document preparation support method and program
JP2012027626A (en) * 2010-07-22 2012-02-09 Nec Corp Data converter, program and method thereof

Similar Documents

Publication Publication Date Title
US6868423B2 (en) Production and preprocessing system for data mining
US6101509A (en) Method and apparatus for transmitting documents over a network
CN101777004B (en) Method and system for realizing BPEL sub-process multiplexing based on template in service-oriented environment
US8078962B2 (en) Apparatus and method for generating web site navigations
JPH09134282A (en) Program generation method
US20060095252A1 (en) Content creation, graphical user interface system and display
JP2788850B2 (en) Optimal menu inquiry method and editing method of structural data by hierarchical menu inquiry
JP2008508643A (en) Document processing and document management means and method for creating tags or attributes in a document described in a markup language
CN106104518A (en) For the framework extracted according to the data of example
Hennicker et al. Systematic design of Web applications with UML
JPH0816378A (en) Method and device for analyzing program reverse
CN112764736A (en) Web end flow chart modeling method, device and system
US20050177814A1 (en) System for providing a graphical representation of user interface and executable application operation
CN111694563B (en) Visual design system and method for user interface mode
JP2003058530A (en) Program for generating xml document conversion rule
JP3531579B2 (en) Multimedia document generation apparatus and method, and recording medium storing program for causing computer to execute these
EP1435568A2 (en) Common interface for ink trees
US20090228678A1 (en) Mapping definition creation system and mapping definition creation program
Rossi* et al. Integrating patterns into the hypermedia development process
JPH087674B2 (en) Tree generation system and method
JPH06243024A (en) Document structure expression system, network type document processor by the system and data structure display device
JP2009157847A (en) Program development device, and program development program
US20030041062A1 (en) Computer readable medium, system, and method for data analysis
KR20000049713A (en) Web-based Internet Newspaper Edit System and Edit Method
JP3461052B2 (en) Information processing system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050927

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060207