JP2008108144A - Information processing method, information processor, and program - Google Patents

Information processing method, information processor, and program Download PDF

Info

Publication number
JP2008108144A
JP2008108144A JP2006291804A JP2006291804A JP2008108144A JP 2008108144 A JP2008108144 A JP 2008108144A JP 2006291804 A JP2006291804 A JP 2006291804A JP 2006291804 A JP2006291804 A JP 2006291804A JP 2008108144 A JP2008108144 A JP 2008108144A
Authority
JP
Japan
Prior art keywords
data
conversion
information processing
memory
program
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
JP2006291804A
Other languages
Japanese (ja)
Inventor
Hideki Takano
英樹 高野
Ryoichi Ueda
良一 植田
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2006291804A priority Critical patent/JP2008108144A/en
Publication of JP2008108144A publication Critical patent/JP2008108144A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To verify validity of a transformation rule of structured data. <P>SOLUTION: This information processor stores first data in memory, stores data for verification where the second data output when first data is correctly transformed into a second form by the program and transformation rule is estimated, transforms the first data into second data of the second form by providing the transformation rule to be verified and actually executing the program, compares the content of the second element constituting the second data after the transformation with the second element constituting the data for verification stored in the memory, and generates the data showing the second element of mismatch. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、構造化データの変換規則の正誤を検証する情報処理方法、情報処理装置およびプログラムに関する。   The present invention relates to an information processing method, an information processing apparatus, and a program for verifying whether or not structured data conversion rules are correct.

XML(eXtensible Markup Language)に代表される構造化データを変換するための変換規則を記述する規約としてXSLT(eXtensible Stylesheet Language Transformations)が知られている。また、変換規則をGUIで作成できるようなアプリケーションプログラムも提供されている(非特許文献1参照)。
株式会社アプレッソ、"データスパイダー"、[online]、[平成18年9月27日検索]、インターネット<URL:http://www.appresso.com/products/dataspider/pdfs/dataspider_catalogue.pdf>
XSLT (eXtensible Stylesheet Language Transformations) is known as a convention for describing conversion rules for converting structured data represented by XML (eXtensible Markup Language). In addition, an application program that can create a conversion rule using a GUI is also provided (see Non-Patent Document 1).
Apresso, Inc., "Data Spider", [online], [Search September 27, 2006], Internet <URL: http://www.appresso.com/products/dataspider/pdfs/dataspider_catalogue.pdf>

変換規則が正しいかどうかを検証するには、構造化データに実際に変換規則を適用し、その結果生成されたデータが予定された内容であるかどうかを確認する必要がある。   In order to verify whether the conversion rule is correct, it is necessary to actually apply the conversion rule to the structured data and check whether the data generated as a result has the expected contents.

しかしながら、変換規則において繰り返しや結合などの処理が定義され、あるいは生成される構造化データの階層が深くなった場合には検証する内容は多岐に渡る。また、XMLなど多くの構造化データの形式では、改行やインデントの有無、要素や属性の記述順などは自由に設定することが可能であり、同一の内容であっても、変換されたデータが、ユーザが予定した表現で記述されているとは限らない。したがって、変換された構造化データが正しいかどうかをユーザが目で判断するのは困難である。   However, when the conversion rule defines processing such as repetition or combination, or when the hierarchy of structured data to be generated becomes deep, the contents to be verified are various. Also, in many structured data formats such as XML, it is possible to freely set the presence / absence of line breaks and indents, the description order of elements and attributes, etc. , It is not always written in the expression planned by the user. Therefore, it is difficult for the user to judge with eyes whether the converted structured data is correct.

本発明は、このような背景を鑑みてなされたものであり、構造化データの変換規則の正誤を検証することのできる、情報処理方法、情報処理装置、およびプログラムを提供することを目的とする。   The present invention has been made in view of such a background, and an object thereof is to provide an information processing method, an information processing apparatus, and a program capable of verifying the correctness of a conversion rule for structured data. .

上記課題を解決するための本発明の主たる発明は、複数の第1の要素により構成される第1の形式で構造化された第1のデータを、複数の第2の要素により構成される第2の形式の第2のデータに変換するプログラムの実行に際して与える、前記第1の要素と前記第2の要素との関係が定義された変換規則の正誤を検証する情報処理方法であって、CPUおよびメモリを備える情報処理装置が、前記第1のデータを前記メモリに記憶し、前記第1のデータが前記プログラムおよび前記変換規則によって正しく前記第2の形式に変換された場合に出力される前記第2のデータを想定した検証用データを前記メモリに記憶し、検証対象となる前記変換規則を与えて前記プログラムを実際に実行することにより前記第1のデータを前記第2の形式の前記第2のデータに変換し、変換後の前記第2のデータを構成する前記第2の要素の内容と、前記メモリに記憶されている前記検証用データを構成する前記第2の要素とを比較して、不一致の前記第2の要素を示すデータを生成することとする。   The main invention of the present invention for solving the above-mentioned problem is that the first data structured in the first format constituted by a plurality of first elements is converted into a first data constituted by a plurality of second elements. An information processing method for verifying the correctness of a conversion rule in which a relationship between the first element and the second element is defined, which is given when executing a program for converting to second data in the form of 2. And an information processing apparatus comprising a memory, wherein the first data is stored in the memory, and the first data is output when the first data is correctly converted into the second format by the program and the conversion rule. Data for verification assuming second data is stored in the memory, and the first rule is converted into the second format by actually executing the program by giving the conversion rule to be verified. The contents of the second element constituting the second data after conversion to the second data and the second element constituting the verification data stored in the memory are converted into the second data. In comparison, data indicating the mismatched second element is generated.

本発明によれば、構造化データの変換規則の正誤を検証することができる。   According to the present invention, it is possible to verify the correctness of the structured data conversion rule.

以下、本発明の一実施形態に係る情報処理装置100について説明する。本実施形態に係る情報処理装置100は、第1のスキーマにより定義されるXML(eXtensible Markup Language)形式で構造化されたデータ(以下、XMLデータという。)を変換して、第2のスキーマにより定義されるXMLデータを生成するためのプログラムに与える変換規則の正誤を検証する。   Hereinafter, an information processing apparatus 100 according to an embodiment of the present invention will be described. The information processing apparatus 100 according to the present embodiment converts data structured in XML (eXtensible Markup Language) defined by the first schema (hereinafter referred to as XML data) and uses the second schema. The correctness of the conversion rule given to the program for generating the defined XML data is verified.

XMLを定義する第1および第2のスキーマは、XMLの構造(形式)を定義するデータであり、例えば、DTD(Document Type Definition)やXML Schemaにより記述される。なお、以下の説明において第1および第2のスキーマはそれぞれ、変換元スキーマおよび変換先スキーマという。   The first and second schemas that define XML are data that define the structure (format) of XML, and are described by, for example, DTD (Document Type Definition) or XML Schema. In the following description, the first and second schemas are referred to as a conversion source schema and a conversion destination schema, respectively.

XMLデータを変換するプログラムに与える変換規則は、例えば、XSLTやXQueryの形式により記述される。本実施形態では、第1および第2のスキーマは、XML Schemaにより記述され、変換規則はXSLTにより記述されるものとする。XSLTにより記述された変換規則に従ってXMLデータを変換するプログラムはXSLTエンジンと呼ばれる。   A conversion rule given to a program for converting XML data is described in, for example, the format of XSLT or XQuery. In the present embodiment, the first and second schemas are described by XML Schema, and the conversion rules are described by XSLT. A program that converts XML data in accordance with a conversion rule described by XSLT is called an XSLT engine.

本実施形態の情報処理装置100は、予め第1のスキーマ(以下、変換元スキーマという。)により定義されるXMLデータ(以下、変換元データという。本発明の第1のデータに該当する。)と、変換元データを正しく変換した場合に出力されることが想定されるXMLデータ(以下、変換先データという。本発明の検証用データに該当する。)とを記憶しておき、変換規則に従って変換元データをXSLTエンジンにより変換して、XSLTエンジンによる変換結果のデータ(以下、テストデータという。本発明の第2のデータに該当する。)と、予め記憶しておいた変換先データとが一致するかどうかにより、変換規則の正誤を判断する。なお、変換元データを定義する第2のスキーマを以下変換先スキーマという。   The information processing apparatus 100 according to the present embodiment is XML data (hereinafter referred to as conversion source data, which corresponds to the first data of the present invention) defined in advance by a first schema (hereinafter referred to as conversion source schema). And XML data that is assumed to be output when the conversion source data is correctly converted (hereinafter referred to as conversion destination data, which corresponds to the verification data of the present invention) are stored in accordance with the conversion rules. The conversion source data is converted by the XSLT engine, the conversion result data by the XSLT engine (hereinafter referred to as test data, which corresponds to the second data of the present invention), and the conversion destination data stored in advance. Whether the conversion rule is correct or not is determined based on whether or not they match. The second schema defining the conversion source data is hereinafter referred to as a conversion destination schema.

==ハードウェア構成==
図1は情報処理装置100のハードウェア構成を示す図である。同図に示すように、情報処理装置100は、CPU101、メモリ102、ハードディスク103、ビデオメモリ104、表示装置105、入力装置105を備えている。ハードディスク103には、プログラムやデータが格納される。CPU101はハードディスク103に記憶されているプログラムをメモリ102に読み出して実行することにより、各種の機能を実現する。ビデオメモリ104は、情報処理装置100のユーザに表示する情報を書き込むメモリであり、ビデオメモリ104に書き込まれた情報は表示装置105に表示される。入力装置106は、ユーザから情報の入力を受け付ける、例えば、キーボードやマウス、タッチパネルなどである。
== Hardware configuration ==
FIG. 1 is a diagram illustrating a hardware configuration of the information processing apparatus 100. As shown in the figure, the information processing apparatus 100 includes a CPU 101, a memory 102, a hard disk 103, a video memory 104, a display device 105, and an input device 105. The hard disk 103 stores programs and data. The CPU 101 implements various functions by reading a program stored in the hard disk 103 into the memory 102 and executing it. The video memory 104 is a memory for writing information to be displayed to the user of the information processing apparatus 100, and the information written in the video memory 104 is displayed on the display device 105. The input device 106 is, for example, a keyboard, a mouse, a touch panel, or the like that accepts input of information from the user.

==ソフトウェア構成==
図2は情報処理装置100のソフトウェア構成を示す図である。同図に示すように、情報処理装置100は、スキーマ入力部111、パターンデータ入力部112、マッピングデータ入力部113、変換規則生成部114、データ変換部115、データ比較部116、差異表示部117、雛形データ生成部118、および雛形データ表示部119の各機能部と、スキーマ記憶部151、パターンデータ格納テーブル152、変換規則記憶部153、および差異格納テーブル154の各記憶部とを備えている。
== Software configuration ==
FIG. 2 is a diagram illustrating a software configuration of the information processing apparatus 100. As shown in the figure, the information processing apparatus 100 includes a schema input unit 111, a pattern data input unit 112, a mapping data input unit 113, a conversion rule generation unit 114, a data conversion unit 115, a data comparison unit 116, and a difference display unit 117. , A model data generation unit 118 and a model data display unit 119, and a schema storage unit 151, a pattern data storage table 152, a conversion rule storage unit 153, and a difference storage table 154 storage unit. .

なお、上記各機能部111〜119は、情報処理装置100が備えるCPU101がハードディスク103に記憶されているプログラムをメモリ102に読み出して実行することにより実現される。また、上記各記憶部151〜154はメモリ102やハードディスク103により提供される記憶領域として実現される。   Note that each of the functional units 111 to 119 is realized by the CPU 101 included in the information processing apparatus 100 reading out the program stored in the hard disk 103 to the memory 102 and executing the program. The storage units 151 to 154 are realized as storage areas provided by the memory 102 and the hard disk 103.

スキーマ記憶部151は、変換元スキーマおよび変換先スキーマを記憶する。スキーマ記憶部151の構成例を図3に示す。同図に示すように、スキーマ記憶部151には、変換元スキーマと変換先スキーマとが記憶される。   The schema storage unit 151 stores a conversion source schema and a conversion destination schema. A configuration example of the schema storage unit 151 is shown in FIG. As shown in the figure, the schema storage unit 151 stores a conversion source schema and a conversion destination schema.

