JP2008108144A - Information processing method, information processor, and program - Google Patents
Information processing method, information processor, and program Download PDFInfo
- 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
Links
Images
Abstract
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参照)。
変換規則が正しいかどうかを検証するには、構造化データに実際に変換規則を適用し、その結果生成されたデータが予定された内容であるかどうかを確認する必要がある。 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
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
==ハードウェア構成==
図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
==ソフトウェア構成==
図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
なお、上記各機能部111〜119は、情報処理装置100が備えるCPU101がハードディスク103に記憶されているプログラムをメモリ102に読み出して実行することにより実現される。また、上記各記憶部151〜154はメモリ102やハードディスク103により提供される記憶領域として実現される。
Note that each of the
スキーマ記憶部151は、変換元スキーマおよび変換先スキーマを記憶する。スキーマ記憶部151の構成例を図3に示す。同図に示すように、スキーマ記憶部151には、変換元スキーマと変換先スキーマとが記憶される。
The
スキーマ入力部111は、ユーザから変換元スキーマおよび変換先スキーマの入力を受け付け、受け付けた変換元スキーマおよび変換先スキーマをスキーマ記憶部151に記憶する。
The
パターンデータ格納テーブル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
マッピングデータ入力部113は、変換元スキーマに定義される要素(以下、変換元要素という。本発明の第1の要素に対応する。)と、変換先スキーマに定義される要素(以下、変換先要素という。本発明の第2の要素に対応する。)との対応付けを定義するデータ(以下、マッピングデータという。)の入力を受け付ける。
The mapping
上述したスキーマ入力部111、パターンデータ入力部112、およびマッピング情報入力部113は、図5に示す画面200を介して、変換元スキーマおよび変換先スキーマ、並びに変換元データおよび変換先データ、マッピングデータを受け付ける。図5に示すように、画面200は、マッピングデータの入力欄201、変換元スキーマの入力欄202、変換先スキーマの入力欄203、変換元データの入力欄204、および変換先データの入力欄205を備えている。
The
変換元データの入力欄204および変換先データの入力欄205には、変換元データおよび変換先データがそのまま表示され、ユーザがキーボードなどにより編集可能となっている。なお、パターンデータ入力部112は、ユーザからファイル名の指定を受け付け、指定されたファイル名に対応するファイルに格納されたXMLデータを読み出して、読み出したXMLデータを入力欄204または205に表示するようにしてもよい。
In the conversion source
変換元スキーマの入力欄202および変換先スキーマの入力欄203には、XMLデータのツリー構造が表示される。なお、ユーザがマウスやキーボードなどを操作して、項目の順序や親子関係を編集可能となっていてもよい。入力欄202および203では、XMLデータを構成する全要素が深さ優先順に表示される。なお、スキーマ入力部111は、ユーザからファイル名の指定を受け付けて、指定されたファイル名に対応するファイルに記述されたスキーマを読み出し、読み出したスキーマを解析してXMLデータのツリー構造を入力欄202および203に表示するようにしてもよい。
In the conversion source
マッピングデータの入力欄201では、ユーザが、マウスの操作により、変換元要素と、変換先要素とを線で結ぶことにより、要素の対応付けを行うことができるようになっている。また、変換元要素と変換先要素とは1対1の対応付け以外にも、1対複数または複数対1の対応付けとするようにしてもよい。この場合、例えば、複数の変換元要素を結合して1つの変換先要素とするなど、分割や結合、繰り返しなどの処理を示すアイコンを、変換元要素と変換先要素とを結ぶ線分上に配置するようにする。例えば、図5の例では、変換元要素の「address」要素と、変換先要素の「employee」要素との間は、要素が繰り返すことを示す「繰り返し」アイコンが配置されており、また、変換元要素の「firstname」要素および「lastname」要素と変換先要素の「name」要素との間には、上記2つの変換元要素を結合することを示す「結合」アイコンが配置されている。
In the mapping
入力欄201に入力された変換元要素と変換先要素との対応付けのうち、変換元要素の「firstname」および「lastname」を結合して変換先要素の「name」に対応付けられている範囲500を表現するマッピングデータ600の一例を図6に示す。
Of the association between the conversion source element and the conversion destination element input in the
範囲500には、変換元要素として「firstname」要素501および「lastname」要素502が含まれており、変換先要素として「name」要素503が含まれている。また、「firstname」要素501および「lastname」要素502は「結合」処理504と線分505および線分506で結ばれており、また「結合」処理504は変換先要素の「name」要素503と線分507で結ばれている。
The
上記のような範囲500に含まれる変換元要素と変換先要素との対応付けは、マッピングデータ600では「コネクタ」オブジェクトとして表現される。
The association between the conversion source element and the conversion destination element included in the
マッピングデータ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
マッピングデータ入力部113は、変換元要素と変換先要素との対応付けの入力を受け付け、受け付けた変換元要素と変換先要素との対応付けを、上記のようなマッピングデータ600としてメモリに記憶する。また、マッピングデータ入力部113は、XSLTで記述された変換規則を受け付け、受け付けた変換規則からマッピングデータ600を生成し、生成したマッピングデータ600に基づいて入力欄201に線分やアイコンを表示することもできる。この場合、マッピングデータ入力部113は、生成したマッピングデータ600に含まれるオブジェクトのうち、変換元要素に対応するオブジェクト(図6の例では、「firstname」オブジェクト601および「lastname」オブジェクト602である。)の出力側の参照保持領域に格納されている「コネクタ」オブジェクトへの参照を取得し、取得した参照が示す「コネクタ」オブジェクトの出力側の参照保持領域に格納されている、各種の処理に対応するオブジェクト(図6の例では「結合」オブジェクト604である。)、または変換先要素に対応するオブジェクト(図6の例では「name」オブジェクト603である。)への参照を取得して、変換元要素と、取得した参照が示すオブジェクトに対応する処理または変換先要素との対応付けを、入力欄201に線分で表示するようにする。
The mapping
変換規則生成部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
データ変換部115は、パターンデータ格納テーブル152に記憶されているパターンデータのそれぞれについて、変換元ファイルが示すファイルから変換元データを読み出し、読み出した変換元データと、上記変換規則生成部114が生成した変換規則とを与えてXSLTエンジンを起動することにより、変換元データを上記の変換規則に従って変換したXMLデータ(以下、テストデータという。本発明の変換データに該当する。)を生成する。
The
データ比較部116は、データ変換部115が生成したテストデータの要素と、上記のパターンデータに含まれる変換先データの要素とを比較する。テストデータの要素と変換先データの要素とが一致しない場合、データ比較部116は、一致しない要素についての差異を示すデータ(以下、差異データという。)を生成し、生成した差異データを差異格納テーブル154に登録する。なお、データ比較部116による比較処理の詳細については後述する。
The
差異格納テーブル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
雛形データ生成部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
以下、本実施形態の情報処理装置100による処理について説明する。
Hereinafter, processing by the
==検証処理==
上述したように、情報処理装置100は変換元データと変換規則とをXSLTエンジンに与えて変換元データを変換したテストデータを生成し、生成したテストデータと変換先データとを比較することにより、変換規則の正誤を検証する。テストデータと変換先データとが一致しない場合には、情報処理装置100は、差異点を表示することにより、ユーザが変換規則などの修正を支援するようにしている。
== Verification process ==
As described above, the
図9は、本実施形態の情報処理装置100における変換規則の検証処理の流れを示すPAD図である。なお、図9に示す処理は、例えば、上述した図5の画面200にボタンを配置し、ユーザがそのボタンが押下したときに実行したり、マッピングデータが変更されたときに実行したり、所定の時間間隔で定期的に実行したりするようにする。
FIG. 9 is a PAD diagram showing the flow of conversion rule verification processing in the
変換規則生成部114がマッピングデータ600に基づいて変換規則を生成し(S1001)、パターンデータ格納テーブル152に格納されているパターンデータのそれぞれについて以下の処理が行われる(S1002)。データ変換部115は、パターンデータに含まれている変換元データと、変換規則生成部114が生成した変換規則とを与えてXSLTエンジンを実行することにより、変換元データを変換したテストデータを生成するデータ変換処理を行う(S1003)。データ比較部116は、後述するデータ比較処理を行う(S1004)。上記の処理が全パターンデータについて行われ、テストデータと変換先データとの間で差異があった場合、すなわち差異格納テーブル154に差異データが登録されている場合には(S1005:真)、差異表示部117が後述する差異の表示処理を行う(S1006)。
The conversion
==データ比較==
図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
データ比較部116は、変換元DOMデータおよびテストDOMデータのそれぞれから、ノードをひとつ取り出し、変換元DOMデータから取り出したノード(以下、変換元ノードという。)と、テストDOMデータから取り出したノード(以下、テストノードという。)のタイプを比較する(S1201)。ここでノードのタイプとしては、ドキュメントノード、エレメントノード、およびテキストノードがある。ドキュメントノードは、DOMデータ全体を表すノードであり、DOMデータのルートとなる。ドキュメントノードの子としてエレメントノードなどが設定される。エレメントノードは、XMLデータの要素または要素の属性を示すノードであり、要素名や属性名に対応するノード名を有する。テキストノードは、要素または属性の内容を示すノードであり、文字列の値を有する。
The
ノードのタイプが異なる場合(S1202:真)、データ比較部116は、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、期待データが変換元ノードのノード名であり、実データがテストノードのノード名であり、説明が「タイプが違う」である差異データを生成し、生成した差異データを差異格納テーブル154に登録する(S1203)。
When the node types are different (S1202: true), the
一方、ノードのタイプが同一であれば(S1202:偽)、データ比較部116は、ノードのタイプがドキュメントノードまたはエレメントノードであるかどうかを調べ(S1204)、ノードのタイプがドキュメントノードまたはエレメントノードであるときは(S1204:真)、(S1205)に進む。
On the other hand, if the node types are the same (S1202: false), the
ここでノードのタイプがエレメントノードである場合(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
次に、データ比較部116は、ノードの子となるノードの数(以下、子ノード数という。)を変換元DOMデータおよびテストDOMデータのそれぞれから取得し(S1212)、取得した子ノード数が異なる場合には(S1213:真)、XPathが変換元ノードを示すXPathであり、パターン番号が上記パターンデータのパターン番号であり、期待データが変換元ノードのノード名であり、実データがテストノードのノード名であり、説明が「子要素の数が違う」である差異データを生成し、生成した差異データを差異格納テーブル154に登録する(S1214)。
子ノード数が1以上であれば(S1215:真)、変換元ノードの子となるノードのそれぞれについて(S1216)、ノード比較処理を再帰的に行う(S1217)。
Next, the
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
==差異表示処理==
図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
次に差異表示部117は、差異格納テーブル154に記憶されている差異データのそれぞれについて(S1305)、変換先スキーマにより定義される要素のうち、差異データのXPathに対応するものを特定し、画面200において、特定した要素の要素名に「×」のアイコンを表示する(S1306)。また、差異表示部117は、差異データの説明、期待データ、実データ、およびXPathを画面200に表示する。
Next, for each difference data stored in the difference storage table 154 (S1305), the
差異表示部117により表示される画面200の一例を図13に示す。同図に示すように、画面200は、パターンデータ毎に変換元ファイルおよび変換先ファイルを表示するリスト表示欄401と、エラーメッセージなどを表示する情報表示欄402とを備えている。図13の例では、リスト表示欄401には、3つのパターンデータについて、「○」または「×」とともに、変換元ファイルおよび変換先ファイルが表示されている。「×」が表示されている行では、パターン番号「2」のパターンデータについて、変換元データが予定通りに変換されず、差異データが登録されたことを示している。また、差異データの期待データ、実データ、およびXPathは情報表示欄402に表示されている。
An example of the
また、変換先スキーマにより定義される変換先データの各要素のうち、差異データのXPathにより示されるものについては、「×」のアイコン403が表示されている。
Among the elements of the conversion destination data defined by the conversion destination schema, “x”
なお、リスト表示欄401では、入力欄204および入力欄205に表示されているXMLデータが格納されたファイルを示す行をハイライト表示するようにしてもよい。
In the
また、データの検証処理を行っている間は画面200の各入力欄を編集不能とし、差異データが登録された場合には各入力欄を再度編集可能とするようにしてもよい。また、差異データが登録された場合には、変換元スキーマ、変換元データ、変換先スキーマ、変換先データ、変換規則の何れかに問題があることが多いので、ユーザが再度編集を行うように促すメッセージを出力するようにしてもよい。
Further, each input field on the
==効果==
以上説明したように、本実施形態の情報処理装置100によれば、ユーザから入力された変換規則に従って変換元データを変換したテストデータと、変換先データとを比較し、その差異を出力することができる。したがって、ユーザは変換規則が想定通りの変換処理を規定しているかどうかを容易に判断することが可能となり、変換規則の検証を容易に行うことができる。
== Effect ==
As described above, according to the
また、本実施形態の情報処理装置100では、複数のパターンデータを予めパターンデータ格納テーブル152に登録しておくことができるので、多様なXMLデータについて変換規則の検証を行うことができる。したがって、変換規則の検証精度を向上することができる。また、情報処理装置100は、複数のパターンデータについての検証処理を一括して行うので、変換規則の検証を効率的に行うことができる。
In the
また、ユーザが変換規則に新たな変換定義を追加した場合には、追加した変換定義に係る検証を行うためのパターンデータを追加することも可能となるが、それ以前のパターンデータについても検証処理が行われるので、変換規則を変更したことにより他の変換処理に影響が起きる、いわゆるデグレードが発生することを防止することができる。 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
差異表示部117は、差異格納テーブル154に記憶されている差異データのうち、説明が「値が違う」であるもののそれぞれについて以下の処理を行う(S1401)。
差異表示部117は、変換先データから、差異データのXPathが示す変換先要素の内容を取得し(S1402)、変換元データを構成する全変換元要素について(S1403)、変換元データから変換元要素の内容を取得し(S1404)、変換先要素の内容が変換元要素の内容と一致する場合(S1405:真)、変換先要素と変換元要素との対応付けを修正候補として画面200に表示する(S1406)。
The
The
修正候補が表示された画面200の一例を図15に示す。同図の例では、変換元要素の「email」を変換先要素の「birthday」に変換し、変換元要素の「birthday」を変換先要素の「email」に変換するような対応付けが作成されている。ここで、差異表示部117が変換先要素と変換元要素との対応付け候補を点線411で表示している。
An example of a
上記のようにして、本実施形態の情報処理装置100は、テストデータと変換先データとが一致しない場合には、内容が一致する変換元要素と変換先要素との対応付けを表示することができる。したがって、ユーザは、間違った対応付けを入力した場合にも、修正候補の表示を参考に対応付けを修正することができる。よって、変換規則の修正を効率的に行うことができる。
As described above, when the test data and the conversion destination data do not match, the
なお、上記のように修正候補を表示する場合、上述したマッピングデータ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
==ユーザのデータ入力支援==
本実施形態では、変換元データや変換先データ、マッピングデータはそれぞれユーザから入力されることを想定しているが、本実施形態の情報処理装置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
==変換元データおよび変換先データの雛形の出力==
図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
ここで、雛形データ生成部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
雛形データ生成部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
図18に示すように、図16の処理により生成される変換元データの雛形721および変換先データの雛形722は、それぞれ内容が空の要素により構成されている。一方、図17の処理により生成される、変換元データの雛形731および変換先データの雛形732はそれぞれ、内容として、例えば「00000001」や「str001」などの値が設定されている。
As shown in FIG. 18, the conversion
なお、上記のようにして入力欄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
==変換先データの雛形の出力==
上述した図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
変換規則生成部114は、マッピングデータから変換規則を生成する(S1701)。データ変換部115は、入力欄204に入力された変換元データと、変換規則生成部114が生成した変換規則とを与えて、XSLTエンジンを起動することにより、変換元データを変換規則に従って変換したテストデータを生成する(S1702)。雛形データ表示部119は、データ変換部115が生成したテストデータを変換先データとして、画面200の入力欄205に表示する(S1703)。
The conversion
上記のようにして入力欄205には、変換元データを変換した変換先データの雛形が表示され、ユーザによって編集可能となる。したがって、ユーザは上記の雛形を編集して変換先データを作成することができるので、変換先データの作成にかかる手間を削減することができる。
As described above, the
なお、パターンデータ入力部112は、入力欄204および205に入力された変換元データおよび変換先データをそれぞれファイルに格納し、格納したファイルのファイル名を含むパターンデータを生成して、パターンデータ格納テーブル152に登録する。
The pattern
==マッピング候補の表示==
次に、変換元要素と、変換先要素との対応付け候補(以下、マッピング候補という。)を表示するマッピング候補表示処理について説明する。図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
マッピングデータ入力部113は、パターンデータの変換元ファイルおよび変換先ファイルから、変換元データおよび変換先データを読み出し(S1803)、変換元データを構成する変換元要素のそれぞれについて(S1804)、変換元要素の内容を取得する(S1805)。マッピングデータ入力部113は、変換先データを構成する変換先要素のそれぞれについて(S1806)、変換先要素の内容を取得し(S1807)、変換元要素の内容と変換先要素の内容とが一致する場合には(S1808:真)、パターンデータのパターン番号、変換元要素を示すXPath、および変換先要素を示すXPathを対応付けて作業リストに登録する(S1809)。
The mapping
次に、マッピングデータ入力部113は、パターンデータ格納テーブル152に記憶されているパターンデータの数をカウントし(S1810)、作業リストから、変換元パスおよび変換先パスの組み合わせを重複なく抽出する(S1811)。マッピングデータ入力部113は、抽出した全組み合わせについて(S1812)、作業リストから変換元パスおよび変換先パスが一致するレコード数をカウントする(S1813)。
Next, the mapping
マッピングデータ入力部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
マッピング候補が表示された画面200の一例を図22に示す。図22において、変更元要素と変更先要素との間を結ぶ点線411が、上記変換元パスが示す変換元要素と変換先パスが示す変換先要素との対応付けを表現している。
An example of a
このように、本実施形態の情報処理装置100では、変更元スキーマおよび変更元データ、並びに変更先スキーマおよび変更先データに基づいて、変換元要素と変換先要素との対応付けを表示することができる。したがって、ユーザは上記の対応付けを参考にマッピングデータの入力を行うことができるので、効率よく入力を行うことができる。
As described above, the
なお、上記のマッピング候補表示処理は、ユーザからの指示にしたがって行うようにしてもよいし、変更元スキーマおよび変更元データ、並びに変更先スキーマおよび変更先データが入力された時点で自動的に行うようにしてもよい。また、ユーザが入力欄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
また、上記のマッピング候補表示処理では、パターンデータの全てにおいて一致する要素のみを対応付けて表示するようにしたが、これに限らず、入力欄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
また、上記図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
以上、本実施形態について説明したが、上記実施形態は本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物も含まれる。 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 情報処理装置 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
102
Claims (10)
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.
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.
前記情報処理装置は、不一致となった前記第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のデータのそれぞれについて、前記変換規則を与えて前記プログラムを実行することにより前記第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.
前記情報処理装置は、
前記検証用データの前記第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.
前記メタデータには、前記第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のデータを変換した前記第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の要素のそれぞれについて、前記検証用データを構成する前記第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のデータが前記プログラムおよび前記変換規則によって正しく前記第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:
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
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)
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)
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 |
-
2006
- 2006-10-26 JP JP2006291804A patent/JP2008108144A/en active Pending
Patent Citations (3)
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)
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 |