JP2007122278A - Document processing device and method, and program - Google Patents
Document processing device and method, and program Download PDFInfo
- Publication number
- JP2007122278A JP2007122278A JP2005311802A JP2005311802A JP2007122278A JP 2007122278 A JP2007122278 A JP 2007122278A JP 2005311802 A JP2005311802 A JP 2005311802A JP 2005311802 A JP2005311802 A JP 2005311802A JP 2007122278 A JP2007122278 A JP 2007122278A
- Authority
- JP
- Japan
- Prior art keywords
- document
- xml
- normalized
- xml document
- normalization
- 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
Landscapes
- Document Processing Apparatus (AREA)
Abstract
Description
本発明は、構造化文書の文書構造を処理する文書処理装置及びその方法、プログラムに関するものである。 The present invention relates to a document processing apparatus, method, and program for processing the document structure of a structured document.
近年、機器間のデータ互換性を確保するためにXML(Extensible Markup Language/非特許文献1)が利用されるようになっている。XMLはテキストベースであるため、文字エンコーディングや書式の自由度が高いという特徴を持つ。一方で、従来の機器に依存したバイナリデータよりも自由度が高いため、情報を解析するためのXMLパーサも複雑なものになる。このXMLパーサが複雑になることを避けるためには、XMLの書式を制限する必要がある。 In recent years, XML (Extensible Markup Language / Non-patent Document 1) has been used to ensure data compatibility between devices. Since XML is text-based, it has a feature that it has a high degree of freedom in character encoding and format. On the other hand, since the degree of freedom is higher than that of binary data depending on conventional devices, an XML parser for analyzing information becomes complicated. In order to avoid the complexity of the XML parser, it is necessary to limit the XML format.
XMLの書式を制限するための1つの方法としては、機器間で交換するデータを正規化XML(Canonical XML/非特許文献2)で記述することが考えられる。この正規化XMLは、XMLにおける自由度の高い書式を1つの書式に制限し、かつXMLと同等の情報を表現できる仕様であり、本来は電子署名等に利用される。ネットワーク間で交換するデータを全て正規化XMLに限定できれば、XMLパーサに必要とされる解析能力も大幅に絞られ、XMLパーサの軽量化及び高速化を実現できる。
局所的なネットワークであれば接続先の機器も制限されるので、全ての機器に対し上記の制約を加えることができる。しかし、広域なネットワーク上の機器との接続を前提とすると、不特定多数の機器に上記の制約を加えるのは不可能であり、正規化XMLのみを解析する能力を持つXMLパーサでは機器間の相互運用性を確保することができない。 In the case of a local network, connection destination devices are also limited, and thus the above-described restrictions can be applied to all devices. However, given the connection with devices on a wide area network, it is impossible to apply the above restrictions to an unspecified number of devices, and an XML parser that has the ability to analyze only normalized XML can be used between devices. Interoperability cannot be ensured.
本発明の目的は、上記従来の問題点を解決することにある。 An object of the present invention is to solve the above-mentioned conventional problems.
本発明の特徴は、構造化文書の解析を効率良く行う技術を提供することにある。 A feature of the present invention is to provide a technique for efficiently analyzing a structured document.
上記目的を達成するために本発明の一態様に係る文書処理装置は以下のような構成を備える。即ち、
入力された構造化文書を解析する文書処理装置であって、
正規化XML文書を解析する正規化XML解析手段と、
非正規化XML文書を正規化XML文書へ変換して前記正規化XML解析手段に供給する正規化手段と、
入力された文書が、少なくとも正規化XML文書であるか否かを識別する識別手段とを備え、前記識別手段で正規化XML文書でないと識別されたXML文書を前記正規化手段により正規化XML文書へ変換して前記正規化XML解析手段で解析することを特徴とする。
In order to achieve the above object, a document processing apparatus according to an aspect of the present invention has the following arrangement. That is,
A document processing device for analyzing an input structured document,
Normalized XML analysis means for analyzing the normalized XML document;
Normalization means for converting an unnormalized XML document into a normalized XML document and supplying the normalized XML document to the normalized XML analysis means;
Identification means for identifying whether the input document is at least a normalized XML document, and an XML document identified by the identification means as not being a normalized XML document is normalized XML document by the normalization means And the analysis is performed by the normalized XML analysis means.
上記目的を達成するために本発明の一態様に係る文書処理方法は以下のような工程を備える。即ち、
構造化文書を入力して解析する文書処理方法であって、
正規化XML文書を解析する正規化XML解析工程と、
非正規化XML文書を正規化XML文書へ変換して前記正規化XML解析工程に供給する正規化工程と、
入力した文書が、少なくとも正規化XML文書であるか否かを識別する識別工程とを備え、前記識別工程で正規化XML文書でないと識別されたXML文書を前記正規化工程により正規化XML文書へ変換して前記正規化XML解析工程で解析することを特徴とする。
In order to achieve the above object, a document processing method according to an aspect of the present invention includes the following steps. That is,
A document processing method for inputting and analyzing a structured document,
A normalized XML analysis step of analyzing the normalized XML document;
A normalization step of converting a non-normalized XML document into a normalized XML document and supplying it to the normalized XML analysis step;
An identification step for identifying whether or not the input document is at least a normalized XML document, and an XML document identified as not being a normalized XML document in the identification step is converted into a normalized XML document by the normalization step. It converts, and it analyzes by the said normalization XML analysis process, It is characterized by the above-mentioned.
本発明によれば、最小限の文書解析機能と、汎用的な記述を最小限の文法規則に変換する正規化機能とを分けて利用することができる。これにより、正規化XML文書に対しては最小限の資源と時間で、非正規化XML文書に対して、必要な資源を追加して効率良く解析処理を行うことが可能となる。 According to the present invention, a minimum document analysis function and a normalization function for converting a general-purpose description into a minimum grammar rule can be used separately. This makes it possible to efficiently perform analysis processing by adding necessary resources to a denormalized XML document with a minimum amount of resources and time for a normalized XML document.
以下、添付図面を参照して本発明の好適な実施の形態を詳しく説明する。尚、以下の実施の形態は特許請求の範囲に係る本発明を限定するものでなく、また本実施の形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the present invention according to the claims, and all combinations of features described in the present embodiments are essential to the solution means of the present invention. Not exclusively.
<実施の形態1>
本発明の実施の形態1では、DOMパーサを用いて、正規化XML文書、非正規化XML文書、非XML文書の解析を行う例を説明する。
<
In the first embodiment of the present invention, an example in which a normalized XML document, a denormalized XML document, and a non-XML document are analyzed using a DOM parser will be described.
図1は、本実施の形態に係る情報処理装置の概略構成を説明するブロック図である。 FIG. 1 is a block diagram illustrating a schematic configuration of the information processing apparatus according to the present embodiment.
図1において、101は、この情報処理装置全体を制御する中央制御部(以下、CPU)である。ROM102は、変更を必要としないプログラムやパラメータ、各種データを格納している。RAM103は、外部装置などから供給されるプログラムやデータを一時的に記憶する。記憶部104は、機器に固定して設置されたハードディスクやメモリカード、或は着脱可能なフレキシブルディスク(FD)やCompact Disk(CD)等の光ディスク、磁気や光カード、ICカード、メモリカードなどを含む外部記憶装置である。この記憶部104には、OSや各種アプリケーションプログラムがインストールされており、これらプログラムは実行時にRAM103にロードされ、CPU101の制御の下に実行される。操作部105は、ユーザによる操作を受け、データを入力するポインティングデバイスやキーボード、その他ハードウェアキーやタッチパネル等の入力デバイスと、そのインタフェースを含む。表示部106は、この装置の保持するデータや供給されたデータを表示するためのモニタ、及びそのインタフェースを含んでいる。
In FIG. 1,
ここで記憶部104には、予め解析対象の文書が格納されている。この文書の格納手順に関しては本発明の範囲外のため触れないこととする。格納されている文書を読み出して各処理を行い、処理後必要に応じて、当該文書を記憶部104に格納する。
Here, a document to be analyzed is stored in the
CPU101により実行されるプログラムは、正規化XML文書を解析するXMLパーサと、非特許文献2で定義された14個の正規化変換規則に従って、入力されたXML文書を正規化XML文書へ変換する正規化部とを含む。この正規化変換規則のうち特徴的なものとして以下のようなものが挙げられる。
(1)改行文字を「#xA」(16進数でA番目の文字の意。10進数では「10」に相当。以下同様)とする。
(2)XML宣言、DTD宣言、コメントは削除
(3)空要素タグを開始、終了タグの組に置換
(4)属性値の囲み記号を「"」に統一
(1)を実現するために、正規化部は入力されたXML文書を先頭から順に読み取り、改行文字に利用される記号(#xA,#xD)を探す。汎用的なXML文書で1つの改行文字として利用されるパターンは、「#xA」のみ、「#xD」のみ、「#xD #xA」の連続の3種類がある。正規化部は、入力された改行文字がどのパターンに当てはまるのかを順に確認し、全てのパターンを「#xA」に置換して、正規化結果として出力する。
A program executed by the
(1) The line feed character is “#xA” (meaning the Ath character in hexadecimal notation, equivalent to “10” in decimal notation, and so on).
(2) Delete XML declaration, DTD declaration, and comment (3) Replace empty element tag with a set of start and end tags (4) Unify attribute value enclosure symbol to """(1) The normalization unit reads the input XML document in order from the top and searches for symbols (#xA, #xD) used for line feed characters. There are three types of patterns that are used as a single line feed character in a general-purpose XML document: “#xA” only, “#xD” only, and “#xD #xA”. The normalization unit sequentially checks to which pattern the input line feed character applies, replaces all patterns with “#xA”, and outputs the result as a normalization result.
また(2)を実現するために、正規化部は、入力されたXML文書からXML宣言部、DTD宣言部、コメントに該当する部分を探し出す。但し、正規化結果としては一切出力しない。 In order to realize (2), the normalization unit searches for an XML declaration part, a DTD declaration part, and a part corresponding to a comment from the input XML document. However, no normalization result is output.
また(3)を実現するために、正規化部は、開始、終了、空要素タグの先頭を示す記号「<」を探す。それぞれのタグは、「<要素名 属性 属性 ...>」、「</要素名>」、「<要素名 属性 属性 .../>」という文法を取るので、正規化部はそれぞれの文法を認識しながら正規化方法を切り替える。まず、次の文字が「/」であるかどうかを確認し、「/」であれば終了タグとして通常の終了タグの情報を出力する。一方、それ以外の要素名として利用できる文字であった場合は、開始、空要素タグのいずれかであるものとして、要素名に該当する部分のコピーを取りながら要素名を出力する。更に、属性の記述があれば、それはコピーを取らずにそのまま出力する。最後に「>」が現れると、開始タグであったと認識し、コピーした情報を破棄し、通常の開始タグとして「>」を出力する。 In order to realize (3), the normalization unit searches for the symbol “<” indicating the start, end, and head of the empty element tag. Since each tag has a grammar of “<element name attribute attribute ...>”, “</ element name>”, and “<element name attribute attribute ... />”, the normalization unit has a grammar of each. Switch the normalization method while recognizing. First, it is confirmed whether or not the next character is “/”. If it is “/”, information of a normal end tag is output as an end tag. On the other hand, if it is a character that can be used as an element name other than that, the element name is output while taking a copy of the part corresponding to the element name, assuming that it is either a start or an empty element tag. Furthermore, if there is a description of the attribute, it is output as it is without making a copy. When ">" appears at the end, it recognizes that it was a start tag, discards the copied information, and outputs ">" as a normal start tag.
一方、「/>」が確認できた場合は、空要素タグであったと認識する。空要素タグであると認識した場合、「>」を出力して開始タグを閉じた直後に、そのコピーした要素名を持つ終了タグを出力する。そして、先に出力した開始タグを閉じる終了タグを正規化XML文書に加える。このようなプロセスを辿ることにより、空要素タグが全て開始及び終了タグの組に正規化される。 On the other hand, if “/>” can be confirmed, it is recognized as an empty element tag. If the tag is recognized as an empty element tag, immediately after closing the start tag by outputting “>”, an end tag having the copied element name is output. Then, an end tag for closing the output start tag is added to the normalized XML document. By following such a process, all empty element tags are normalized to a set of start and end tags.
また(4)を実現するために正規化部は、入力されたXML文書の属性値の囲み記号を確認する。属性の書式は「属性名="属性値"」と、「属性名='属性値'」のいずれかとなる。正規化部が「=」の後に「"」を確認した場合は、既に正規化された書式となっているため、何も加工せずにそのまま属性の情報を最後まで出力する。 In order to realize (4), the normalization unit confirms the enclosing symbol of the attribute value of the input XML document. The attribute format is either “attribute name =“ attribute value ”” or “attribute name = 'attribute value'”. If the normalization unit confirms “” after “=”, the format has already been normalized, and the attribute information is output to the end without any processing.
一方、正規化部が「=」の後に「'」を確認した場合は、代わりに「"」を出力し、それ以降に続く文字が「"」又は「'」ではないことを確認しながら、順次入力された文字をそのまま出力する。もし「"」が入力された場合は、「"」を意味する実体参照である「 """ 」を出力し、属性値として「"」が出力されることを避ける。 On the other hand, when the normalization unit confirms "'" after "=", it outputs "" "instead, and confirms that the subsequent characters are not" "" or "'" Sequentially input characters are output as they are. If "" "is input," "" "" that is an entity reference meaning "" "is output, and" "" is not output as an attribute value.
一方、「'」が入力された場合は、属性値の宣言が終了したと認識し「"」を出力する。そして次の属性の宣言、又はタグの閉じる記号を探すプロセスに移行する。 On the other hand, when “′” is input, it is recognized that the declaration of the attribute value is completed, and ““ ”is output. Then, the process proceeds to the process of searching for the next attribute declaration or tag closing symbol.
以上のような処理を組み合わせることで、正規化部はXML文書を正規化XML文書へ変換できる。 By combining the above processing, the normalization unit can convert the XML document into a normalized XML document.
図2〜図4のそれぞれは、本実施の形態で解析対象となる正規化XML文書、非正規化XML文書、非XML文書の一例を示す図である。 Each of FIG. 2 to FIG. 4 is a diagram illustrating an example of a normalized XML document, a non-normalized XML document, and a non-XML document to be analyzed in the present embodiment.
図2は、正規化XMLの仕様に従って記述されている。図3は、属性値の囲み記号として、XMLでは認められているが正規化XMLでは認められていない記号(')を用いた例を示している。更に図4は、属性値の囲み記号がないためXML文書というカテゴリからも外れている。尚、これら図では、説明のために行番号と改行、空白文字を適宜加えている。 FIG. 2 is described according to the specification of normalized XML. FIG. 3 shows an example in which a symbol (') that is recognized in XML but not allowed in normalized XML is used as an enclosure symbol for an attribute value. Further, FIG. 4 is also out of the category of XML document because there is no surrounding symbol for attribute values. In these figures, line numbers, line feeds, and white space characters are added as appropriate for explanation.
図5は、本実施の形態1に係るDOMパーサ501の機能構成を示すブロック図である。尚、このDOMパーサ501の具体的なハードウェア構成は、前述の図1に示す構成と同様である。
FIG. 5 is a block diagram showing a functional configuration of the
このDOMパーサ501は、正規化XML文書を解析する機能を備える正規化DOMパーサ部502を有している。この正規化DOMパーサ部502は、正規化XML文書の解析、及び正規化XML文書と非正規化XML文書との判別を実行する。解析対象である文書は記憶部508より取得され、その解析結果は、出力インターフェース(I/F)部507を介してアプリケーション509へ伝えられる。記憶部508は、解析対象となる複数の文書を記憶している。記憶されている文書は、入力I/F部506を介して正規化DOMパーサ部502に送られる。
The
正規化DOMパーサ部502は解析した文書に文法違反を発見すると、文法違反情報を生成して文法違反情報確認部503へ伝える。これにより文法違反情報確認部503は、文法違反情報確認テーブルを格納するデータベース505から受け取った文法違反情報が、非正規化XML文書解析時に生成されるものかどうかを判別する。正規化部504は、解析に失敗した文書を正規化して正規化DOMパーサ部502に送出する。
When the normalized
図6は、本発明の実施の形態1に係るDOMパーサ501における処理手順を説明するフローチャートである。以下、解析対象となる文書(図2〜図4)を解析する処理手順を説明する。尚、このフローチャートで示される処理を実行するプログラムは、その実行時にはRAM103に記憶され、CPU101の制御の下に実行される。
(A)図2に示す正規化XML文書を記憶部508より取得する場合を説明する。
FIG. 6 is a flowchart for explaining a processing procedure in the
(A) A case where the normalized XML document shown in FIG. 2 is acquired from the
DOMパーサ501が、入力I/F部506を介して図2に示す正規化XML文書を取得する。まずステップS601では、正規化DOMパーサ部502で、その文書を解析する。この場合、正規化DOMパーサ502は、最後まで文法違反を検出せずに解析を終了し、内部にDOMツリーを構築する。従ってステップS602では文法違反がなかったため、解析対象であるXML文書を正規化XML文書であると判断する。そしてステップS603で、正規化DOMパーサ502内部に構築されたDOMツリーを最終的な解析結果とし、出力I/F部507を介してアプリケーション509へ伝える。こうしてステップS604で、正規化XML文書の解析を正常終了する。
(B)図3に示す非正規化XML文書を記憶部508より取得した場合について説明する。
The
(B) A case where the denormalized XML document shown in FIG. 3 is acquired from the
この場合は、ステップS601の正規化DOMパーサ部502による解析処理において、図3の2行目に記述されている属性値の囲み記号に対する文法違反情報が生成される。これによりステップS602で解析が成功せず、解析対象の文書が、非正規化XML文書或は非XML文書であると判断してステップS605に進む。このとき、正規化DOMパーサ部502内で途中まで構築されていたDOMツリーが破棄され、生成された文法違反情報は文法違反情報確認部503へ伝えられる。これにより文法違反情報確認部503は、図7に示す文法違反情報確認テーブル505から受け取った文法違反情報が、非正規化XML文書解析時に生成されるものかどうかを判断する。
In this case, in the analysis process by the normalized
図7は、本発明の実施の形態1〜2に係る文法違反情報対応テーブル505の具体例を示す図である。
FIG. 7 is a diagram showing a specific example of the grammatical violation information correspondence table 505 according to
ここには、解析の結果、エラーとして判定される「エラー内容」と、その原因がとして「非XML文書であるために発生したエラー」、或は「非正規化文書であるために発生したエラー」であるかが記述されている。尚、図7はあくまでも具体例の一例を示すものであり、これ以外のエラー項目や、エラー原因が含まれていても良い。 Here, “error content” determined as an error as a result of analysis and “error generated because it is a non-XML document” or “error generated because it is a denormalized document” as the cause Is described. Note that FIG. 7 is merely an example of a specific example, and other error items and error causes may be included.
図3の文書の場合は、属性の解析中に、記号「=」の次に記号「'」が出現したという文法違反情報を受け取る。これは図7の700で示すエラー内容に該当する。その結果、解析対象の文書が非正規化XML文書である可能性があると判断する。これによりステップS606からステップS608に進み、その解析に失敗した文書に対して正規化部504にて正規化を行う。次にステップS609で、エラーが発生しなければステップS610に進み、その正規化したXML文書を再度、正規化DOMパーサ502に供給して解析する。そしてステップS611で、文法違反が検出されなければステップS612に進み、その解析対象の文書は非正規化XML文書であると判断し、2度目に解析した結果生成されるDOMツリーをアプリケーション509へ通知する。こうしてステップS613で、非正規化XML文書に対する処理を正常に終了する。
In the case of the document in FIG. 3, grammatical violation information that the symbol “′” appears after the symbol “=” during attribute analysis is received. This corresponds to the error content indicated by 700 in FIG. As a result, it is determined that there is a possibility that the document to be analyzed is a denormalized XML document. As a result, the process proceeds from step S606 to step S608, and normalization is performed by the
一方、ステップS609或はステップS611で、文法違反が検出された時には非XML文書と判断してステップS614に進み、その旨をアプリケーション509へ伝えて、非XML文書に対する処理(異常処理)を終了する。
(C)図4に示す非XML文書を解析する場合を説明する。
On the other hand, if a grammatical violation is detected in step S609 or step S611, the document is determined to be a non-XML document, and the process proceeds to step S614. .
(C) A case where the non-XML document shown in FIG. 4 is analyzed will be described.
図4に示す文書を解析すると、正規化DOMパーサ部502は、属性解析時に記号「=」の次に「"」と「'」以外の記号があるという内容の文法違反情報を生成する。これにより、ステップS606で、非XML文書の場合のみに生成されるエラー内容であると判断してステップS607に進み、その旨をアプリケーション509へ伝えて、非XML文書に対する処理(異常処理)を終了する。
When the document shown in FIG. 4 is analyzed, the normalized
以上説明したように本実施の形態1によれば、正規化XML文書のみに対応した正規化DOMパーサ部502と、正規化部504とを適宜組み合わせながら正規化XML文書及び非正規化XML文書を共に解析できるDOMパーサ501を提供することができる。このDOMパーサを使うことで、入力された文書を最適なコストで解析処理を行うことができる。
As described above, according to the first embodiment, the normalized XML document and the non-normalized XML document are combined with the normalized
<実施の形態2>
次に本発明の実施の形態2について説明する。尚、本実施の形態2に係るDOMパーサのハードウェア構成は図1で示す実施の形態1の構成と同じであるため、その説明を省略する。
<
Next, a second embodiment of the present invention will be described. The hardware configuration of the DOM parser according to the second embodiment is the same as that of the first embodiment shown in FIG.
本実施の形態2では、SAXパーサ部を用いて、正規化XML文書、非正規化XML文書、非XML文書を解析する例を説明する。本実施の形態2は、前述の実施の形態1に対し正規化DOMパーサ部502を正規化SAXパーサ部802に変更している点が異なっている。
In the second embodiment, an example in which a normalized XML document, a non-normalized XML document, and a non-XML document are analyzed using a SAX parser unit will be described. The second embodiment is different from the first embodiment in that the normalized
図8は、本発明の実施の形態2に係るDOMパーサ801の機能構成を示すブロック図で、前述の実施の形態1の構成と共通する部分は同じ記号で示し、それらの説明を省略する。尚、このDOMパーサ801の具体的なハードウェア構成は、前述の図1に示す構成と同様である。
FIG. 8 is a block diagram showing a functional configuration of the
SAXパーサ801は、前述の実施の形態1と同様に、図2〜図4に示す解析対象文書を記憶部508より取得する。このSAXパーサ801は、前述の実施の形態1のDOMパーサ501とは異なり、解析処理の進行に合わせて逐次解析結果をアプリケーション509へ通知するものとする。
The
図9は、本発明の実施の形態2に係るDOMパーサ801における処理手順を説明するフローチャートである。以下、解析対象となる文書(図2〜図4)を解析する処理手順を説明する。尚、このフローチャートで示される処理を実行するプログラムは、その実行時にはRAM103に記憶され、CPU101の制御の下に実行される。
(A)図2に示す正規化XML文書を解析する場合について説明する。
FIG. 9 is a flowchart for explaining a processing procedure in the
(A) A case where the normalized XML document shown in FIG. 2 is analyzed will be described.
この場合は、正規化SAXパーサ802で文法違反が解決されないため、実施の形態1と同様に、ステップS901〜S904で解析を行い、一通り解析が終了するとステップS904からステップS905に進み、正規化XML文書の解析処理を正常に終了する。
(B)図3に示す非正規化XML文書を解析する場合を説明する。
In this case, since the grammatical violation is not resolved by the normalized
(B) A case where the non-normalized XML document shown in FIG. 3 is analyzed will be described.
実施の形態1と同様に、ステップS902で文法違反を検出すると、文法違反情報を生成してステップS906に進む。ステップS906では、前述の実施の形態1とは異なり、それまでの解析結果をアプリケーション509へ通知する。これにより、文法違反情報確認部503の処理(S906から907)に移る前に、アプリケーション509に対して、それまでの解析結果を無効にする情報を通知できる。その後のステップS907〜S915の処理は、前述の実施の形態1のステップS605〜S614の処理と共通である。但し、この実施の形態2では、ステップS910で、正規化部504でXML文書を正規化した後、ステップS609におけるエラー判定処理を省略し、ステップS911で、正規化SAXパーサ802で、その正規化されたXML文書を解析している。そして解析に成功してステップS914で解析が終了するとステップS915で、その正規化XML文書の解析処理を正常に終了する。ここで解析エラーが発生するとステップS909で、異常終了となる。
(C)図4に示す非XML文書を解析する場合を説明する。
As in the first embodiment, when a grammatical violation is detected in step S902, grammatical violation information is generated and the process proceeds to step S906. In step S906, unlike the first embodiment, the
(C) A case where the non-XML document shown in FIG. 4 is analyzed will be described.
この場合は、ステップS902でエラーとなってステップS906に進み、前述の実施の形態1とは異なり、それまでの解析結果をアプリケーション509へ通知する。これにより、文法違反情報確認部503の処理(S906から907)に移る前に、アプリケーション509に対して、それまでの解析結果を無効にする情報を通知できる。そしてステップS908で、非正規化文書で発生するエラーではないためステップS909に進み、非XML文書に対する異常終了処理に進む。
In this case, an error occurs in step S902, and the process advances to step S906 to notify the
以上説明したように本実施の形態2によれば、SAXパーサ801においても、正規化XML文書にのみ対応した正規化SAXパーサ部802と正規化部504とを組み合わせて、最適なコストで解析処理を行うことができる。
As described above, according to the second embodiment, the
<実施の形態3>
次に本発明の実施の形態3を説明する。この実施の形態3では、実施の形態3に係るパーサを用いて正規化XML文書、非正規化XML文書、非XML文書を解析する例を説明する。本実施の形態3は、前述の実施の形態1,2とは異なり、正規化部504が解析対象文書(図2〜図4)を最初に分析する。また正規化パーサ部1002は、正規化DOMパーサ部502、正規化SAXパーサ部802のどちらを利用してもよく、また、正規化XML文書を解析する機能を持つ他のパーサを利用してもよい。
<
Next, a third embodiment of the present invention will be described. In the third embodiment, an example in which a normalized XML document, a denormalized XML document, and a non-XML document are analyzed using the parser according to the third embodiment will be described. In the third embodiment, unlike the first and second embodiments, the
図10は、本発明の実施の形態3に係るパーサ1001の構成を説明するブロック図で、前述の実施の形態の構成(図5)と共通する部分は同じ記号で示している。また、このパーサ1001の具体的なハードウェア構成は、前述の図1に示す構成と同様である。
FIG. 10 is a block diagram for explaining the configuration of the
図10では、入力した文書は、最初に正規化部504に入力されて正規化された後、後段の正規化パーサ部1002に送られる。
In FIG. 10, the input document is first input to the
図11は、本発明の実施の形態3に係るパーサ1001における処理手順を説明するフローチャートである。以下、解析対象となる文書(図2〜図4)を解析する処理手順を説明する。尚、このフローチャートで示される処理を実行するプログラムは、その実行時にはRAM103に記憶され、CPU101の制御の下に実行される。
FIG. 11 is a flowchart illustrating a processing procedure in
まずステップS1101で、記憶部508より取得した解析対象文書を、最初に正規化部504で正規化する。
(A)図2に示す正規化XML文書を解析する場合について説明する。
First, in step S1101, the analysis target document acquired from the
(A) A case where the normalized XML document shown in FIG. 2 is analyzed will be described.
この場合、正規化を行う際に文法違反は検出されないので、ステップS1102でエラーが発生せず、正規化部504は解析対象文章を正規化XML文書であると判断してステップS1103に進む。ステップS1103では、その正規化XML文書を正規化パーサ1002で解析する。そしてステップS1104で解析に成功するとステップS1105に進み、その解析処理の結果をアプリケーション509に通知する。
In this case, since no grammatical violation is detected when normalization is performed, an error does not occur in step S1102, and the
また、アプリケーション509が、正規化XMLか否かの判断結果を必要とした場合はステップS1106で、正規化部504において正規化処理の前後で文字の置換の有無に関する情報を利用し、判断結果を伝えることができる。即ち、ステップS1106で文字の置換が行われるとステップS1107に進み、非正規化XML文書として正常終了する。またステップS1106で文字の置換が行われない場合はステップS1108に進み、正規化XML文書として正常終了する。
(B)図3に示す非正規化XML文書を解析する場合を説明する。
If the
(B) A case where the non-normalized XML document shown in FIG. 3 is analyzed will be described.
この場合も、前述の図2の場合と同様に、正規化部504において正規化処理を実行する。ステップS1102〜S1106では、その正規化結果に基づいて、図2に示す正規化XML文書と同様に処理を行う。こうして解析結果をアプリケーション509へ伝えることができる。
(C)図4に示す非XML文書を解析する場合を説明する。
Also in this case, the normalization processing is executed in the
(C) A case where the non-XML document shown in FIG. 4 is analyzed will be described.
正規化部504又は正規化XMLパーサ部1002で文法違反を検出すると(S1102,S1104)ステップS1109に進み、その旨をアプリケーション509へ伝えるとともに、非XML文書として異常終了する。
If the
以上説明したように本実施の形態3によれば、非正規化XML文書を多く解析する環境であっても正規化パーサ1002を用いた解析を効率良く行うことができる。
As described above, according to the third embodiment, the analysis using the normalized
<実施の形態4>
本実施の形態4及び5では、本実施の形態に係るパーサを備え、ネットワークを介してXML文書を交換するノードの例を示す。まず実施の形態4ではノード側に正規化機能を持たせた場合で説明する。
<Embodiment 4>
In the fourth and fifth embodiments, an example of a node that includes the parser according to the present embodiment and exchanges XML documents via a network will be described. First, the fourth embodiment will be described in the case where a normalization function is provided on the node side.
図12は、本発明の実施の形態4に係るパーサを持つノードが接続されたネットワークを説明する図である。 FIG. 12 is a diagram for explaining a network to which nodes having parsers according to Embodiment 4 of the present invention are connected.
正規化XML対応ノード1213〜1215,1223〜1224は、本実施の形態4に係るパーサを備えている。また、これらのノードは他のノードへXML文書を送る際、常に正規化XML文書を出力する。一方、汎用XML対応ノード1233〜1234は、一般的なパーサを有し、他のノードへは汎用のXML文書を出力する。また、汎用XML対応ノード1233〜1234の持つパーサは正規化されていないXML文書を解析する機能を持つ。
Each of the normalized
これらのノードは各LAN1211,1221,1231に接続され、それぞれゲートウェイ1212,1222,1232を介して共通のWAN1201へ接続されている。全てのノードはそれぞれネットワーク1201,1211,1221,1231上で一意の識別子を持っている。そして全てのノードは、上記LAN1211,1221,1231、ゲートウェイ1212,1222,1232、WAN1201を介することで相互にデータを交換する通信経路を確保している。
These nodes are connected to the
図13は、本実施の形態4に係る正規化XML対応ノード1213の構成を示すブロック図である。尚、このノードのハードウェア構成は、前述の実施の形態1の構成と同じであるためその説明を省略する。
FIG. 13 is a block diagram showing a configuration of a normalized XML
この正規化XML対応ノード1213はパーサ部1301を有し、その内部にはLANを介してXML文書を受け取るための入力I/F部1302と、入力XML文書が正規化XML文書であるか否かを判定する正規化判定部1303とを備える。他の構成要素は前述の実施の形態と同様である。また、他の正規化XML対応ノード1214〜1215,1223〜1224も同様の構成となっている。
This normalized XML
正規化判定部1303は、予めネットワーク上にある正規化XML対応ノードと、該当するノードのネットワークアドレスの対応テーブルを取得しておく。ネットワークアドレスとして、ドメインやサブネットアドレス、ゲートウェイのアドレスといった複数のノードを一括して指し示す情報を利用することもできる。本実施の形態4では、このサブネットアドレスを利用して、LANごとに正規化XML対応ノードを指定するものとする。
The
正規化判定部1303は、正規化XML対応ノードからのXML文書であれば、その文書を正規化パーサ部1002に送り、出力インターフェース部507を介してアプリケーション509に出力する。一方、正規化XML対応ノードからのXML文書でないときは、その受信したXML文書を正規化部504に送って正規化し、その結果を正規化パーサ部1002に送り、出力インターフェース部507を介してアプリケーション509に出力する。
If the
尚、図12では、LAN1211とLAN1221が正規化XML対応ノードから構成されており、各LANに対応するサブネットアドレスを用いることで正規化XML対応ノードを指定できる。
In FIG. 12, the
図14は、本実施の形態4に係るパーサ部1301における処理手順を説明するフローチャートである。以下、他のノードから受け取ったXML文書を解析する処理手順を説明する。尚、このフローチャートで示される処理を実行するプログラムは、その実行時にはRAM103に記憶され、CPU101の制御の下に実行される。
FIG. 14 is a flowchart illustrating a processing procedure in
正規化XML対応ノード1213は、ネットワークを介してXML文書を受け取ると、まずステップS1401で、正規化判定部1303を用いてXML文書の送信元ノードのアドレスを確認する。次にステップS1402で、送信元アドレスが正規化XMLノードに対応するサブネットに含まれていれば、その受け取ったXML文書が正規化XML文書であると判断してステップS1406に進む。ステップS1406で、そのXML文書を正規化パーサ部1002に出力して解析し、ステップS1407で解析に成功したかどうかを判定する。成功した場合はステップS1408に進み、正規化パーサ部1002にて解析した結果をアプリケーションへ通知する。こうしてステップS1409で、正常終了する。一方、ステップS1407で、解析に成功しないと判定した場合はステップS1405に進み、異常終了する。
When the normalized XML
本実施の形態4では、LAN1211とLAN1221に接続されたノード1214〜1215,1223〜1224がサブネットアドレスの情報より正規化XML対応ノードと判断される。よって、これらのノードより受け取ったXML文書は、全て正規化XML文書として判断され、正規化処理を行わずに正規化パーサ部1002により解析が行われる。
In the fourth embodiment, the
一方、送信元アドレスが正規化XMLノードの属するサブネットアドレス以外の場合は、ステップS1402で、汎用XML対応ノードから送信されたXML文書であると判断する。この場合はステップS1403に進み、その文書を正規化部504に送って正規化処理を行う。ここでエラーが発生しなければステップS1406に進み、正規化パーサ部1002による解析及びアプリケーションへの結果の通知を行う(S1406〜1408)。もしエラーが発生するとステップS1405で、異常終了となる。
On the other hand, if the source address is other than the subnet address to which the normalized XML node belongs, it is determined in step S1402 that the document is an XML document transmitted from the general-purpose XML compatible node. In this case, the process proceeds to step S1403, and the document is sent to the
以上説明したように本実施の形態4によれば、必要な場合のみ正規化を行い、正規化XML文書に対して、高速かつ軽量な正規化XML部のみを利用するパーサを提供することができる。このパーサを使うことで、受信したデータ毎に最適なコストで解析処理を行うことができる。 As described above, according to the fourth embodiment, it is possible to provide a parser that performs normalization only when necessary and uses only a fast and lightweight normalized XML portion for a normalized XML document. . By using this parser, analysis processing can be performed at an optimal cost for each received data.
尚、正規化判定部1303がネットワーク上のアドレスと正規化、非正規化ネットワークとの対応情報を持たない場合でも、前述の実施の形態1〜3に示した各パーサを正規化XML対応ノード内のパーサ部1301として利用する。すると、正規化・汎用XML対応ノードとのXML文書の交換を効率良く行うことができる。
Even when the
<実施の形態5>
この実施の形態5では、ゲートウェイ側に正規化機能を持たせ、ゲートウェイとノードで一組の汎用パーサとする例を示す。前述の実施の形態4とは異なり、正規化XML対応ノードは正規化判定部1303や正規化部504を備えず、正規化XML対応ノードが属するLANを管理するゲートウェイ1212,1222側で正規化判定部1303、正規化部504を備える。
<Embodiment 5>
The fifth embodiment shows an example in which a normalization function is provided on the gateway side, and a set of general-purpose parsers is configured with the gateway and the node. Unlike the above-described fourth embodiment, the normalization XML compatible node does not include the
図15は、本発明の実施の形態5に係るゲートウェイ1501の構成を示すブロック図で、前述の図13と共通する部分は同じ記号で示し、それらの説明を省略する。
FIG. 15 is a block diagram showing the configuration of the
WANインターフェース部1502は、WAN1201と、このゲートウェイ1501とを接続するインターフェース部である。正規化判定部1303は、WANインターフェース部1502から入力した文書が正規化XML文書かどうかを判定し、正規化XML文書であれば、その文書をLANインターフェース部1503を介してLAN1211に出力する。一方、正規化XML文書でないときは、その受信したXML文書を正規化部504に送って正規化し、その結果をLANインターフェース部1503を介してLAN1211に出力する。
The
図16は、実施の形態5に係るノード1601の構成を示すブロック図で、前述の図5、図13と共通する部分は同じ記号で示し、それらの説明を省略する。
FIG. 16 is a block diagram illustrating the configuration of the
図15に示すゲートウェイ1501は、内部に正規化判定部1303を備え、前述の実施の形態4と同様の方法で正規化及び非正規化XML文書を判定する。正規化部504も前述の実施の形態4の正規化部と同様の処理を行う。
A
図16に示す正規化XML対応ノード1601は、内部に正規化パーサ部1002を備え、これも実施の形態4と同様の処理を行う。
A normalized
図17は、本発明の実施の形態5に係るゲートウェイ1501の処理手順を示すフローチャートである。尚、このフローチャートで示される処理を実行するプログラムは、その実行時にはRAM103に記憶され、CPU101の制御の下に実行される。
FIG. 17 is a flowchart showing a processing procedure of the
LAN1211内のノード間でXML文書を交換する場合、ゲートウェイ1212を経由しないため、各ノード間で直接、正規化XML文書が交換される。この処理手順は図示しないが、例えば、正規化XML対応ノード1214から正規化XML対応ノード1213へメッセージが送られた場合、正規化XML対応ノード1214は正規化XML文書のみを出力する。このため、そのままXML対応ノード1213が備える正規化パーサ部1002で、その文書を解析し、アプリケーション509へメッセージの内容を伝える(図16)。
When XML documents are exchanged between nodes in the
一方、例えば正規化XML対応ノード1214が他のLAN1221に属する正規化XML対応ノード1223からメッセージを受け取る場合、このメッセージは、順にゲートウェイ1222,1212を転送される。ゲートウェイ1222は、LAN1221からWAN1201の方向に転送するメッセージに対しては何も加工せずにそのまま転送する。一方、ゲートウェイ1212は、WAN1201からLAN1211へ転送するメッセージに対して、前述の実施の形態4と同様の正規化判定を行う。今回は正規化XML対応ノード1223から送られたメッセージであるため、正規化XML文書であると判断し(S1702)、そのままLAN1211へ転送する(S1706)。正規化対応ノード1214も、その受け取ったメッセージをそのまま正規化XML文書として解析し、アプリケーション509へ内容を通知する。
On the other hand, for example, when the normalized XML
また例えば正規化XML対応ノード1214が他のLAN1231に属する汎用XML対応ノード1233からメッセージを受け取る場合も順に、ゲートウェイ1232,1212を転送される。ゲートウェイ1232は通常のゲートウェイであるため、メッセージを何も加工せずにLAN1231からWAN1201の方向に転送する。ゲートウェイ1212は、WAN1201からLAN1211へ転送するメッセージに対して、前述の実施の形態4と同様の正規化判定を行う。今回は汎用XML対応ノード1233から送られたメッセージであるため、ステップS1702で非正規化XML文書であると判断する。よってステップS1703に進み、正規化部504で正規化した後ステップS1706に進み、その正規化したXML文書をLAN1211へ転送する。正規化対応ノード1214は、受け取ったメッセージが既に正規化されているため、そのまま正規化XML文書として解析を行い、アプリケーション509へ内容を通知する。
Further, for example, when the normalized XML
以上説明したように本実施の形態5によれば、正規化XML対応ノードが属するLAN内部では正規化XML文書のみが転送されるようになる。そのため実施の形態4では正規化XML対応ノードに持たせていた正規化判定部や正規化部が不要となり、正規化XML対応ノードが非常に軽量かつ高速なものを実装することができるようになる。 As described above, according to the fifth embodiment, only the normalized XML document is transferred inside the LAN to which the normalized XML compatible node belongs. Therefore, the normalization determination unit and the normalization unit provided in the normalized XML compatible node in the fourth embodiment are not necessary, and the normalized XML compatible node can be implemented with a very light and high speed. .
一方で、ゲートウェイ側の負荷は上がるが、小型軽量安価といった特徴が求められるノードよりも比較的コストをかけることができる。また、直接ユーザが触れるものではなく小型軽量等の要求が強く求められるものでもないため負荷に対応し易い。よって、正規化処理に必要な資源を各ノードからゲートウェイに集中させることで、総合的に見てパフォーマンスを向上させることができる。 On the other hand, although the load on the gateway side increases, it can be more costly than a node that requires features such as small size and light weight. In addition, it is not something that is directly touched by the user, and is not strongly demanded for a small size and light weight, so it is easy to cope with the load. Therefore, by concentrating resources necessary for normalization processing from each node to the gateway, it is possible to improve performance in a comprehensive manner.
尚、本実施の形態5では、ゲートウェイに正規化判定部1303を持たせたが、ホストの情報ではなく、転送するデータ自体を解析して正規化文書か、非正規化文書かを判定することもできる。その場合は、正規化判定部に正規化XMLとして要求される文法情報を持たせ、転送データと比較するなどの方法を取る方法などが利用できる。
In the fifth embodiment, the gateway has the
図18は、本発明の実施の形態5の変形例であるゲートウェイ1501の構成を示すブロック図である。この図18に示すように、図15に示す正規化判定部1303を無くし、WAN1201からLANへ転送されるXML文書に対し全て正規化を行うようにしてもよい。元々正規化されているXML文書を更に正規化しても結果に影響はないため、図15に示すゲートウェイを利用した場合と同様に、LANで正規化XML文書のみ利用する環境が保たれ、同様の効果を奏することができる。
FIG. 18 is a block diagram showing a configuration of a
(他の実施形態)
以上、本発明の実施形態について詳述したが、本発明は、複数の機器から構成される文書処理システムに適用しても良いし、また、一つの機器からなる文書処理装置に適用しても良い。
(Other embodiments)
The embodiment of the present invention has been described in detail above. However, the present invention may be applied to a document processing system including a plurality of devices or a document processing apparatus including a single device. good.
なお、本発明は、前述した実施形態の機能を実現するソフトウェアのプログラムを、システム或いは装置に直接或いは遠隔から供給し、そのシステム或いは装置のコンピュータが該供給されたプログラムを読み出して実行することによっても達成され得る。上記実施形態では、図5から7、及び図9から13のフローチャートに対応したプログラムである。その場合、プログラムの機能を有していれば、形態は、プログラムである必要はない。 従って、本発明の機能処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明のクレームでは、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。 In the present invention, a software program that implements the functions of the above-described embodiments is supplied directly or remotely to a system or apparatus, and the computer of the system or apparatus reads and executes the supplied program. Can also be achieved. In the above embodiment, the program corresponds to the flowcharts of FIGS. 5 to 7 and FIGS. 9 to 13. In that case, as long as it has the function of a program, the form does not need to be a program. Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. That is, the claims of the present invention include the computer program itself for realizing the functional processing of the present invention. In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS.
プログラムを供給するための記録媒体としては、様々なものが使用できる。例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)などである。 Various recording media for supplying the program can be used. For example, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD- R).
その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続し、該ホームページからハードディスク等の記録媒体にダウンロードすることによっても供給できる。その場合、ダウンロードされるのは、本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルであってもよい。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明のクレームに含まれるものである。 As another program supply method, the program can be supplied by connecting to a home page on the Internet using a browser of a client computer and downloading the program from the home page to a recording medium such as a hard disk. In this case, the computer program itself of the present invention or a compressed file including an automatic installation function may be downloaded. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the claims of the present invention.
また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布する形態としても良い。その場合、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報を使用することにより暗号化されたプログラムが実行可能な形式でコンピュータにインストールされるようにする。 Further, the program of the present invention may be encrypted, stored in a storage medium such as a CD-ROM, and distributed to users. In that case, a user who has cleared a predetermined condition is allowed to download key information to be decrypted from a homepage via the Internet, and using the key information, the encrypted program can be executed on a computer in a format that can be executed. To be installed.
また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される形態以外の形態でも実現可能である。例えば、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。 Further, the present invention can be realized in a form other than the form in which the functions of the above-described embodiments are realized by the computer executing the read program. For example, based on the instructions of the program, an OS or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can also be realized by the processing.
更に、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれるようにしてもよい。この場合、その後で、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ない、その処理によって前述した実施形態の機能が実現される。 Furthermore, the program read from the recording medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. In this case, thereafter, based on the instructions of the program, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing. .
Claims (11)
正規化XML文書を解析する正規化XML解析手段と、
非正規化XML文書を正規化XML文書へ変換して前記正規化XML解析手段に供給する正規化手段と、
入力された文書が、少なくとも正規化XML文書であるか否かを識別する識別手段とを備え、
前記識別手段で正規化XML文書でないと識別されたXML文書を前記正規化手段により正規化XML文書へ変換して前記正規化XML解析手段で解析することを特徴とする文書処理装置。 A document processing device for analyzing an input structured document,
Normalized XML analysis means for analyzing the normalized XML document;
Normalization means for converting an unnormalized XML document into a normalized XML document and supplying the normalized XML document to the normalized XML analysis means;
Identification means for identifying whether the input document is at least a normalized XML document,
A document processing apparatus characterized in that an XML document identified as not being a normalized XML document by the identifying means is converted into a normalized XML document by the normalizing means and analyzed by the normalized XML analyzing means.
前記データベースを参照して前記入力された文書の文法を識別し、前記入力した文書を非正規化XML文書、正規化XML文書、及び非XML文書のいずれかに分類することを特徴とする請求項1記載の文書処理装置。 The identification means has a database for storing grammatical rule information of the XML document,
The grammar of the input document is identified with reference to the database, and the input document is classified into any one of a denormalized XML document, a normalized XML document, and a non-XML document. 1. The document processing apparatus according to 1.
正規化XML文書を解析する正規化XML解析手段と、
入力した文書を正規化XML文書へ変換して前記正規化XML解析手段に供給する正規化手段と、
前記正規化手段により正規化できない文書を非XML文書として判別する判別手段と、を備えることを特徴とする文書処理装置。 A document processing device for analyzing an input structured document,
Normalized XML analysis means for analyzing the normalized XML document;
Normalization means for converting the input document into a normalized XML document and supplying the normalized XML document to the normalized XML analysis means;
And a discriminating unit that discriminates a document that cannot be normalized by the normalizing unit as a non-XML document.
正規化XML文書を解析する正規化XML解析工程と、
非正規化XML文書を正規化XML文書へ変換して前記正規化XML解析工程に供給する正規化工程と、
入力した文書が、少なくとも正規化XML文書であるか否かを識別する識別工程とを備え、
前記識別工程で正規化XML文書でないと識別されたXML文書を前記正規化工程により正規化XML文書へ変換して前記正規化XML解析工程で解析することを特徴とする文書処理方法。 A document processing method for inputting and analyzing a structured document,
A normalized XML analysis step of analyzing the normalized XML document;
A normalization step of converting a non-normalized XML document into a normalized XML document and supplying it to the normalized XML analysis step;
An identification step for identifying whether the input document is at least a normalized XML document,
A document processing method, wherein an XML document identified as not a normalized XML document in the identifying step is converted into a normalized XML document by the normalizing step and analyzed in the normalized XML analyzing step.
正規化XML文書を解析する正規化XML解析工程と、
入力した文書を正規化XML文書へ変換して前記正規化XML解析工程に供給する正規化工程と、
前記正規化工程により正規化できない文書を非XML文書として判別する判別工程と、を備えることを特徴とする文書処理方法。 A document processing method for inputting and analyzing a structured document,
A normalized XML analysis step of analyzing the normalized XML document;
A normalization step of converting the input document into a normalization XML document and supplying the normalization XML document to the normalization XML analysis step;
And a determination step of determining a document that cannot be normalized by the normalization step as a non-XML document.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005311802A JP2007122278A (en) | 2005-10-26 | 2005-10-26 | Document processing device and method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005311802A JP2007122278A (en) | 2005-10-26 | 2005-10-26 | Document processing device and method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007122278A true JP2007122278A (en) | 2007-05-17 |
JP2007122278A5 JP2007122278A5 (en) | 2008-12-11 |
Family
ID=38146079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005311802A Pending JP2007122278A (en) | 2005-10-26 | 2005-10-26 | Document processing device and method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007122278A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101532252B1 (en) * | 2013-08-23 | 2015-07-01 | (주)타파크로스 | The system for collecting and analyzing of information of social network |
CN111125997A (en) * | 2019-12-27 | 2020-05-08 | 中国银行股份有限公司 | Text data standardization processing method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09102777A (en) * | 1995-10-05 | 1997-04-15 | Casio Comput Co Ltd | Communication input and output controller |
JP2002163248A (en) * | 2000-11-24 | 2002-06-07 | Fujitsu Ltd | Structured document compressor, structured document restoring device and structured document processing system |
JP2003271508A (en) * | 2002-03-14 | 2003-09-26 | Ntt Comware Corp | Contents conversion system for portable terminal and contents conversion method |
JP2005056096A (en) * | 2003-08-01 | 2005-03-03 | Spicysoft Kk | Communication system and method, server device, and portable telephone terminal |
JP2005148779A (en) * | 2003-11-11 | 2005-06-09 | Hitachi Ltd | Information terminal, log management device, content providing device, content providing system and log management method |
JP2005242427A (en) * | 2004-02-24 | 2005-09-08 | Sony Corp | Information processing apparatus, method and program |
-
2005
- 2005-10-26 JP JP2005311802A patent/JP2007122278A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09102777A (en) * | 1995-10-05 | 1997-04-15 | Casio Comput Co Ltd | Communication input and output controller |
JP2002163248A (en) * | 2000-11-24 | 2002-06-07 | Fujitsu Ltd | Structured document compressor, structured document restoring device and structured document processing system |
JP2003271508A (en) * | 2002-03-14 | 2003-09-26 | Ntt Comware Corp | Contents conversion system for portable terminal and contents conversion method |
JP2005056096A (en) * | 2003-08-01 | 2005-03-03 | Spicysoft Kk | Communication system and method, server device, and portable telephone terminal |
JP2005148779A (en) * | 2003-11-11 | 2005-06-09 | Hitachi Ltd | Information terminal, log management device, content providing device, content providing system and log management method |
JP2005242427A (en) * | 2004-02-24 | 2005-09-08 | Sony Corp | Information processing apparatus, method and program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101532252B1 (en) * | 2013-08-23 | 2015-07-01 | (주)타파크로스 | The system for collecting and analyzing of information of social network |
CN111125997A (en) * | 2019-12-27 | 2020-05-08 | 中国银行股份有限公司 | Text data standardization processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7391735B2 (en) | Parsing messages with multiple data formats | |
Bjorklund | YANG-a data modeling language for the network configuration protocol (NETCONF) | |
US7240279B1 (en) | XML patterns language | |
US7954051B2 (en) | Methods and apparatus for converting markup language data to an intermediate representation | |
US20030115548A1 (en) | Generating class library to represent messages described in a structured language schema | |
US20070136698A1 (en) | Method, system and apparatus for a parser for use in the processing of structured documents | |
JP2008123395A (en) | Program, copy and paste processing method, device, and recording medium | |
US20090037801A1 (en) | Method and apparatus for automatic user manual generation | |
US6766350B1 (en) | Shared management of data objects in a communication network | |
CN101149746A (en) | Method for finding at least one web service among a plurality of web services | |
JPH1165832A (en) | Source code converting method and record medium | |
JP2007122278A (en) | Document processing device and method, and program | |
WO2020031845A1 (en) | Api specification generation device, api specification generation method, and program | |
Cameron | Rex: Xml shallow parsing with regular expressions | |
KR20070062800A (en) | Method for transforming of electronic document based on mapping rule and system thereof | |
US7769896B2 (en) | Method, apparatus and system for dispatching messages within a system | |
JP4207992B2 (en) | Structured document processing system and structured document processing method | |
JP2003345798A (en) | Method and device for controlling translation, and its processing program | |
JP2008210214A (en) | Information processor, communication control processing function addition method and communication control processing function addition program | |
JP2006202176A (en) | Document management system and document management method | |
JP4624044B2 (en) | Communication system between programs, communication method between programs, data structure generation system and program | |
JP3312593B2 (en) | A management method by converting the translation list output by the language compiler on the host computer into HTML | |
JP4447373B2 (en) | Data exchange computer | |
AU2016247060B2 (en) | Translating xml with multiple namespace extensions | |
Bjorklund | RFC 7950: The YANG 1.1 Data Modeling Language |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081024 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20081024 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110121 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110317 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110624 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110818 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110912 |