スキーマ入力部111は、ユーザから変換元スキーマおよび変換先スキーマの入力を受け付け、受け付けた変換元スキーマおよび変換先スキーマをスキーマ記憶部151に記憶する。   The schema input unit 111 receives input of the conversion source schema and the conversion destination schema from the user, and stores the received conversion source schema and conversion destination schema in the schema storage unit 151.

パターンデータ格納テーブル152は、変換元データおよび変換先データを対応付けるレコード(以下、パターンデータという。)を記憶する。図4にパターンデータ格納テーブル152の構成例を示す。同図に示すように、パターンデータ格納テーブル152に格納されるパターンデータには、パターン番号、変換元ファイル、および変換先ファイルが含まれている。パターン番号は、パターンデータの識別情報である。変換元ファイルは、変換元データが格納されたファイルのファイル名である。変換先ファイルは、変換先データが格納されたファイルのファイル名である。   The pattern data storage table 152 stores records (hereinafter referred to as pattern data) that associate conversion source data and conversion destination data. FIG. 4 shows a configuration example of the pattern data storage table 152. As shown in the figure, the pattern data stored in the pattern data storage table 152 includes a pattern number, a conversion source file, and a conversion destination file. The pattern number is identification information of pattern data. The conversion source file is the file name of the file in which the conversion source data is stored. The conversion destination file is the file name of the file in which the conversion destination data is stored.

パターンデータ入力部112は、ユーザから変換元データおよび変換先データの入力を受け付け、受け付けた変換元データおよび変換先データをそれぞれファイルに格納する。パターンデータ入力部112は、変換元データおよび変換先データを格納したファイルのファイル名を含むパターンデータを生成して、生成したパターンデータをパターンデータ格納テーブル152に登録する。   The pattern data input unit 112 receives input of conversion source data and conversion destination data from the user, and stores the received conversion source data and conversion destination data in files. The pattern data input unit 112 generates pattern data including the file name of the file storing the conversion source data and the conversion destination data, and registers the generated pattern data in the pattern data storage table 152.

マッピングデータ入力部113は、変換元スキーマに定義される要素(以下、変換元要素という。本発明の第1の要素に対応する。)と、変換先スキーマに定義される要素(以下、変換先要素という。本発明の第2の要素に対応する。)との対応付けを定義するデータ(以下、マッピングデータという。)の入力を受け付ける。   The mapping data input unit 113 includes an element defined in the conversion source schema (hereinafter referred to as a conversion source element; corresponding to the first element of the present invention) and an element defined in the conversion destination schema (hereinafter referred to as the conversion destination). An input of data defining an association with an element (corresponding to the second element of the present invention) (hereinafter referred to as mapping data) is accepted.

上述したスキーマ入力部111、パターンデータ入力部112、およびマッピング情報入力部113は、図5に示す画面200を介して、変換元スキーマおよび変換先スキーマ、並びに変換元データおよび変換先データ、マッピングデータを受け付ける。図5に示すように、画面200は、マッピングデータの入力欄201、変換元スキーマの入力欄202、変換先スキーマの入力欄203、変換元データの入力欄204、および変換先データの入力欄205を備えている。   The schema input unit 111, the pattern data input unit 112, and the mapping information input unit 113 described above, via the screen 200 shown in FIG. 5, the conversion source schema and the conversion destination schema, the conversion source data, the conversion destination data, and the mapping data Accept. As shown in FIG. 5, the screen 200 includes a mapping data input field 201, a conversion source schema input field 202, a conversion destination schema input field 203, a conversion source data input field 204, and a conversion destination data input field 205. It has.

変換元データの入力欄204および変換先データの入力欄205には、変換元データおよび変換先データがそのまま表示され、ユーザがキーボードなどにより編集可能となっている。なお、パターンデータ入力部112は、ユーザからファイル名の指定を受け付け、指定されたファイル名に対応するファイルに格納されたXMLデータを読み出して、読み出したXMLデータを入力欄204または205に表示するようにしてもよい。   In the conversion source data input field 204 and the conversion destination data input field 205, the conversion source data and the conversion destination data are displayed as they are, and the user can edit them with a keyboard or the like. The pattern data input unit 112 receives a file name specification from the user, reads the XML data stored in the file corresponding to the specified file name, and displays the read XML data in the input field 204 or 205. You may do it.

変換元スキーマの入力欄202および変換先スキーマの入力欄203には、XMLデータのツリー構造が表示される。なお、ユーザがマウスやキーボードなどを操作して、項目の順序や親子関係を編集可能となっていてもよい。入力欄202および203では、XMLデータを構成する全要素が深さ優先順に表示される。なお、スキーマ入力部111は、ユーザからファイル名の指定を受け付けて、指定されたファイル名に対応するファイルに記述されたスキーマを読み出し、読み出したスキーマを解析してXMLデータのツリー構造を入力欄202および203に表示するようにしてもよい。   In the conversion source schema input field 202 and the conversion destination schema input field 203, a tree structure of XML data is displayed. The user may be able to edit the order of items and the parent-child relationship by operating a mouse, a keyboard, or the like. In the input columns 202 and 203, all the elements constituting the XML data are displayed in the depth priority order. The schema input unit 111 receives designation of a file name from the user, reads a schema described in a file corresponding to the designated file name, analyzes the read schema, and inputs a tree structure of XML data. You may make it display on 202 and 203. FIG.

マッピングデータの入力欄201では、ユーザが、マウスの操作により、変換元要素と、変換先要素とを線で結ぶことにより、要素の対応付けを行うことができるようになっている。また、変換元要素と変換先要素とは1対1の対応付け以外にも、1対複数または複数対1の対応付けとするようにしてもよい。この場合、例えば、複数の変換元要素を結合して1つの変換先要素とするなど、分割や結合、繰り返しなどの処理を示すアイコンを、変換元要素と変換先要素とを結ぶ線分上に配置するようにする。例えば、図5の例では、変換元要素の「address」要素と、変換先要素の「employee」要素との間は、要素が繰り返すことを示す「繰り返し」アイコンが配置されており、また、変換元要素の「firstname」要素および「lastname」要素と変換先要素の「name」要素との間には、上記2つの変換元要素を結合することを示す「結合」アイコンが配置されている。   In the mapping data input field 201, the user can associate elements by connecting the conversion source element and the conversion destination element with a line by operating the mouse. In addition to the one-to-one correspondence between the conversion source element and the conversion destination element, one-to-multiple or multiple-to-one association may be used. In this case, for example, an icon indicating processing such as division, combination, or repetition is combined on a line segment connecting the conversion source element and the conversion destination element, such as combining a plurality of conversion source elements into one conversion destination element. Try to arrange. For example, in the example of FIG. 5, a “repeat” icon indicating that the element repeats is arranged between the “address” element of the conversion source element and the “employee” element of the conversion destination element. Between the “firstname” element and “lastname” element of the original element and the “name” element of the conversion destination element, a “combine” icon indicating that the two conversion source elements are combined is arranged.

入力欄201に入力された変換元要素と変換先要素との対応付けのうち、変換元要素の「firstname」および「lastname」を結合して変換先要素の「name」に対応付けられている範囲500を表現するマッピングデータ600の一例を図6に示す。   Of the association between the conversion source element and the conversion destination element input in the input field 201, the range associated with the conversion source element “name” by combining the conversion source elements “firstname” and “lastname” An example of mapping data 600 representing 500 is shown in FIG.

範囲500には、変換元要素として「firstname」要素501および「lastname」要素502が含まれており、変換先要素として「name」要素503が含まれている。また、「firstname」要素501および「lastname」要素502は「結合」処理504と線分505および線分506で結ばれており、また「結合」処理504は変換先要素の「name」要素503と線分507で結ばれている。   The range 500 includes a “firstname” element 501 and a “lastname” element 502 as conversion source elements, and a “name” element 503 as a conversion destination element. The “firstname” element 501 and the “lastname” element 502 are connected to the “join” process 504 by the line segment 505 and the line segment 506, and the “join” process 504 is connected to the “name” element 503 of the conversion destination element. They are connected by a line segment 507.

上記のような範囲500に含まれる変換元要素と変換先要素との対応付けは、マッピングデータ600では「コネクタ」オブジェクトとして表現される。   The association between the conversion source element and the conversion destination element included in the range 500 as described above is expressed as a “connector” object in the mapping data 600.

マッピングデータ600に含まれる各オブジェクトは、他のオブジェクトへの参照を格納する領域(以下、参照保持領域という。)を入力側および出力側の2つ備えている。   Each object included in the mapping data 600 includes two areas for storing references to other objects (hereinafter referred to as reference holding areas) on the input side and the output side.

図6の例では、範囲500に対応するマッピングデータ600には、変換元要素を表現するオブジェクト601および602と、変換先要素を表現するオブジェクト603と、処理を表現するオブジェクト604と、変換元要素と処理とを対応付ける線分505および506並びに処理と変換先要素とを対応付ける線分507を表現するオブジェクト605〜607とが含まれている。「firstname」オブジェクト601には、出力側の参照保持領域に「コネクタ」オブジェクト605への参照が格納され、「lastname」オブジェクト602には、出力側の参照保持領域に「コネクタ」オブジェクト606への参照が格納される。「コネクタ」オブジェクト605には、入力側の参照保持領域に「firstname」オブジェクト601への参照が格納され、出力側の参照保持領域に「結合」オブジェクト604への参照が格納される。「結合」オブジェクト604には、入力側の参照保持領域に「コネクタ」オブジェクト605および606のそれぞれへの参照が格納され、出力側の参照保持領域には「コネクタ」オブジェクト607への参照が格納される。「name」オブジェクト603には、入力側の参照保持領域に「コネクタ」オブジェクト607への参照が格納され、「コネクタ」オブジェクト607には、入力側の参照保持領域に「結合」オブジェクト604への参照が格納され、出力側の参照保持領域に「name」オブジェクト603への参照が格納される。   In the example of FIG. 6, the mapping data 600 corresponding to the range 500 includes objects 601 and 602 that represent conversion source elements, an object 603 that represents a conversion destination element, an object 604 that represents processing, and a conversion source element. And line segments 505 and 506 for associating the process with each other and objects 605 to 607 representing the line segment 507 for associating the process with the conversion destination element. The “firstname” object 601 stores a reference to the “connector” object 605 in the output-side reference holding area, and the “lastname” object 602 stores a reference to the “connector” object 606 in the output-side reference holding area. Is stored. In the “connector” object 605, a reference to the “firstname” object 601 is stored in the reference holding area on the input side, and a reference to the “join” object 604 is stored in the reference holding area on the output side. In the “join” object 604, references to the “connector” objects 605 and 606 are stored in the reference holding area on the input side, and a reference to the “connector” object 607 is stored in the reference holding area on the output side. The In the “name” object 603, a reference to the “connector” object 607 is stored in the reference holding area on the input side, and in the “connector” object 607, a reference to the “join” object 604 is stored in the reference holding area on the input side. And a reference to the “name” object 603 is stored in the reference holding area on the output side.

マッピングデータ入力部113は、変換元要素と変換先要素との対応付けの入力を受け付け、受け付けた変換元要素と変換先要素との対応付けを、上記のようなマッピングデータ600としてメモリに記憶する。また、マッピングデータ入力部113は、XSLTで記述された変換規則を受け付け、受け付けた変換規則からマッピングデータ600を生成し、生成したマッピングデータ600に基づいて入力欄201に線分やアイコンを表示することもできる。この場合、マッピングデータ入力部113は、生成したマッピングデータ600に含まれるオブジェクトのうち、変換元要素に対応するオブジェクト(図6の例では、「firstname」オブジェクト601および「lastname」オブジェクト602である。)の出力側の参照保持領域に格納されている「コネクタ」オブジェクトへの参照を取得し、取得した参照が示す「コネクタ」オブジェクトの出力側の参照保持領域に格納されている、各種の処理に対応するオブジェクト(図6の例では「結合」オブジェクト604である。)、または変換先要素に対応するオブジェクト(図6の例では「name」オブジェクト603である。)への参照を取得して、変換元要素と、取得した参照が示すオブジェクトに対応する処理または変換先要素との対応付けを、入力欄201に線分で表示するようにする。   The mapping data input unit 113 receives input of association between the conversion source element and the conversion destination element, and stores the received association between the conversion source element and the conversion destination element in the memory as the mapping data 600 as described above. . Also, the mapping data input unit 113 receives a conversion rule described in XSLT, generates mapping data 600 from the received conversion rule, and displays a line segment or an icon in the input field 201 based on the generated mapping data 600. You can also. In this case, the mapping data input unit 113 is an object corresponding to the conversion source element among the objects included in the generated mapping data 600 (in the example of FIG. 6, the “firstname” object 601 and the “lastname” object 602). ) To obtain the reference to the “connector” object stored in the reference holding area on the output side, and to perform various processing stored in the reference holding area on the output side of the “connector” object indicated by the acquired reference A reference to a corresponding object (in the example of FIG. 6, a “join” object 604) or an object corresponding to the conversion destination element (in the example of FIG. 6, a “name” object 603) is acquired, Enter the correspondence between the conversion source element and the process or conversion destination element corresponding to the object indicated by the acquired reference. To be displayed by line segments in the column 201.

変換規則生成部114は、マッピングデータ600に基づいてXSLで記述された変換規則701を生成し、生成した変換規則701を変換規則記憶部153に記憶する。図7は、図6に示したマッピングデータ600に基づいて生成された変換規則701の一例を示す図である。図7に示すように、変換規則701では、変換元要素毎にテンプレート「<xsl:template name="〜">」を記述し、変換元要素に子の要素がある場合、その子要素を作成するテンプレートの呼び出し「<xsl:call-template name="〜"/>」を記述している。各テンプレートでは、変換先要素を出力するように「<xsl:element name="〜"」を記述し、変換先要素の内容として、変換元要素の内容を出力するように「<xsl:value-of select="〜"/>」を記述している。変換規則701では、変換元要素は、XPathによる表現で指定される。なお、上述した範囲500は、図7の例では、「func_name」テンプレートとして表現されており、結合処理は、「firstname」要素と、空白文字と、「lastname」要素とを結合する「concat」関数として、「<xsl:value-of select="〜"/>」の引数に記述されている。   The conversion rule generation unit 114 generates a conversion rule 701 described in XSL based on the mapping data 600, and stores the generated conversion rule 701 in the conversion rule storage unit 153. FIG. 7 is a diagram illustrating an example of the conversion rule 701 generated based on the mapping data 600 illustrated in FIG. As shown in FIG. 7, in the conversion rule 701, a template “<xsl: template name =” to “>” is described for each conversion source element, and if the conversion source element has a child element, the child element is created. Template call "<xsl: call-template name =" ~ "/>" is described. In each template, describe "<xsl: element name =" ~ "" to output the conversion destination element, and output the contents of the conversion source element as <xsl: value- of select = "~" /> "is described. In the conversion rule 701, the conversion source element is specified by an expression in XPath. Note that the range 500 described above is expressed as a “func_name” template in the example of FIG. 7, and the concatenation process is a “concat” function that combines the “firstname” element, the blank character, and the “lastname” element. Is described in the argument of “<xsl: value-of select =” to “/>”.

データ変換部115は、パターンデータ格納テーブル152に記憶されているパターンデータのそれぞれについて、変換元ファイルが示すファイルから変換元データを読み出し、読み出した変換元データと、上記変換規則生成部114が生成した変換規則とを与えてXSLTエンジンを起動することにより、変換元データを上記の変換規則に従って変換したXMLデータ(以下、テストデータという。本発明の変換データに該当する。)を生成する。   The data conversion unit 115 reads the conversion source data from the file indicated by the conversion source file for each of the pattern data stored in the pattern data storage table 152, and the conversion rule generation unit 114 generates the read conversion source data. By starting the XSLT engine by giving the conversion rule, XML data obtained by converting the conversion source data according to the conversion rule (hereinafter referred to as test data, which corresponds to the conversion data of the present invention) is generated.

データ比較部116は、データ変換部115が生成したテストデータの要素と、上記のパターンデータに含まれる変換先データの要素とを比較する。テストデータの要素と変換先データの要素とが一致しない場合、データ比較部116は、一致しない要素についての差異を示すデータ(以下、差異データという。)を生成し、生成した差異データを差異格納テーブル154に登録する。なお、データ比較部116による比較処理の詳細については後述する。   The data comparison unit 116 compares the element of the test data generated by the data conversion unit 115 with the element of the conversion destination data included in the pattern data. When the elements of the test data and the elements of the conversion destination data do not match, the data comparison unit 116 generates data indicating the difference regarding the mismatched elements (hereinafter referred to as difference data), and stores the generated difference data as differences. Register in table 154. Details of the comparison processing by the data comparison unit 116 will be described later.

差異格納テーブル154の構成例を図8に示す。同図に示すように、差異格納テーブル154に記憶される差異データは、テストデータの要素と一致しなかった変換先要素を示すXPath、上記パターンデータのパターン番号、期待データ、実データ、説明を含んでいる。期待データには変換先要素の内容が設定され、実データには、一致しなかったテストデータの要素の内容が設定される。説明には、差異についての説明が設定される。本実施形態では、要素のタイプが異なる場合に「タイプが違う」、要素の内容が異なる場合に「値が違う」、要素の要素名が異なる場合に「タグ名が違う」、要素の属性が異なる場合に「属性が違う」が設定される。   A configuration example of the difference storage table 154 is shown in FIG. As shown in the figure, the difference data stored in the difference storage table 154 includes an XPath indicating a conversion destination element that does not match the element of the test data, a pattern number of the pattern data, expected data, actual data, and an explanation. Contains. The content of the conversion destination element is set in the expected data, and the content of the test data element that does not match is set in the actual data. In the description, an explanation about the difference is set. In this embodiment, when the element type is different, the type is different, when the content of the element is different, the value is different, when the element name is different, the tag name is different, and the element attribute is “Different attributes” is set when they are different.

差異表示部117は、差異格納テーブル154に記憶される差異データに基づいて、変換先データとテストデータとの差異点を表示装置105に表示する。差異表示部117による差異点の表示処理についての詳細は後述する。   The difference display unit 117 displays the difference between the conversion destination data and the test data on the display device 105 based on the difference data stored in the difference storage table 154. Details of the difference display processing by the difference display unit 117 will be described later.

雛形データ生成部118は、スキーマに基づいてXMLデータの雛形を生成する。雛形データ生成部118は、変換元スキーマや変換先スキーマに定義されている全要素について、内容を空にしたタグを記述したXMLデータを生成することにより、変換元データや変換先データの雛形を生成する。なお、雛形データ生成部118によるXMLデータの雛形生成処理の詳細については後述する。   The template data generation unit 118 generates a template of XML data based on the schema. The template data generation unit 118 generates XML data describing tags with empty contents for all elements defined in the conversion source schema and the conversion destination schema, thereby generating the template of the conversion source data and the conversion destination data. Generate. Details of the XML data template generation processing by the template data generation unit 118 will be described later.

雛形データ表示部119は、雛形データ生成部118が生成したXMLデータの雛形を表示装置105に表示する。雛形データ表示部119は、例えば、上述した画面200において、変換元データの雛形を入力欄204に表示し、変換先データの雛形を入力欄205に表示して、ユーザがXMLデータを編集できるようにする。   The template data display unit 119 displays a template of XML data generated by the template data generation unit 118 on the display device 105. For example, the template data display unit 119 displays the template of the conversion source data in the input column 204 and the template of the conversion destination data in the input column 205 on the above-described screen 200 so that the user can edit the XML data. To.

以下、本実施形態の情報処理装置100による処理について説明する。   Hereinafter, processing by the information processing apparatus 100 of the present embodiment will be described.

==検証処理==
上述したように、情報処理装置100は変換元データと変換規則とをXSLTエンジンに与えて変換元データを変換したテストデータを生成し、生成したテストデータと変換先データとを比較することにより、変換規則の正誤を検証する。テストデータと変換先データとが一致しない場合には、情報処理装置100は、差異点を表示することにより、ユーザが変換規則などの修正を支援するようにしている。
== Verification process ==
As described above, the information processing apparatus 100 generates the test data obtained by converting the conversion source data by giving the conversion source data and the conversion rule to the XSLT engine, and compares the generated test data with the conversion destination data. Verify correctness of conversion rules. When the test data and the conversion destination data do not match, the information processing apparatus 100 displays a difference to assist the user in correcting the conversion rule or the like.

図9は、本実施形態の情報処理装置100における変換規則の検証処理の流れを示すPAD図である。なお、図9に示す処理は、例えば、上述した図5の画面200にボタンを配置し、ユーザがそのボタンが押下したときに実行したり、マッピングデータが変更されたときに実行したり、所定の時間間隔で定期的に実行したりするようにする。   FIG. 9 is a PAD diagram showing the flow of conversion rule verification processing in the information processing apparatus 100 of this embodiment. The process shown in FIG. 9 is performed, for example, by placing a button on the above-described screen 200 in FIG. 5 and when the user presses the button, or when the mapping data is changed. To be executed regularly at regular time intervals.

変換規則生成部114がマッピングデータ600に基づいて変換規則を生成し(S1001)、パターンデータ格納テーブル152に格納されているパターンデータのそれぞれについて以下の処理が行われる(S1002)。データ変換部115は、パターンデータに含まれている変換元データと、変換規則生成部114が生成した変換規則とを与えてXSLTエンジンを実行することにより、変換元データを変換したテストデータを生成するデータ変換処理を行う(S1003)。データ比較部116は、後述するデータ比較処理を行う(S1004)。上記の処理が全パターンデータについて行われ、テストデータと変換先データとの間で差異があった場合、すなわち差異格納テーブル154に差異データが登録されている場合には(S1005:真)、差異表示部117が後述する差異の表示処理を行う(S1006)。   The conversion rule generation unit 114 generates a conversion rule based on the mapping data 600 (S1001), and the following processing is performed for each of the pattern data stored in the pattern data storage table 152 (S1002). The data conversion unit 115 generates test data obtained by converting the conversion source data by executing the XSLT engine by giving the conversion source data included in the pattern data and the conversion rule generated by the conversion rule generation unit 114 Data conversion processing is performed (S1003). The data comparison unit 116 performs data comparison processing described later (S1004). If the above processing is performed for all pattern data and there is a difference between the test data and the conversion destination data, that is, if difference data is registered in the difference storage table 154 (S1005: true), the difference The display unit 117 performs a difference display process described later (S1006).

==データ比較==
図10は、データ比較処理の流れを示すPAD図である。
データ比較部116は、変換元データおよびテストデータのそれぞれを、DOM(Document Object Model)の規約に従ってアクセス可能なデータ(以下、DOMデータという。)に変換する(S1101)。なお、XMLデータをDOMデータに変換する処理には公知の変換処理を用いることができる。データ比較部116は、変換元データを変換したDOMデータ(以下、変換元DOMデータという。)と、テストデータを変換したDOMデータ(以下、テストDOMデータという。)とについて、図11に示すノード比較処理を行う(S1102)。
== Data comparison ==
FIG. 10 is a PAD showing the flow of data comparison processing.
The data comparison unit 116 converts each of the conversion source data and the test data into accessible data (hereinafter referred to as DOM data) in accordance with DOM (Document Object Model) rules (S1101). In addition, a well-known conversion process can be used for the process which converts XML data into DOM data. The data comparison unit 116 has the nodes shown in FIG. 11 for the DOM data obtained by converting the conversion source data (hereinafter referred to as conversion source DOM data) and the DOM data obtained by converting the test data (hereinafter referred to as test DOM data). A comparison process is performed (S1102).

データ比較部116は、変換元DOMデータおよびテストDOMデータのそれぞれから、ノードをひとつ取り出し、変換元DOMデータから取り出したノード(以下、変換元ノードという。)と、テストDOMデータから取り出したノード(以下、テストノードという。)のタイプを比較する(S1201)。ここでノードのタイプとしては、ドキュメントノード、エレメントノード、およびテキストノードがある。ドキュメントノードは、DOMデータ全体を表すノードであり、DOMデータのルートとなる。ドキュメントノードの子としてエレメントノードなどが設定される。エレメントノードは、XMLデータの要素または要素の属性を示すノードであり、要素名や属性名に対応するノード名を有する。テキストノードは、要素または属性の内容を示すノードであり、文字列の値を有する。   The data comparison unit 116 extracts one node from each of the conversion source DOM data and the test DOM data, and extracts a node from the conversion source DOM data (hereinafter referred to as a conversion source node) and a node extracted from the test DOM data ( The types of test nodes are compared (S1201). Here, the node type includes a document node, an element node, and a text node. The document node is a node that represents the entire DOM data, and serves as a root of the DOM data. An element node or the like is set as a child of the document node. The element node is a node indicating an element of XML data or an attribute of the element, and has a node name corresponding to the element name or attribute name. The text node is a node indicating the content of an element or attribute, and has a character string value.

ノードのタイプが異なる場合(S1202:真)、データ比較部116は、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、期待データが変換元ノードのノード名であり、実データがテストノードのノード名であり、説明が「タイプが違う」である差異データを生成し、生成した差異データを差異格納テーブル154に登録する(S1203)。   When the node types are different (S1202: true), the data comparison unit 116 indicates that the XPath is the XPath indicating the transformation source node, the pattern number is the pattern number of the pattern data, and the expected data is the node name of the transformation source node. Difference data whose actual data is the node name of the test node and whose description is “different type” is generated, and the generated difference data is registered in the difference storage table 154 (S1203).

一方、ノードのタイプが同一であれば(S1202:偽)、データ比較部116は、ノードのタイプがドキュメントノードまたはエレメントノードであるかどうかを調べ(S1204)、ノードのタイプがドキュメントノードまたはエレメントノードであるときは(S1204:真)、(S1205)に進む。   On the other hand, if the node types are the same (S1202: false), the data comparison unit 116 checks whether the node type is a document node or an element node (S1204), and the node type is a document node or element node. If (S1204: true), the process proceeds to (S1205).

ここでノードのタイプがエレメントノードである場合(S1205:真)、データ比較部116は、変換元ノードのノード名とテストノードのノード名とを比較し(S1206)、ノード名が異なる場合(S1207:真)、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、期待データが変換元ノードのノード名であり、実データがテストノードのノード名であり、説明が「タグ名が違う」である差異データを生成し、生成した差異データを差異格納テーブル154に登録する(S1208)。データ比較部116は、変換元ノードに設定されている属性と、テストノードに設定されている属性とを比較して(S1209)、属性の名称または内容が異なる場合には(S1210:真)、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、説明が「属性が違う」である差異データを生成し、生成した差異データの期待データに、変換元ノードのノード名と、変換元ノードの属性の属性名および内容とを含む文字列を設定し、差異データの実データに、テストノードのノード名と、テストノードの属性の属性名および内容とを含む文字列を設定して、差異格納テーブル154に登録する(S1211)。   If the node type is an element node (S1205: true), the data comparison unit 116 compares the node name of the conversion source node with the node name of the test node (S1206), and if the node names are different (S1207). : True), XPath is the XPath indicating the transformation source node, the pattern number is the pattern number of the pattern data, the expected data is the node name of the transformation source node, the actual data is the node name of the test node, Difference data whose description is “tag name is different” is generated, and the generated difference data is registered in the difference storage table 154 (S1208). The data comparison unit 116 compares the attribute set in the conversion source node with the attribute set in the test node (S1209), and if the attribute name or content is different (S1210: true), XPath is the XPath indicating the transformation source node, the pattern number is the pattern number of the pattern data, and the difference data having the description “different attribute” is generated, and the expected data of the generated difference data is added to the transformation source node Set a character string that includes the node name of the node and the attribute name and content of the attribute of the transformation source node, and the actual data of the difference data includes the node name of the test node and the attribute name and content of the attribute of the test node A character string is set and registered in the difference storage table 154 (S1211).

次に、データ比較部116は、ノードの子となるノードの数(以下、子ノード数という。)を変換元DOMデータおよびテストDOMデータのそれぞれから取得し(S1212)、取得した子ノード数が異なる場合には(S1213:真)、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、期待データが変換元ノードのノード名であり、実データがテストノードのノード名であり、説明が「子要素の数が違う」である差異データを生成し、生成した差異データを差異格納テーブル154に登録する(S1214)。
子ノード数が1以上であれば(S1215:真)、変換元ノードの子となるノードのそれぞれについて(S1216)、ノード比較処理を再帰的に行う(S1217)。
Next, the data comparison unit 116 acquires the number of nodes that are children of the node (hereinafter referred to as the number of child nodes) from each of the conversion source DOM data and the test DOM data (S1212), and the acquired number of child nodes is If they are different (S1213: true), XPath is the XPath indicating the transformation source node, the pattern number is the pattern number of the pattern data, the expected data is the node name of the transformation source node, and the actual data is the test node. The difference data having the description “the number of child elements is different” is generated, and the generated difference data is registered in the difference storage table 154 (S1214).
If the number of child nodes is 1 or more (S1215: true), node comparison processing is recursively performed for each node that is a child of the transformation source node (S1216) (S1217).

一方、ノードのタイプがドキュメントノードでもエレメントノードでもない場合に(S1204:偽)、ノードのタイプがテキストノードであれば(S1218:真)、データ比較部116は、変換元ノードの値と、テストノードの値とを比較し(S1219)、値が異なる場合には(S1220:真)、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、期待データが変換元ノードの値であり、実データがテストノードの値であり、説明が「内容が違う」である差異データを生成し、生成した差異データを差異格納テーブル154に登録する(S1221)。   On the other hand, if the node type is neither a document node nor an element node (S1204: false), and if the node type is a text node (S1218: true), the data comparison unit 116 determines the value of the conversion source node and the test. The node value is compared (S1219). If the values are different (S1220: true), XPath is the XPath indicating the conversion source node, the pattern number is the pattern number of the pattern data, and the expected data is converted. Difference data that is the value of the original node, the actual data is the value of the test node, and the description is “differing in content” is generated, and the generated difference data is registered in the difference storage table 154 (S1221).

==差異表示処理==
図12は、差異の表示処理の流れを示すPAD図である。
差異表示部117は、パターンデータ格納テーブル152に記憶されている各パターンデータについて(S1301)、パターンデータのパターン番号と一致するパターン番号が設定された差異データが差異格納テーブル154に登録されていれば(S1302:真)、パターンデータの変換元ファイルおよび変換先ファイルと「×」とを画面200に表示し(S1303)、上記の差異データが差異格納テーブル154に登録されていなければ(S1302:偽)、パターンデータの変換元ファイルおよび変換先ファイルと「○」とを画面200に表示する(S1304)。
== Difference display processing ==
FIG. 12 is a PAD showing the flow of the difference display process.
For each pattern data stored in the pattern data storage table 152 (S1301), the difference display unit 117 registers the difference data in which the pattern number matching the pattern number of the pattern data is set in the difference storage table 154. If the difference data is not registered in the difference storage table 154 (S1302: true), the pattern data conversion source file and the conversion destination file and “x” are displayed on the screen 200 (S1303). If false, the pattern data conversion source file and the conversion destination file and “◯” are displayed on the screen 200 (S1304).

次に差異表示部117は、差異格納テーブル154に記憶されている差異データのそれぞれについて(S1305)、変換先スキーマにより定義される要素のうち、差異データのXPathに対応するものを特定し、画面200において、特定した要素の要素名に「×」のアイコンを表示する(S1306)。また、差異表示部117は、差異データの説明、期待データ、実データ、およびXPathを画面200に表示する。   Next, for each difference data stored in the difference storage table 154 (S1305), the difference display unit 117 identifies the element corresponding to the XPath of the difference data from the elements defined by the conversion destination schema, and displays the screen. In 200, an “x” icon is displayed in the element name of the identified element (S1306). Further, the difference display unit 117 displays the explanation of the difference data, the expected data, the actual data, and the XPath on the screen 200.

差異表示部117により表示される画面200の一例を図13に示す。同図に示すように、画面200は、パターンデータ毎に変換元ファイルおよび変換先ファイルを表示するリスト表示欄401と、エラーメッセージなどを表示する情報表示欄402とを備えている。図13の例では、リスト表示欄401には、3つのパターンデータについて、「○」または「×」とともに、変換元ファイルおよび変換先ファイルが表示されている。「×」が表示されている行では、パターン番号「2」のパターンデータについて、変換元データが予定通りに変換されず、差異データが登録されたことを示している。また、差異データの期待データ、実データ、およびXPathは情報表示欄402に表示されている。   An example of the screen 200 displayed by the difference display unit 117 is shown in FIG. As shown in the figure, the screen 200 includes a list display column 401 that displays a conversion source file and a conversion destination file for each pattern data, and an information display column 402 that displays an error message and the like. In the example of FIG. 13, the conversion source file and the conversion destination file are displayed in the list display column 401 along with “◯” or “×” for the three pattern data. The row where “x” is displayed indicates that the conversion source data is not converted as scheduled for the pattern data of the pattern number “2” and the difference data is registered. Further, the expected data, the actual data, and the XPath of the difference data are displayed in the information display column 402.

また、変換先スキーマにより定義される変換先データの各要素のうち、差異データのXPathにより示されるものについては、「×」のアイコン403が表示されている。   Among the elements of the conversion destination data defined by the conversion destination schema, “x” icons 403 are displayed for the elements indicated by the XPath of the difference data.

なお、リスト表示欄401では、入力欄204および入力欄205に表示されているXMLデータが格納されたファイルを示す行をハイライト表示するようにしてもよい。   In the list display field 401, a line indicating a file storing the XML data displayed in the input field 204 and the input field 205 may be highlighted.

また、データの検証処理を行っている間は画面200の各入力欄を編集不能とし、差異データが登録された場合には各入力欄を再度編集可能とするようにしてもよい。また、差異データが登録された場合には、変換元スキーマ、変換元データ、変換先スキーマ、変換先データ、変換規則の何れかに問題があることが多いので、ユーザが再度編集を行うように促すメッセージを出力するようにしてもよい。   Further, each input field on the screen 200 may be made uneditable while the data verification process is being performed, and each input field may be made editable again when difference data is registered. In addition, when difference data is registered, there is often a problem with any of the conversion source schema, conversion source data, conversion destination schema, conversion destination data, and conversion rules, so that the user can edit again. A prompt message may be output.

==効果==
以上説明したように、本実施形態の情報処理装置100によれば、ユーザから入力された変換規則に従って変換元データを変換したテストデータと、変換先データとを比較し、その差異を出力することができる。したがって、ユーザは変換規則が想定通りの変換処理を規定しているかどうかを容易に判断することが可能となり、変換規則の検証を容易に行うことができる。
== Effect ==
As described above, according to the information processing apparatus 100 of the present embodiment, the test data obtained by converting the conversion source data according to the conversion rule input by the user is compared with the conversion destination data, and the difference is output. Can do. Therefore, the user can easily determine whether or not the conversion rule defines the expected conversion process, and the conversion rule can be easily verified.

また、本実施形態の情報処理装置100では、複数のパターンデータを予めパターンデータ格納テーブル152に登録しておくことができるので、多様なXMLデータについて変換規則の検証を行うことができる。したがって、変換規則の検証精度を向上することができる。また、情報処理装置100は、複数のパターンデータについての検証処理を一括して行うので、変換規則の検証を効率的に行うことができる。   In the information processing apparatus 100 according to the present embodiment, a plurality of pattern data can be registered in the pattern data storage table 152 in advance, so that conversion rules can be verified for various XML data. Therefore, the conversion rule verification accuracy can be improved. Further, since the information processing apparatus 100 collectively performs verification processing for a plurality of pattern data, the conversion rule can be efficiently verified.

また、ユーザが変換規則に新たな変換定義を追加した場合には、追加した変換定義に係る検証を行うためのパターンデータを追加することも可能となるが、それ以前のパターンデータについても検証処理が行われるので、変換規則を変更したことにより他の変換処理に影響が起きる、いわゆるデグレードが発生することを防止することができる。   In addition, when the user adds a new conversion definition to the conversion rule, it is possible to add pattern data for verification related to the added conversion definition. Therefore, it is possible to prevent so-called degradation, in which other conversion processing is affected by changing the conversion rule.

==修正候補の表示==
なお、差異表示部117は、差異データのXPathが示す変換先要素の内容と一致する内容の変換元要素を変換元データから検索し、検索した変換元要素と、差異データのXPathが示す変換先要素との対応付けを、修正候補として表示することもできる。修正候補の表示処理の流れを図14に示す。
== Display of correction candidates ==
The difference display unit 117 searches the conversion source data for the conversion source element having the content that matches the content of the conversion destination element indicated by the XPath of the difference data, and converts the searched conversion source element and the conversion destination indicated by the XPath of the difference data. The association with the element can also be displayed as a correction candidate. FIG. 14 shows the flow of correction candidate display processing.

差異表示部117は、差異格納テーブル154に記憶されている差異データのうち、説明が「値が違う」であるもののそれぞれについて以下の処理を行う(S1401)。
差異表示部117は、変換先データから、差異データのXPathが示す変換先要素の内容を取得し(S1402)、変換元データを構成する全変換元要素について(S1403)、変換元データから変換元要素の内容を取得し(S1404)、変換先要素の内容が変換元要素の内容と一致する場合(S1405:真)、変換先要素と変換元要素との対応付けを修正候補として画面200に表示する(S1406)。
The difference display unit 117 performs the following processing for each of the difference data stored in the difference storage table 154 and whose description is “different value” (S1401).
The difference display unit 117 acquires the contents of the conversion destination element indicated by the XPath of the difference data from the conversion destination data (S1402), all the conversion source elements constituting the conversion source data (S1403), and converts the conversion source data into the conversion source. The content of the element is acquired (S1404), and when the content of the conversion destination element matches the content of the conversion source element (S1405: true), the correspondence between the conversion destination element and the conversion source element is displayed on the screen 200 as a correction candidate. (S1406).

修正候補が表示された画面200の一例を図15に示す。同図の例では、変換元要素の「email」を変換先要素の「birthday」に変換し、変換元要素の「birthday」を変換先要素の「email」に変換するような対応付けが作成されている。ここで、差異表示部117が変換先要素と変換元要素との対応付け候補を点線411で表示している。   An example of a screen 200 on which correction candidates are displayed is shown in FIG. In the example in the figure, a correspondence is created that converts the source element “email” to the destination element “birthday” and the source element “birthday” to the destination element “email”. ing. Here, the difference display unit 117 displays a correspondence candidate between the conversion destination element and the conversion source element with a dotted line 411.

上記のようにして、本実施形態の情報処理装置100は、テストデータと変換先データとが一致しない場合には、内容が一致する変換元要素と変換先要素との対応付けを表示することができる。したがって、ユーザは、間違った対応付けを入力した場合にも、修正候補の表示を参考に対応付けを修正することができる。よって、変換規則の修正を効率的に行うことができる。   As described above, when the test data and the conversion destination data do not match, the information processing apparatus 100 according to the present embodiment can display the correspondence between the conversion source element and the conversion destination element having the same content. it can. Therefore, even when the user inputs an incorrect association, the user can correct the association with reference to the correction candidate display. Therefore, the conversion rule can be corrected efficiently.

なお、上記のように修正候補を表示する場合、上述したマッピングデータ600では、修正候補の点線411を示すオブジェクトを含むようにし、修正候補の点線411の入力側の参照保持領域には、上記の変換元要素に対応するオブジェクトへの参照が格納され、出力側の参照保持領域には、上記の変換先要素に対応するオブジェクトへの参照が格納される。また、変換元要素や変換先要素に対応するオブジェクトには、上記の点線に対応するオブジェクトへの参照を格納する参照保持領域(以下、修正用参照保持領域という。)を備えるようにする。   When the correction candidates are displayed as described above, the mapping data 600 described above includes an object indicating the correction candidate dotted line 411, and the reference holding area on the input side of the correction candidate dotted line 411 includes A reference to the object corresponding to the conversion source element is stored, and the reference to the object corresponding to the conversion destination element is stored in the reference holding area on the output side. The object corresponding to the conversion source element and the conversion destination element is provided with a reference holding area (hereinafter referred to as a correction reference holding area) for storing a reference to the object corresponding to the dotted line.

==ユーザのデータ入力支援==
本実施形態では、変換元データや変換先データ、マッピングデータはそれぞれユーザから入力されることを想定しているが、本実施形態の情報処理装置100では、変換元データや変換先データの雛形を生成し、また変換元データの要素の内容と一致する変換先データの要素を表示することにより、ユーザによる変換元データや変換先データ、マッピングデータの作成の手間を削減するようにしている。以下、これらの処理について説明する。
== User data input support ==
In this embodiment, it is assumed that conversion source data, conversion destination data, and mapping data are each input from a user. However, in the information processing apparatus 100 of this embodiment, a template of conversion source data and conversion destination data is used. By generating and displaying the element of the conversion destination data that matches the content of the element of the conversion source data, it is possible to reduce the trouble of creating the conversion source data, the conversion destination data, and the mapping data by the user. Hereinafter, these processes will be described.

==変換元データおよび変換先データの雛形の出力==
図16は、変換元データおよび変換先データの雛形生成処理の流れを示すPAD図である。雛形データ生成部118は、新規に変換元データおよび変換先データを生成し(S1501)、変換元スキーマに定義されている全要素について(S1502)、「<要素名></要素名>」となるように記述した、空の内容を持つ要素を示すタグを生成し、生成したタグを変換元データに追加する(S1503)。同様に、雛形データ生成部118は、変換先スキーマに定義されている全要素について(S1504)、「<要素名></要素名>」となるように、空の内容を持つ要素を示すタグを生成し、生成したタグを変換先データに追加する(S1505)。
== Output of conversion source data and conversion destination data template ==
FIG. 16 is a PAD diagram showing the flow of template generation processing of conversion source data and conversion destination data. The template data generation unit 118 newly generates conversion source data and conversion destination data (S1501), and for all elements defined in the conversion source schema (S1502), "<element name></ element name>" A tag indicating an element having an empty content is generated, and the generated tag is added to the conversion source data (S1503). Similarly, the template data generation unit 118 tags all elements defined in the conversion destination schema (S1504) to indicate elements having empty contents so as to be “<element name></ element name>”. And the generated tag is added to the conversion destination data (S1505).

上記のようにして、変換元スキーマおよび変換先スキーマに基づいて空の内容の要素が記述された変換元データおよび変換先データの雛形が生成される。生成された変換元データおよび変換先データは、雛形データ表示部119により、上述した図5に示す画面200の入力欄204および入力欄205に表示され、ユーザが編集可能となる。これにより、ユーザがタグを入力する手間を軽減することが可能となり便利である。   As described above, a template of conversion source data and conversion destination data in which elements having empty contents are described is generated based on the conversion source schema and the conversion destination schema. The generated conversion source data and conversion destination data are displayed in the input field 204 and the input field 205 of the screen 200 shown in FIG. 5 by the template data display unit 119, and can be edited by the user. Thereby, it is possible to reduce the time and effort for the user to input the tag, which is convenient.

ここで、雛形データ生成部118は、要素の型に応じたデフォルト値を生成して、要素の内容とすることもできる。要素の型に応じたデフォルト値を設定する雛形生成処理の流れを図17に示す。   Here, the template data generation unit 118 can generate a default value corresponding to the type of the element and use it as the content of the element. FIG. 17 shows a flow of template generation processing for setting a default value according to the element type.

雛形データ生成部118は、新規に変換元データおよび変換先データを生成し(S1601)、カウンタを1にする(S1602)。雛形データ生成部118は、変換元スキーマに定義されている全要素について以下の処理を行う(S1603)。   The template data generation unit 118 newly generates conversion source data and conversion destination data (S1601), and sets the counter to 1 (S1602). The template data generation unit 118 performs the following processing for all elements defined in the conversion source schema (S1603).

雛形データ生成部118は、変換元スキーマから要素の型を取得し(S1604)、取得した要素の型が数値型である場合(S1605:真)には、カウンタを8桁の数値として「<要素名>8桁の数値</要素名>」となるように記述したタグを生成し、生成したタグを変換元データに追加する(S1606)。要素の型が数値型でない場合には(S1605:偽)、雛形データ生成部118は、カウンタを3桁の数値として「<要素名>str3桁の数値</要素名>」となるように記述したタグを生成し、生成したタグを変換元データに追加し(S1607)、カウンタをインクリメントする(S1608)。   The template data generation unit 118 acquires the element type from the conversion source schema (S1604), and if the acquired element type is a numerical type (S1605: true), the counter is set to an 8-digit numerical value “<element A tag described so that “name> 8-digit numerical value </ element name>” is generated, and the generated tag is added to the conversion source data (S1606). If the element type is not a numerical type (S1605: false), the template data generation unit 118 describes the counter as a three-digit numerical value such that “<element name> str three-digit numerical value </ element name>”. The generated tag is generated, the generated tag is added to the conversion source data (S1607), and the counter is incremented (S1608).

なお、要素の内容に係る記述フォーマットが変換元スキーマや変換先スキーマに定義されている場合には、その記述フォーマットに従うように要素のデフォルト値を生成するようにしてもよい。   If the description format related to the content of the element is defined in the conversion source schema or the conversion destination schema, the default value of the element may be generated so as to follow the description format.

雛形データ生成部118は、以上の処理を変換元スキーマに定義されている全要素について行うことで、変換元データを生成する。
次に雛形データ生成部118は、カウンタを再度1に初期化して(S1609)、変換元データの雛形の生成と同様にして変換先データの雛形を生成する。すなわち、雛形データ生成部118は、変換先スキーマに定義されている全要素について(S1610)、変換先スキーマから要素の型を取得し(S1611)、取得した要素の型が数値型であれば(S1612:真)、カウンタを8桁の数値として「<要素名>8桁の数値</要素名>」となるように記述したタグを変換先データに追加し(S1613)、要素の型が数値型以外であれば(S1612:偽)、カウンタを3桁の数値として「<要素名>3桁の数値</要素名>」となるように記述したタグを変換先データに追加して(S1614)、カウンタをインクリメントする(S1615)。
The template data generation unit 118 generates conversion source data by performing the above processing for all elements defined in the conversion source schema.
Next, the template data generation unit 118 initializes the counter to 1 again (S1609), and generates the template of the conversion destination data in the same manner as the generation of the conversion source data template. That is, the template data generation unit 118 acquires element types from the conversion destination schema (S1611) for all elements defined in the conversion destination schema (S1610), and if the acquired element type is a numeric type ( S1612: true), a tag described as “<element name> 8-digit number </ element name>” with an 8-digit numeric value is added to the conversion destination data (S1613), and the element type is numeric. If the type is other than the type (S1612: false), a tag described as “<element name> three-digit numerical value </ element name>” is added to the conversion destination data as a three-digit numerical value (S1614). ), The counter is incremented (S1615).

以上のようにして、雛形データ生成部118は、例えば「00000001」や「str001」などの内容が設定された要素により構成される変換元データおよび変換先データの雛形を生成する。上記のようにして生成された変換元データおよび変換先データは、雛形データ表示部119により、上述した図5に示す画面200の入力欄204および入力欄205に表示され、ユーザが編集可能となる。ユーザは入力欄204および205に表示された雛形を編集することにより変換元データや変換先データを作成することができるので、変換元データや変換先データの作成にかかる手間を軽減することができる。また、各要素の内容として、型に応じた値が予め設定されているため、ユーザは入力すべき値を想像しやすいので便利である。   As described above, the template data generation unit 118 generates a template of conversion source data and conversion destination data composed of elements in which contents such as “00000001” and “str001” are set. The conversion source data and the conversion destination data generated as described above are displayed in the input column 204 and the input column 205 of the screen 200 shown in FIG. 5 by the template data display unit 119, and can be edited by the user. . Since the user can create the conversion source data and the conversion destination data by editing the templates displayed in the input fields 204 and 205, it is possible to reduce time and effort required to create the conversion source data and the conversion destination data. . Moreover, since the value according to the type is preset as the contents of each element, it is convenient because the user can easily imagine the value to be input.

雛形データ生成部118により生成される変換元データおよび変換先データの雛形の一例を図18に示す。図18の上段は、変換元スキーマにより定義される要素のツリー構造711および変換先スキーマにより定義される要素のツリー構造712を示す。図18の中段は、上述した図16の処理により生成される、変換元データの雛形721、および変換先データの雛形722を示す。図18の下段は、上述した図17の処理により生成される、変換元データの雛形731、および変換先データの雛形732を示す。   FIG. 18 shows an example of conversion source data and conversion destination data generated by the template data generation unit 118. The upper part of FIG. 18 shows an element tree structure 711 defined by the conversion source schema and an element tree structure 712 defined by the conversion destination schema. The middle part of FIG. 18 shows a conversion source data template 721 and a conversion destination data template 722 generated by the processing of FIG. 16 described above. The lower part of FIG. 18 shows a conversion source data template 731 and a conversion destination data template 732 generated by the processing of FIG. 17 described above.

図18に示すように、図16の処理により生成される変換元データの雛形721および変換先データの雛形722は、それぞれ内容が空の要素により構成されている。一方、図17の処理により生成される、変換元データの雛形731および変換先データの雛形732はそれぞれ、内容として、例えば「00000001」や「str001」などの値が設定されている。   As shown in FIG. 18, the conversion source data template 721 and the conversion destination data template 722 generated by the processing of FIG. 16 are each configured with an empty element. On the other hand, values such as “00000001” and “str001” are set as the contents of the conversion source data template 731 and the conversion destination data template 732 generated by the processing of FIG.

なお、上記のようにして入力欄204および205に表示された上記の雛形を編集するためにユーザから入力されるデータが本発明の更新データに該当する。   Note that the data input from the user to edit the template displayed in the input fields 204 and 205 as described above corresponds to the update data of the present invention.

入力欄204および205に表示された変換元データおよび変換先データがユーザにより編集されると、パターンデータ入力部112は、ユーザからの指示に従って、変換元データおよび変換先データをそれぞれファイルに格納し、格納したファイルのファイル名を含むパターンデータを生成して、パターンデータ格納テーブル152に登録する。   When the conversion source data and the conversion destination data displayed in the input fields 204 and 205 are edited by the user, the pattern data input unit 112 stores the conversion source data and the conversion destination data in files according to instructions from the user. Then, pattern data including the file name of the stored file is generated and registered in the pattern data storage table 152.

==変換先データの雛形の出力==
上述した図16および図17に示す処理では、変換元スキーマおよび変換先スキーマに基づいて変換元データおよび変換先データの雛形を生成したが、変換元データおよびマッピングデータの入力を受け付け、変換元データを変換することにより変換先データの雛形を生成するようにしてもよい。
== Output of conversion destination data template ==
In the processing shown in FIG. 16 and FIG. 17, the template of the conversion source data and the conversion destination data is generated based on the conversion source schema and the conversion destination schema. However, the input of the conversion source data and the mapping data is accepted and the conversion source data is received. A template of the conversion destination data may be generated by converting.

変換元データを変換して変換先データの雛形を生成する処理の流れを図19に示す。なお、図19に示す処理は、ユーザが変換元データとマッピングデータを入力欄204および入力欄201に入力した後に行われるが、変換元データは、上述した図16または図17に示す処理により生成されるものとしてもよい。   FIG. 19 shows a flow of processing for converting the conversion source data and generating a model of the conversion destination data. The process shown in FIG. 19 is performed after the user inputs conversion source data and mapping data into the input field 204 and the input field 201. The conversion source data is generated by the process shown in FIG. 16 or FIG. It is good also as what is done.

変換規則生成部114は、マッピングデータから変換規則を生成する(S1701)。データ変換部115は、入力欄204に入力された変換元データと、変換規則生成部114が生成した変換規則とを与えて、XSLTエンジンを起動することにより、変換元データを変換規則に従って変換したテストデータを生成する(S1702)。雛形データ表示部119は、データ変換部115が生成したテストデータを変換先データとして、画面200の入力欄205に表示する(S1703)。   The conversion rule generation unit 114 generates a conversion rule from the mapping data (S1701). The data conversion unit 115 converts the conversion source data according to the conversion rule by starting the XSLT engine by giving the conversion source data input in the input field 204 and the conversion rule generated by the conversion rule generation unit 114. Test data is generated (S1702). The template data display unit 119 displays the test data generated by the data conversion unit 115 as the conversion destination data in the input field 205 of the screen 200 (S1703).

上記のようにして入力欄205には、変換元データを変換した変換先データの雛形が表示され、ユーザによって編集可能となる。したがって、ユーザは上記の雛形を編集して変換先データを作成することができるので、変換先データの作成にかかる手間を削減することができる。   As described above, the input field 205 displays a template of the conversion destination data obtained by converting the conversion source data and can be edited by the user. Therefore, since the user can create the conversion destination data by editing the above template, it is possible to reduce the time and effort required to create the conversion destination data.

なお、パターンデータ入力部112は、入力欄204および205に入力された変換元データおよび変換先データをそれぞれファイルに格納し、格納したファイルのファイル名を含むパターンデータを生成して、パターンデータ格納テーブル152に登録する。   The pattern data input unit 112 stores the conversion source data and the conversion destination data input to the input fields 204 and 205 in files, generates pattern data including the file names of the stored files, and stores the pattern data. Register in the table 152.

==マッピング候補の表示==
次に、変換元要素と、変換先要素との対応付け候補(以下、マッピング候補という。)を表示するマッピング候補表示処理について説明する。図20は、マッピング候補表示処理の流れを示すPAD図である。また、図21は、マッピング候補表示処理に用いられる作業用のテーブル(以下、作業リストという。)を示す図である。図21に示すように、作業リストには、パターン番号、変換元パス、および変換先パスが対応付けて登録される。変換元パスは、変換元データの要素を示すXPathであり、変換先パスは、変換先データの要素を示すXPathである。
== Display of mapping candidates ==
Next, a mapping candidate display process for displaying a correspondence candidate (hereinafter referred to as a mapping candidate) between a conversion source element and a conversion destination element will be described. FIG. 20 is a PAD showing the flow of the mapping candidate display process. FIG. 21 is a diagram showing a work table (hereinafter referred to as a work list) used for the mapping candidate display process. As shown in FIG. 21, a pattern number, a conversion source path, and a conversion destination path are registered in association with each other in the work list. The conversion source path is an XPath indicating an element of the conversion source data, and the conversion destination path is an XPath indicating an element of the conversion destination data.

マッピングデータ入力部113は、作業リストを空に初期化し(S1801)、パターンデータ格納テーブル152に記憶されている各パターンデータについて以下の処理を行う(S1802)。   The mapping data input unit 113 initializes the work list to be empty (S1801), and performs the following processing on each pattern data stored in the pattern data storage table 152 (S1802).

マッピングデータ入力部113は、パターンデータの変換元ファイルおよび変換先ファイルから、変換元データおよび変換先データを読み出し(S1803)、変換元データを構成する変換元要素のそれぞれについて(S1804)、変換元要素の内容を取得する(S1805)。マッピングデータ入力部113は、変換先データを構成する変換先要素のそれぞれについて(S1806)、変換先要素の内容を取得し(S1807)、変換元要素の内容と変換先要素の内容とが一致する場合には(S1808:真)、パターンデータのパターン番号、変換元要素を示すXPath、および変換先要素を示すXPathを対応付けて作業リストに登録する(S1809)。   The mapping data input unit 113 reads the conversion source data and the conversion destination data from the pattern data conversion source file and the conversion destination file (S1803), and converts each of the conversion source elements constituting the conversion source data (S1804). The contents of the element are acquired (S1805). The mapping data input unit 113 acquires the contents of the conversion destination element for each of the conversion destination elements constituting the conversion destination data (S1806) (S1807), and the contents of the conversion source element match the contents of the conversion destination element. In this case (S1808: true), the pattern number of the pattern data, the XPath indicating the conversion source element, and the XPath indicating the conversion destination element are associated with each other and registered in the work list (S1809).

次に、マッピングデータ入力部113は、パターンデータ格納テーブル152に記憶されているパターンデータの数をカウントし(S1810)、作業リストから、変換元パスおよび変換先パスの組み合わせを重複なく抽出する(S1811)。マッピングデータ入力部113は、抽出した全組み合わせについて(S1812)、作業リストから変換元パスおよび変換先パスが一致するレコード数をカウントする(S1813)。   Next, the mapping data input unit 113 counts the number of pattern data stored in the pattern data storage table 152 (S1810), and extracts a combination of conversion source paths and conversion destination paths from the work list without duplication (S1810). S1811). The mapping data input unit 113 counts the number of records that match the conversion source path and the conversion destination path from the work list for all the extracted combinations (S1812).

マッピングデータ入力部113は、上記の組み合わせのうち、レコード数が上記パターンデータの数と一致するものがあれば(S1814:真)、レコード数とパターンデータの数とが一致する組み合わせのそれぞれについて(S1815)、変換元パスが示す変換元スキーマの変換元要素と、変換先パスが示す変換先スキーマの変換先要素とを対応付けて画面200に表示する(S1816)。   If there is a combination in which the number of records matches the number of the pattern data among the above combinations (S1814: true), the mapping data input unit 113 sets each of the combinations in which the number of records and the number of pattern data match ( In step S1815, the conversion source element of the conversion source schema indicated by the conversion source path and the conversion destination element of the conversion destination schema indicated by the conversion destination path are displayed in association with each other on the screen 200 (S1816).

マッピング候補が表示された画面200の一例を図22に示す。図22において、変更元要素と変更先要素との間を結ぶ点線411が、上記変換元パスが示す変換元要素と変換先パスが示す変換先要素との対応付けを表現している。   An example of a screen 200 on which mapping candidates are displayed is shown in FIG. In FIG. 22, a dotted line 411 connecting the change source element and the change destination element represents the association between the conversion source element indicated by the conversion source path and the conversion destination element indicated by the conversion destination path.

このように、本実施形態の情報処理装置100では、変更元スキーマおよび変更元データ、並びに変更先スキーマおよび変更先データに基づいて、変換元要素と変換先要素との対応付けを表示することができる。したがって、ユーザは上記の対応付けを参考にマッピングデータの入力を行うことができるので、効率よく入力を行うことができる。   As described above, the information processing apparatus 100 according to the present embodiment can display the association between the conversion source element and the conversion destination element based on the change source schema and the change source data, and the change destination schema and the change destination data. it can. Therefore, the user can input the mapping data with reference to the above association, and can input efficiently.

なお、上記のマッピング候補表示処理は、ユーザからの指示にしたがって行うようにしてもよいし、変更元スキーマおよび変更元データ、並びに変更先スキーマおよび変更先データが入力された時点で自動的に行うようにしてもよい。また、ユーザが入力欄201においてマッピングデータの入力作業を行っている間に上記マッピング候補表示処理を行うようにしてもよい。   Note that the above mapping candidate display process may be performed according to an instruction from the user, or automatically performed when the change source schema and the change source data, and the change destination schema and the change destination data are input. You may do it. Further, the mapping candidate display process may be performed while the user is performing mapping data input work in the input field 201.

また、上記のマッピング候補表示処理では、パターンデータの全てにおいて一致する要素のみを対応付けて表示するようにしたが、これに限らず、入力欄204および205に表示している変更元データおよび変更先データに基づいて要素の対応付けを表示するようにしてもよい。この場合、上述の図20において、マッピングデータ入力部113は、作業リストを空にした後(S1801)、入力欄204および205に表示している変換元データおよび変換先データについて(S1804)〜(S1809)の処理を行い、作業リストに登録された各組み合わせについて、変換元要素と変換先要素との対応付けを表示するようにする。   In the above mapping candidate display process, only matching elements in all pattern data are displayed in association with each other. However, the present invention is not limited to this, and the change source data and changes displayed in the input fields 204 and 205 are displayed. The element association may be displayed based on the previous data. In this case, in FIG. 20 described above, the mapping data input unit 113 empties the work list (S1801), and then converts the conversion source data and the conversion destination data displayed in the input fields 204 and 205 (S1804) to (S1804) to ( The processing of S1809) is performed, and the association between the conversion source element and the conversion destination element is displayed for each combination registered in the work list.

また、上記図20の処理では、全要素について一括して対応付けを検索するようにしたが、これに限らず、例えば、ユーザが選択した変更元要素について、変更先データから内容が一致する変更先要素を検索し、検索した変更先要素と、ユーザが選択した変更元要素との対応付けを表示するようにしてもよい。   Further, in the processing of FIG. 20, the association is searched for all the elements at once. However, the present invention is not limited to this. For example, for the change source element selected by the user, a change in which the contents match from the change destination data. A destination element may be searched, and the association between the searched change destination element and the change source element selected by the user may be displayed.

なお、本実施形態では、構造化データとしてXML形式のツリー構造のデータを前提としてが、これに限らず、各種の形式で構造化されたデータを用いることができる。例えば、CSV(Comma Separated Values)形式やタブ区切りのテキスト形式の表構造のデータなどを用いるようにすることができる。ここで、上記のような表構造のデータの構成を定義するスキーマは、例えば、SQL(Structured Query Language)で記述することができる。   In the present embodiment, XML structured tree-structured data is assumed as structured data, but the present invention is not limited to this, and data structured in various formats can be used. For example, CSV (Comma Separated Values) format or tab-delimited text format table structure data can be used. Here, the schema that defines the structure of the table-structured data as described above can be described in, for example, SQL (Structured Query Language).

また、本実施形態では、画面200において、入力欄202および203ではXMLデータを構成する要素のみが表示され、入力欄201では変換元要素と変換先要素とを対応付けるマッピングデータのみが入力されるものとしたが、これに限らず、各要素の属性を表示するようにしてもよい。この場合、入力欄202および203では、XMLデータを構成する要素が深さ優先順に表示するとともに、各要素の属性についても各要素の子ノードとして表示し、要素の要素名には「○」を、属性の属性名には「◇」を表示するようにする。   In the present embodiment, in the screen 200, only the elements constituting the XML data are displayed in the input fields 202 and 203, and only the mapping data for associating the conversion source element with the conversion destination element is input in the input field 201. However, the present invention is not limited to this, and the attributes of each element may be displayed. In this case, in the input fields 202 and 203, the elements constituting the XML data are displayed in the depth priority order, and the attributes of each element are also displayed as child nodes of each element. , “◇” is displayed in the attribute name of the attribute.

以上、本実施形態について説明したが、上記実施形態は本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物も含まれる。   Although the present embodiment has been described above, the above embodiment is intended to facilitate understanding of the present invention and is not intended to limit the present invention. The present invention can be changed and improved without departing from the gist thereof, and the present invention includes equivalents thereof.

情報処理装置100のハードウェア構成を示す図である。2 is a diagram illustrating a hardware configuration of the information processing apparatus 100. FIG. 情報処理装置100のソフトウェア構成を示す図である。2 is a diagram illustrating a software configuration of the information processing apparatus 100. FIG. スキーマ記憶部151の構成例を示す図である。3 is a diagram illustrating a configuration example of a schema storage unit 151. FIG. パターンデータ格納テーブル152の構成例を示す図である。It is a figure which shows the structural example of the pattern data storage table. 情報処理装置100が表示する画面200の一例を示す図である。It is a figure which shows an example of the screen 200 which the information processing apparatus 100 displays. 範囲500を表現するマッピングデータ600の一例を示す図である。6 is a diagram illustrating an example of mapping data 600 expressing a range 500. FIG. 変換規則生成部114により生成される変換規則701の一例を示す図である。It is a figure which shows an example of the conversion rule 701 produced | generated by the conversion rule production | generation part 114. FIG. 差異格納テーブル154の構成例を示す図である。It is a figure which shows the structural example of the difference storage table 154. 情報処理装置100における変換規則の検証処理の流れを示すPAD図である。6 is a PAD showing a flow of conversion rule verification processing in the information processing apparatus 100. FIG. データ比較処理の流れを示すPAD図である。It is a PAD figure which shows the flow of a data comparison process. ノード比較処理の流れを示すPAD図である。It is a PAD figure which shows the flow of a node comparison process. 差異の表示処理の流れを示すPAD図である。It is a PAD diagram showing a flow of a difference display process. 差異表示部117により表示される画面200の一例を示す図である。It is a figure which shows an example of the screen 200 displayed by the difference display part. 修正候補の表示処理の流れを示すPAD図である。It is a PAD showing a flow of correction candidate display processing. 修正候補が表示された画面200の一例を示す図である。It is a figure which shows an example of the screen 200 on which the correction candidate was displayed. 変換元データおよび変換先データの雛形生成処理の流れを示すPAD図である。It is a PAD figure which shows the flow of the template production | generation process of conversion source data and conversion destination data. 要素の型に応じたデフォルト値を設定する雛形生成処理の流れを示すPAD図である。FIG. 10 is a PAD diagram showing a flow of a template generation process for setting a default value according to an element type. 変換元データおよび変換先データの雛形の一例を示す図である。It is a figure which shows an example of the model of conversion source data and conversion destination data. 変換元データを変換して変換先データの雛形を生成する処理の流れを示すPAD図である。It is a PAD showing a flow of processing for converting conversion source data and generating a model of conversion destination data. マッピング候補表示処理の流れを示すPAD図である。It is a PAD figure which shows the flow of a mapping candidate display process. マッピング候補表示処理に用いられる作業リストを示す図である。It is a figure which shows the operation | work list used for a mapping candidate display process. マッピング候補が表示された画面200の一例を示す図である。It is a figure which shows an example of the screen 200 on which the mapping candidate was displayed.

符号の説明Explanation of symbols

100 情報処理装置 101 CPU
102 メモリ 103 ハードディスク
104 ビデオメモリ 105 表示装置
106 入力装置 111 スキーマ入力部
112 パターンデータ入力部 113 マッピングデータ入力部
114 変換規則生成部 115 データ変換部
116 データ比較部 117 差異表示部
118 雛形データ生成部 119 雛形データ表示部
151 スキーマ記憶部 152 パターンデータ格納テーブル
153 変換規則記憶部 154 差異格納テーブル
200 画面 201 マッピングデータの入力欄
202 変換元スキーマの入力欄 203 変換先スキーマの入力欄
204 変換元データの入力欄 205 変換先データの入力欄
401 リスト表示欄 402 情報表示欄
403 アイコン 411 点線
412 点線 500 範囲
501 「firstname」要素 502 「lastname」要素
503 「name」要素 504 「結合」処理
505 線分 506 線分
507 線分 601 「firstname」オブジェクト
602 「lastname」オブジェクト 603 「name」オブジェクト
604 「結合」オブジェクト 605 「コネクタ」オブジェクト
606 「コネクタ」オブジェクト 607 「コネクタ」オブジェクト
701 変換規則
100 Information processing apparatus 101 CPU
102 memory 103 hard disk 104 video memory 105 display device 106 input device 111 schema input unit 112 pattern data input unit 113 mapping data input unit 114 conversion rule generation unit 115 data conversion unit 116 data comparison unit 117 difference display unit 118 template data generation unit 119 Template data display unit 151 Schema storage unit 152 Pattern data storage table 153 Conversion rule storage unit 154 Difference storage table 200 Screen 201 Input field for mapping data 202 Input column for conversion source schema 203 Input column for conversion destination schema 204 Input of conversion source data Field 205 Conversion destination data input field 401 List display field 402 Information display field 403 Icon 411 Dotted line 412 Dotted line 500 Range 501 “firstname” element 502 “lastname” Element 503 “name” element 504 “join” processing 505 line segment 506 line segment 507 line segment 601 “firstname” object 602 “lastname” object 603 “name” object 604 “join” object 605 “connector” object 606 “connector” object 607 "Connector" object 701 Conversion rule

Claims (10)

複数の第1の要素により構成される第1の形式で構造化された第1のデータを、複数の第2の要素により構成される第2の形式の第2のデータに変換するプログラムの実行に際して与える、前記第1の要素と前記第2の要素との関係が定義された変換規則の正誤を検証する情報処理方法であって、
CPUおよびメモリを備える情報処理装置が、
前記第1のデータを前記メモリに記憶し、
前記第1のデータが前記プログラムおよび前記変換規則によって正しく前記第2の形式に変換された場合に出力される前記第2のデータを想定した検証用データを前記メモリに記憶し、
検証対象となる前記変換規則を与えて前記プログラムを実際に実行することにより前記第1のデータを前記第2の形式の第2のデータに変換し、
変換後の前記第2のデータを構成する前記第2の要素の内容と、前記メモリに記憶されている前記検証用データを構成する前記第2の要素とを比較して、不一致の前記第2の要素を示すデータを生成すること、
を特徴とする情報処理方法。
Execution of a program for converting first data structured in a first format composed of a plurality of first elements into second data in a second format composed of a plurality of second elements An information processing method for verifying correctness of a conversion rule in which a relationship between the first element and the second element is defined,
An information processing apparatus including a CPU and a memory is provided.
Storing the first data in the memory;
Storing verification data in the memory assuming the second data output when the first data is correctly converted into the second format by the program and the conversion rule;
The first data is converted into the second data in the second format by actually executing the program by giving the conversion rule to be verified,
The content of the second element constituting the second data after the conversion is compared with the second element constituting the verification data stored in the memory, and the mismatched second data Generating data indicating the elements of
An information processing method characterized by the above.
第1のスキーマにより定義される第1のXMLデータを、第2のスキーマにより定義される第2のXMLデータに変換するプログラムの実行に際して与える、前記第1のXMLデータを構成する第1の要素と前記第2のXMLデータを構成する第2の要素との関係が定義された変換規則の正誤を検証する情報処理方法であって、
CPUおよびメモリを備える情報処理装置が、
前記第1のXMLデータを入力する第1の入力欄と、前記第1のXMLデータが前記プログラムおよび前記変換規則によって正しく前記第2のスキーマにより定義される形式に変換された場合に出力される前記第2のXMLデータを想定した検証用データを入力する第2の入力欄と、前記第1の要素と前記第2の要素との対応付けを入力する第3の入力欄とを備える画面を表示し、
前記第3の入力欄に入力された前記対応付けに基づいて前記変換規則を生成し、
生成した前記変換規則を与えて前記プログラムを実行することにより前記第1のデータを前記第2のデータに変換し、
変換後の前記第2のデータを構成する前記第2の要素の内容と、前記第2の入力欄に入力された前記検証用データを構成する前記第2の要素とを比較して、不一致の前記第2の要素を特定し、
特定した前記第2の要素を示すメッセージを前記画面に表示すること、
を特徴とする情報処理方法。
The first element constituting the first XML data, which is given when executing the program for converting the first XML data defined by the first schema into the second XML data defined by the second schema And an information processing method for verifying the correctness of a conversion rule in which the relationship between the second element constituting the second XML data is defined,
An information processing apparatus including a CPU and a memory is provided.
A first input field for inputting the first XML data, and output when the first XML data is correctly converted into a format defined by the second schema by the program and the conversion rule. A screen comprising: a second input field for inputting verification data assuming the second XML data; and a third input field for inputting an association between the first element and the second element. Display
Generating the conversion rule based on the correspondence input in the third input field;
The first data is converted into the second data by giving the generated conversion rule and executing the program,
The content of the second element constituting the second data after conversion is compared with the second element constituting the verification data input in the second input field, and a mismatch is found. Identifying the second element;
Displaying a message indicating the identified second element on the screen;
An information processing method characterized by the above.
請求項1に記載の情報処理方法であって、
前記情報処理装置は、不一致となった前記第2の要素の内容と一致する内容の前記第1の要素を前記第1のデータから特定し、特定した前記第1の要素と、前記第2の要素とを対応付けて出力すること、
を特徴とする情報処理方法。
An information processing method according to claim 1,
The information processing apparatus identifies the first element having a content that matches the content of the second element that is inconsistent from the first data, and identifies the first element and the second element that have been identified. Output in association with elements,
An information processing method characterized by the above.
請求項1に記載の情報処理方法であって、
前記情報処理装置は、
前記第1のデータおよび前記検証用データを対応付けて前記メモリに記憶し、
前記メモリに記憶されている前記第1のデータのそれぞれについて、前記変換規則を与えて前記プログラムを実行することにより前記第2のデータに変換し、前記第1のデータに対応する前記検証用データを前記メモリから読み出し、読み出した前記検証用データを構成する前記第2の要素と、変換後の前記第2のデータを構成する前記第2の要素とを比較して、不一致の前記第2の要素を示すデータを生成すること、
を特徴とする情報処理方法。
An information processing method according to claim 1,
The information processing apparatus includes:
Storing the first data and the verification data in the memory in association with each other;
Each of the first data stored in the memory is converted to the second data by giving the conversion rule and executing the program, and the verification data corresponding to the first data Is read from the memory, the second element constituting the read verification data is compared with the second element constituting the second data after conversion, and the mismatched second elements are compared. Generating data representing the element,
An information processing method characterized by the above.
請求項1に記載の情報処理方法であって、
前記情報処理装置は、
前記検証用データの前記第2の形式を定義するメタデータを前記メモリに記憶し、
前記メタデータに基づいて、内容が空である前記第2の要素により構成される前記検証用データである雛形データを生成して出力し、
前記雛形データを更新する更新データの入力を受け付け、
受け付けた前記更新データにより前記雛形データを更新し、
更新した前記雛形データを前記検証用データとして前記メモリに記憶すること、
を特徴とする情報処理方法。
An information processing method according to claim 1,
The information processing apparatus includes:
Storing metadata defining the second format of the verification data in the memory;
Based on the metadata, generates and outputs template data that is the verification data composed of the second element whose contents are empty,
Accepting input of update data for updating the template data,
Update the template data with the received update data,
Storing the updated template data in the memory as the verification data;
An information processing method characterized by the above.
請求項5に記載の情報処理方法であって、
前記メタデータには、前記第2の要素の型が定義されており、
前記情報処理装置は、
前記型毎に、前記第2の要素の内容を決定するための情報である内容決定情報を前記メモリに記憶し、
前記検証用データを構成する前記第2の要素のそれぞれについて、前記メタデータより前記第2の要素の前記型を特定し、特定した前記型に対応する前記内容決定情報を前記メモリから読み出し、読み出した前記内容決定情報に基づいて前記第2の要素の内容を決定し、
前記メタデータに基づいて、決定した前記内容を有する前記第2の要素により構成される前記雛形データを生成すること、
を特徴とする情報処理方法。
An information processing method according to claim 5,
The metadata defines a type of the second element,
The information processing apparatus includes:
For each of the types, content determination information that is information for determining the content of the second element is stored in the memory;
For each of the second elements constituting the verification data, the type of the second element is specified from the metadata, and the content determination information corresponding to the specified type is read from the memory and read. Determining the content of the second element based on the content determination information,
Generating the template data constituted by the second element having the determined content based on the metadata;
An information processing method characterized by the above.
請求項1に記載の情報処理方法であって、
前記情報処理装置は、
前記第1のデータおよび前記変換規則を前記メモリに記憶し、
前記変換規則を与えて前記プログラムを実行することにより前記第1のデータを変換した前記第2のデータである雛形データを生成して出力し、
前記雛形データを更新するための第1の更新データの入力を受け付け、
受け付けた前記第1の更新データにより更新した前記雛形データを、前記検証用データとして前記メモリに記憶し、
前記変換規則を更新するための第2の更新データの入力を受け付け、
受け付けた前記第2の更新データにより前記変換規則を更新し、
更新した前記変換規則を与えて前記プログラムを実行することにより、前記第1のデータを前記第2のデータに変換すること、
を特徴とする情報処理方法。
An information processing method according to claim 1,
The information processing apparatus includes:
Storing the first data and the conversion rule in the memory;
Generate and output template data that is the second data obtained by converting the first data by giving the conversion rule and executing the program,
Receiving input of first update data for updating the template data;
Storing the template data updated by the received first update data in the memory as the verification data;
Receiving an input of second update data for updating the conversion rule;
Updating the conversion rule with the received second update data;
Converting the first data into the second data by giving the updated conversion rule and executing the program;
An information processing method characterized by the above.
請求項1に記載の情報処理方法であって、
前記情報処理装置は、前記第1のデータを構成する前記第1の要素のそれぞれについて、前記検証用データを構成する前記第2の要素のうち、前記第1の要素の内容と内容が一致するものがある場合、内容が一致する前記第2の要素と前記第1の要素との対応付けを出力すること、
を特徴とする情報処理方法。
An information processing method according to claim 1,
For each of the first elements constituting the first data, the information processing apparatus matches the contents of the first element among the second elements constituting the verification data. If there is a thing, outputting a correspondence between the second element and the first element whose contents match,
An information processing method characterized by the above.
複数の第1の要素により構成される第1の形式で構造化された第1のデータを、複数の第2の要素により構成される第2の形式の第2のデータに変換するプログラムの実行に際して与える、前記第1の要素と前記第2の要素との関係が定義された変換規則の正誤を検証する情報処理装置であって、
前記第1のデータと、前記第1のデータが前記プログラムおよび前記変換規則によって正しく前記第2の形式に変換された場合に出力される前記第2のデータを想定した検証用データとを記憶するデータ記憶部と、
検証対象となる前記変換規則を与えて前記プログラムを実際に実行することにより前記第1のデータを前記第2の形式の第2のデータに変換するデータ変換部と、
変換後の前記第2のデータを構成する前記第2の要素の内容と、前記メモリに記憶されている前記検証用データを構成する前記第2の要素とを比較して、不一致の前記第2の要素を示すデータを生成するデータ比較部と、
を備えることを特徴とする情報処理装置。
Execution of a program for converting first data structured in a first format composed of a plurality of first elements into second data in a second format composed of a plurality of second elements An information processing apparatus that verifies whether the conversion rule that defines the relationship between the first element and the second element is correct or not,
Storing the first data and verification data assuming the second data output when the first data is correctly converted into the second format by the program and the conversion rule; A data storage unit;
A data conversion unit that converts the first data into the second data in the second format by actually executing the program by giving the conversion rule to be verified;
The content of the second element constituting the second data after the conversion is compared with the second element constituting the verification data stored in the memory, and the mismatched second data A data comparison unit that generates data indicating the elements of
An information processing apparatus comprising:
複数の第1の要素により構成される第1の形式で構造化された第1のデータを、複数の第2の要素により構成される第2の形式の第2のデータに変換するプログラムの実行に際して与える、前記第1の要素と前記第2の要素との関係が定義された変換規則の正誤を検証するためのプログラムであって、
CPUおよびメモリを備える情報処理装置に、
前記第1のデータを前記メモリに記憶するステップと、
前記第1のデータが前記プログラムおよび前記変換規則によって正しく前記第2の形式に変換された場合に出力される前記第2のデータを想定した検証用データを前記メモリに記憶するステップと、
検証対象となる前記変換規則を与えて前記プログラムを実際に実行することにより前記第1のデータを前記第2の形式の第2のデータに変換するステップと、
変換後の前記第2のデータを構成する前記第2の要素の内容と、前記メモリに記憶されている前記検証用データを構成する前記第2の要素とを比較して、不一致の前記第2の要素を示すデータを生成するステップと、
を実行させるためのプログラム。
Execution of a program for converting first data structured in a first format composed of a plurality of first elements into second data in a second format composed of a plurality of second elements A program for verifying the correctness of the conversion rule in which the relationship between the first element and the second element is defined,
In an information processing apparatus including a CPU and a memory,
Storing the first data in the memory;
Storing verification data in the memory assuming the second data output when the first data is correctly converted into the second format by the program and the conversion rule;
Converting the first data into second data in the second format by actually executing the program by giving the conversion rule to be verified;
The content of the second element constituting the second data after the conversion is compared with the second element constituting the verification data stored in the memory, and the mismatched second data Generating data indicating the elements of
A program for running
JP2006291804A 2006-10-26 2006-10-26 Information processing method, information processor, and program Pending JP2008108144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006291804A JP2008108144A (en) 2006-10-26 2006-10-26 Information processing method, information processor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006291804A JP2008108144A (en) 2006-10-26 2006-10-26 Information processing method, information processor, and program

Publications (1)

Publication Number Publication Date
JP2008108144A true JP2008108144A (en) 2008-05-08

Family

ID=39441432

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006291804A Pending JP2008108144A (en) 2006-10-26 2006-10-26 Information processing method, information processor, and program

Country Status (1)

Country Link
JP (1) JP2008108144A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013533995A (en) * 2010-05-27 2013-08-29 マイクロソフト コーポレーション Schema contract for data integration
CN110569296A (en) * 2019-08-29 2019-12-13 南宁学院 Process data format conversion method
WO2023021863A1 (en) * 2021-08-19 2023-02-23 株式会社Yuimedi Conversion system, conversion program, and conversion method
US11615111B2 (en) 2020-08-18 2023-03-28 Fujitsu Limited Computer-readable recording medium for storing data processing program, data processing method, and data processing apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058530A (en) * 2001-08-17 2003-02-28 Appresso:Kk Program for generating xml document conversion rule
JP2005537532A (en) * 2002-05-07 2005-12-08 インターナショナル・ビジネス・マシーンズ・コーポレーション Comprehensive development tool for building natural language understanding applications
JP2006277662A (en) * 2005-03-30 2006-10-12 Fujitsu Ltd Conversion rule correction program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058530A (en) * 2001-08-17 2003-02-28 Appresso:Kk Program for generating xml document conversion rule
JP2005537532A (en) * 2002-05-07 2005-12-08 インターナショナル・ビジネス・マシーンズ・コーポレーション Comprehensive development tool for building natural language understanding applications
JP2006277662A (en) * 2005-03-30 2006-10-12 Fujitsu Ltd Conversion rule correction program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013533995A (en) * 2010-05-27 2013-08-29 マイクロソフト コーポレーション Schema contract for data integration
CN110569296A (en) * 2019-08-29 2019-12-13 南宁学院 Process data format conversion method
US11615111B2 (en) 2020-08-18 2023-03-28 Fujitsu Limited Computer-readable recording medium for storing data processing program, data processing method, and data processing apparatus
WO2023021863A1 (en) * 2021-08-19 2023-02-23 株式会社Yuimedi Conversion system, conversion program, and conversion method

Similar Documents

Publication Publication Date Title
US7305614B2 (en) Interoperable retrieval and deposit using annotated schema to interface between industrial document specification languages
US7114123B2 (en) User controllable data grouping in structural document translation
US20110072340A1 (en) Modeling system and method
JP6518768B2 (en) Build a report
US20080306910A1 (en) Method and process for end users to query hierarchical data
JP6132698B2 (en) Tabular multidimensional data conversion method and apparatus
US10657323B2 (en) Method of preparing documents in markup languages
JP5192634B2 (en) Declaration order report parameterization
US20110208759A1 (en) Method, Apparatus, and Interface For Creating A Chain of Binary Attribute Relations
US20050256695A1 (en) Creating visual data models by combining multiple inter-related model segments
JP2008108144A (en) Information processing method, information processor, and program
JPWO2005098660A1 (en) Document processing apparatus and document processing method
JPWO2005098658A1 (en) Document processing apparatus and document processing method
Gubanov et al. Model management engine for data integration with reverse-engineering support
JP4906424B2 (en) Web service design method and apparatus
Brahmia et al. Changes to XML namespaces in XML schemas and their effects on associated XML documents under schema versioning
CN1326078C (en) Forming method for package device
WO2006137564A1 (en) Document processing device
JP2005056085A (en) Data structure conversion program
TWI430116B (en) Support for editing methods with multiple data formats
KR101765324B1 (en) Sources code generating apparatus using structured query language and diagram, and method for processing thereof
JP2002297662A (en) Method and device for editing structured document, terminal, and program
Dos Santos et al. A semantical change detection algorithm for XML
JP2012164177A (en) Program automatic generation system
Bühler MUSE4Anything

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110408

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110419

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110615

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20111227