JP4447067B2 - Document type definition converter - Google Patents

Document type definition converter Download PDF

Info

Publication number
JP4447067B2
JP4447067B2 JP02661399A JP2661399A JP4447067B2 JP 4447067 B2 JP4447067 B2 JP 4447067B2 JP 02661399 A JP02661399 A JP 02661399A JP 2661399 A JP2661399 A JP 2661399A JP 4447067 B2 JP4447067 B2 JP 4447067B2
Authority
JP
Japan
Prior art keywords
name
tag
tag name
syntax element
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP02661399A
Other languages
Japanese (ja)
Other versions
JP2000222404A (en
Inventor
清隆 黒田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP02661399A priority Critical patent/JP4447067B2/en
Publication of JP2000222404A publication Critical patent/JP2000222404A/en
Application granted granted Critical
Publication of JP4447067B2 publication Critical patent/JP4447067B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、文書型定義により作成された文書を伝送する際に、文書のデータ量を短縮する文書型定義変換装置に関するものである。
【0002】
【従来の技術】
文書をデータ伝送等の情報処理に使用する場合、文書の構造を明示する方式で情報処理が行われる。この方式では、文書の構造は、ISO(International Standards Organization 国際標準化機構)規格によるSGML(Standard Generalized Markup Language)という言語、又はXML(eXtensible Markup Language)という言語を使用し、DTD(Document Type Definition 文書型定義)により定義されている。このDTDは、文書の構成要素の名前と、その構成要素における互いの構造上の関係を定義したものである。
【0003】
このDTDにより作成された文書は、文字列の内容、特徴等を示すタグ名が記号「<」と記号「>」の間に挿入されたタグを含んでおり、タグ付き文書と呼ばれている。このようなタグ付き文書では、タグを目印として、各文書の共通の情報を容易に抽出することができるので、多数の文書の蓄積、加工、伝送等を行う上で有効である。
【0004】
ところが、このようなタグ付き文書をEDI(Electronic Data Interchange 電子的データ交換)等に適用し、データ伝送を多数回繰り返してデータ交換を行うと、各文書で共通なタグが繰り返し伝送されることになる。
【0005】
【発明が解決しようとする課題】
従来は、以上のように、EDI等において、DTDにより作成された各文書で共通なタグを繰り返し伝送しているので、全体のデータ伝送量が大きくなり、通信コストが高くなるという課題があった。
【0006】
この発明は上記のような課題を解決するためになされたもので、伝送する文書のデータ量を短縮し、通信コストを削減する文書型定義変換装置を得ることを目的とする。
【0007】
【課題を解決するための手段】
この発明に係る文書型定義変換装置は、文書の構造を定義した文書型定義から、構文要素を抽出する構文要素抽出部と、上記構文要素抽出部が抽出した構文要素を解析する構文要素解析部と、上記構文要素に含まれている文字列の内容等を示すタグ名に対応する短縮タグ名をタグ名対応表として格納するタグ名メモリと、上記タグ名とそのタグ名に付属する属性名に対応する短縮タグ名と短縮属性名を属性名対応表として格納する属性名メモリと、上記構文要素解析部により解析した構文要素に、上記タグ名が含まれている場合に、上記タグ名メモリを検索して上記タグ名を上記短縮タグ名に変換すると共に、上記構文要素解析部により解析した構文要素に、上記属性名が付加されたタグ名が含まれている場合に、上記属性名メモリを検索して上記タグ名及び上記属性名を、上記短縮タグ名及び上記短縮属性名に変換する構文要素変換部と、上記構文要素変換部が変換した上記短縮タグ名及び上記短縮属性名により構成された構文要素を結合し短縮文書型定義として出力する出力部とを備え、構文要素変換部がタグ名メモリを検索した際に、上記タグ名メモリに検索したタグ名が格納されていない場合、そのタグ名に対応する短縮タグ名を生成し、上記タグ名メモリに格納し、構文要素変換部が属性名メモリを検索した際に、上記属性名メモリに検索したタグ名と属性名が格納されていない場合、そのタグ名に対応する短縮タグ名とその属性名に対応する短縮属性名を生成し、上記属性名メモリに格納するものである。
0008
この発明に係る文書型定義変換装置は、構文要素解析部が、抽出された構成要素について、タグ名のないコメントであるか、属性名が付加されていないタグ名により構成された要素型宣言であるか、属性名が付加されているタグ名により構成された属性リスト型宣言であるかを解析するものである。
0009
【発明の実施の形態】
以下、この発明の実施の一形態を説明する。
実施の形態1.
図1は実施の形態1による文書変換装置の構成を示す図である。図において、1は文書変換装置、2は文書型定義(DTD)により作成された文書型定義整合文書、3は文書変換装置1により変換された短縮文書型定義整合文書、4は文書型定義整合文書2に使用されている文字列の内容等を示すタグ名と、短縮された短縮タグ名との対応を示すタグ名対応表、5は文書型定義整合文書2に使用されているタグ名、及びそのタグ名に付属する属性名と、短縮された短縮タグ名、及び短縮された短縮属性名との対応を示す属性名対応表である。
0010
また、図1の文書変換装置1において、11はタグ名対応表4が格納されているタグ名メモリ、12は属性名対応表5が格納されている属性名メモリ、13は文書型定義整合文書2から構文要素を抽出する構文要素抽出部、14は構文要素抽出部13が抽出した構文要素を解析する構文要素解析部である。15は構文要素におけるタグ名、属性名により、タグ名メモリ11,属性名メモリ12を検索し、タグ名、属性名を短縮タグ名、短縮属性名に変換する構文要素変換部であり、16は構文要素変換部15が変換した構文要素を結合し短縮文書型定義整合文書3として出力する出力部である。
0011
図2はEDI等で使用される文書型定義整合文書2の例を示す図である。図において、101の「<?xml version…>」はバージョン情報、102の「<!DOCTYPE 見積依頼情報 SYSTEM ……>」は文書型宣言、103の「<見積依頼情報>……</見積依頼情報>」は文書型定義整合文書2の本文が記載されている部分、104の「m_irai.dtd」はファイル名を示している。
0012
また、図2において、105の「見積依頼情報」、「見積依頼番号」、「見積依頼日」、「数量」、「商品番号」はタグ名、106の「年」、「月」、「日」は属性名、107の「年=…月=…日=…」は属性リスト、108の「<……>」は構文要素、109の「<タグ名105>」はタグを示す。このように、タグ名105は、文字列の内容、特徴、性質等を示す情報であり、属性名106は、タグ名105を識別するための指標を示している。また、バージョン情報101には、タグ名105が含まれていないが、文書型宣言102には、タグ名105が含まれている。
0013
図3はタグ名対応表4を示す図であり、図において、115は各タグ名105に対応した短縮タグ名である。図3に示すように、タグ名対応表4は、タグ名105に対応した短縮タグ名115が記載されており、タグ名メモリ11に格納されている。
0014
図4は属性名対応表5を示す図であり、図において、116は属性名106に対応した短縮属性名である。図4に示すように、属性名対応表5は、各タグ名105に対応した短縮タグ名115と、属性名106に対応した短縮属性名116が記載されており、属性名メモリ12に格納されている。
0015
次に動作について説明する。
図5は文書変換装置1の処理を示すフローチャートである。ステップST11において、構文要素抽出部13は、図2に示す文書型定義整合文書2から構文要素108を抽出する。すなわち、図2における1つの「<……>」を抽出する。ステップST12において、構文要素解析部14は、抽出された構文要素108が文書型宣言102であるかをチェックする。
0016
上記ステップST12において、抽出された構文要素108が文書型宣言102でない場合、ステップST13において、構文要素解析部14は、抽出された構文要素108がタグ109であるかをチェックする。すなわち、構文要素108が「<タグ名105>」であるかをチェックする。
0017
上記ステップST13において、抽出された構文要素108がタグ109でない場合、例えば、図2に示すバージョン情報101の場合、ステップST14において、構文要素変換部15は、抽出された構文要素108を、そのまま出力して、ステップST15において、文書型定義整合文書2に次の構文要素108があるかをチェックし、次の構文要素108がある場合には、ステップST11以降の処理を行う。
0018
上記ステップST15において、文書型定義整合文書2に次の構文要素108がない場合は、ステップST16において、出力部16は、構文要素変換部15が出力した各構文要素108を結合し、短縮文書型定義整合文書3として出力する。
0019
上記ステップST13において、抽出された構文要素108がタグ109である場合、例えば、図2に示す「<見積依頼番号>」の場合、ステップST17において、構文要素解析部14は、タグ109の中に属性リスト107があるかをチェックする。
0020
上記ステップST17において、タグ109の中に属性リスト107がない場合、例えば、図2に示す「<見積依頼番号>」の場合、ステップST18において、構文要素変換部15は、タグ109の中のタグ名105により、タグ名メモリ11を検索し、タグ名105に対応する短縮タグ名115を抽出する。例えば、「見積依頼番号」に対応する「B」を抽出する。
0021
ステップST19において、構文要素変換部15は、タグ名105を短縮タグ名115に変換して、例えば、「見積依頼番号」を「B」に変換して、ステップST14以降の処理を行う。
0022
上記ステップST17において、タグ109の中に属性リスト107がある場合、例えば、図2に示す「<見積依頼日 年=“1998” 月=“7” 日=“28”>」の場合、ステップST20において、構文要素変換部15は、タグ109の中のタグ名105と属性名106により、属性名メモリ12を検索し、タグ名105に対応する短縮タグ名115と、属性名106に対応する短縮属性名116を抽出する。例えば、「見積依頼日」に対応する「C」と、「年」に対応する「C1」,「月」に対応する「C2」,「日」に対応する「C3」を抽出する。
0023
ステップST21において、構文要素変換部15は、タグ名105を短縮タグ名115に変換し、属性名106を短縮属性名116に変換して、例えば、「見積依頼日」を「C」に変換し、「年」を「C1」,「月」を「C2」,「日」を「C3」に変換して、ステップST14以降の処理を行う。
0024
上記ステップST12において、抽出された構文要素108が文書型宣言102である場合、例えば、図2に示す文書型宣言102の「<!DOCTYPE 見積依頼情報 SYSTEM…」の場合、ステップST22において、構文要素変換部15は、タグ109の中のタグ名105により、タグ名メモリ11を検索し、タグ名105に対応する短縮タグ名115を抽出する。例えば、「見積依頼情報」に対応する「A」を抽出する。
0025
ステップST23において、構文要素変換部15は、タグ名105を短縮タグ名115に変換、例えば、「見積依頼情報」を「A」に変換する。ステップST24において、構文要素変換部15は、文書型宣言102の中のファイル名104を変換、例えば、文書型宣言102の中の「m_irai.dtd」を「m_irai_c.dtd」に変換して、ステップST14以降の処理を行う。
0026
上記処理において、例えば、図2に示す「<見積依頼番号>ABCD0001</見積依頼番号>」における「<……>」以外の「ABCD0001」は、そのまま出力される。
0027
図6は文書変換装置1により変換された短縮文書型定義整合文書3を示す図であり、図2の文書型定義整合文書2に対して、タグ名105、属性名106が短縮タグ名115、短縮属性名116に変換され、ファイル名104が114に変換されている。図2に示す文書型定義整合文書2のデータ量は302バイトであるが、図6に示す短縮文書型定義整合文書3のデータ量は157バイトであり、データ量がほぼ1/2に削減されている。このように、データ量が削減された短縮文書をEDIに使用することにより、データ伝送量が小さくなる。
0028
伝送された短縮文書型定義整合文書3を受信する受信側では、送信側と同じタグ名対応表4と属性名対応表5を保有しておくことにより、伝送された短縮文書型定義整合文書3を元の文書型定義整合文書2に読み替えることができる。
0029
また、受信側で文書変換装置1と同等の文書変換装置を備えておくことにより、伝送された短縮文書型定義整合文書3を元の文書型定義整合文書2に自動的に変換することも可能である。例えば、図1の構成で、文書型定義整合文書2と短縮文書型定義整合文書3を入れ替え、構文要素変換部15が、短縮タグ名115,短縮属性名116により、タグ名メモリ11,属性名メモリ12を検索し、タグ名105,属性名106に変換すれば良い。
0030
以上のように、この実施の形態1によれば、EDI等の少量のデータ交換を多数回繰り返し行う場合に、構文要素変換部15が、タグ名105,属性名106を、短縮タグ名115,短縮属性名116に変換することにより、伝送するデータ量を削減でき、通信コストを安くすることができるという効果が得られる。
0031
実施の形態2.
図7は実施の形態2による文書型定義変換装置6を示す図である。図において、6は実施の形態1におけるタグ名対応表4,属性名対応表5を自動的に生成、更新する文書型定義変換装置である。7は文EDI等で使用する文書型定義(DTD)、8は文書型定義変換装置6により変換された短縮文書型定義である。
0032
また、図7の文書型定義変換装置6において、61はタグ名105を格納するタグ名メモリ、62は属性名106を格納する属性名メモリ、63は文書型定義7から構文要素を抽出する構文要素抽出部、64は構文要素抽出部63が抽出した構文要素を解析する構文要素解析部である。65は構文要素におけるタグ名105,属性名106により、タグ名メモリ61,属性名メモリ62を検索し、短縮タグ名115,短縮属性名116に変換する構文要素変換部である。
0033
さらに、図7において、66は構文要素変換部65の指示により、タグ名メモリ61に格納されていないタグ名105に対応する短縮タグ名115を生成する短縮タグ名生成部であり、67は構文要素変換部65の指示により、属性名メモリ62に格納されていないタグ名105,属性名106に対応する短縮タグ名115,短縮属性名116を生成する短縮属性名生成部であり、68は構文要素変換部65が変換した構文要素を結合し短縮文書型定義8として出力する出力部である。
0034
図8は文書型定義7の例を示す図である。図において、201の「<!−− 見積依頼DTD例…>」はコメント、202の「<!ELEMENT…>」は要素型宣言、203の「<!ATTLIST…>」は属性リスト宣言、204の「(……)」は内容モデル、205の「EMPYTY」,「CDATA」,「#PCDATA」はシステム定義を示している。また、タグ名105,属性名106,構文要素108は、実施の形態1の図2と同じものである。
0035
次に動作について説明する。
図9は文書型定義変換装置6の処理を示すフローチャートである。ステップST31において、構文要素抽出部63は、図8に示す文書型定義7から構文要素108を抽出する。すなわち、図8における1つの「<……>」を抽出する。ステップST32において、構文要素解析部64は、抽出された構文要素108が要素型宣言202であるかをチェックする。
0036
上記ステップST32において、抽出された構文要素108が要素型宣言202でない場合、ステップST33において、構文要素解析部64は、抽出された構文要素108が属性リスト宣言203であるかをチェックする。
0037
上記ステップST33において、抽出された構文要素108が属性リスト宣言203でない場合、例えば、図8に示すコメント201の場合、ステップST34において、構文要素変換部65は、抽出された構文要素108を、そのまま出力して、ステップST35において、文書型定義7に次の構文要素108があるかをチェックし、次の構文要素108がある場合には、ステップST31以降の処理を行う。
0038
上記ステップST35において、文書型定義7に次の構文要素108がない場合には、ステップST36において、出力部68は、構文要素変換部65が出力した各構文要素108を結合し、短縮文書型定義8として出力する。
0039
上記ステップST32において、抽出された構文要素108が要素型宣言202である場合、例えば、図8に示す202の「<!ELEMENT 見積依頼情報…>」である場合、ステップST37において、構文要素変換部65は、要素型宣言202の中のタグ名105により、タグ名メモリ61を検索し、タグ名105に対応する短縮タグ名115を抽出し、例えば、「見積依頼情報」に対応する「A」を抽出し、構文要素変換部65は、タグ名105を短縮タグ名115に変換、例えば、「見積依頼情報」を「A」に変換する。
0040
ステップST38において、構文要素解析部64は、抽出された要素型宣言202の中に、内容モデル204「(……)」があるかをチェックし、内容モデル204がない場合には、例えば図8の要素型宣言202の「<!ELEMENT 見積依頼日 EMPTY>」である場合には、ステップST34以降の処理を行う。
0041
上記ステップST38において、内容モデル204がある場合には、ステップST39において、構文要素解析部64は、内容モデル204にシステム定義205があるかをチェックし、システム定義205がある場合には、例えば、図8の要素型宣言202の「<!ELEMENT 見積依頼番号 (#PCDATA)>」である場合には、ステップST34以降の処理を行う。
0042
上記ステップST39において、システム定義205がない場合には、例えば、図8の要素型宣言202の「<!ELEMENT 見積依頼情報 (見積依頼番号 見積依頼日 数量 商品番号)>」である場合には、ステップST40において、構文要素変換部65は、内容モデル204の中のタグ名105により、タグ名メモリ61を検索し、タグ名105に対応する短縮タグ名115を抽出し、例えば、「見積依頼番号」に対応する「B」,「見積依頼日」に対応する「C」,「数量」に対応する「D」,「商品番号」に対応する「E」を抽出し、構文要素変換部65は、タグ名105を短縮タグ名115に変換、例えば、「見積依頼番号」を「B」,「見積依頼日」を「C」,「数量」を「D」,「商品番号」を「E」に変換し、ステップST34以降の処理を行う。
0043
上記ステップST33において、抽出された構文要素108が属性リスト宣言203である場合、例えば、図8に示す「<!ATTLIST 見積依頼日 年 CDATA 月 CDATA 日 CDATA)>」である場合には、ステップST41において、構文要素変換部65は、属性リスト宣言203の中のタグ名105,属性名106により、属性名メモリ62を検索し、タグ名105,属性名106に対応する短縮タグ名115,短縮属性名116を抽出し、例えば、「見積依頼日」に対応する「C」,「年、月、日」に対応する「C1,C2,C3」を抽出し、構文要素変換部65は、タグ名105を短縮タグ名115に変換し、属性名106を短縮属性名116に変換し、例えば、「見積依頼日」を「C」,「年、月、日」をそれぞれ「C1,C2,C3」に変換し、ステップST34以降の処理を行う。
0044
図10は図9に示すステップST37,ST40における短縮タグ名115への変換処理を示すフローチャートである。ステップST51において、構文要素変換部65は、要素型宣言202の中のタグ名105により、タグ名メモリ61を検索し、ステップST52において、構文要素変換部65は、タグ名メモリ61に、変換しようとするタグ名105が格納されているかをチェックする。
0045
上記ステップST52において、タグ名メモリ61に、変換しようとするタグ名105が格納されていない場合には、ステップST53において、短縮タグ名生成部66は、構文要素変換部65の指示により、変換しようとするタグ名105とそのタグ名105に対応する短縮タグ名115を生成し、ステップST54において、短縮タグ名生成部66は、生成したタグ名105とそのタグ名105に対応する短縮タグ名115を、タグ名メモリ61に格納する。
0046
ステップST55において、構文要素変換部65は、タグ名105を、短縮タグ名生成部66が生成した短縮タグ名115に変換する。上記ステップST52において、タグ名メモリ61に、変換しようとするタグ名105が格納されている場合には、ステップST55の処理を行う。
0047
図11は図9に示すステップST41における短縮タグ名115,短縮属性名116の変換処理を示すフローチャートである。ステップST61において、構文要素変換部65は、属性リスト宣言203の中のタグ名105,属性名106により、属性名メモリ62を検索し、ステップST62において、構文要素変換部65は、属性名メモリ62に、変換しようとするタグ名105,属性名106が格納されているかをチェックする。
0048
上記ステップST62において、属性名メモリ62に、変換しようとするタグ名105,属性名106が格納されていない場合には、ステップST63において、短縮属性名生成部67は、構文要素変換部65の指示により、変換しようとするタグ名105,属性名106と、そのタグ名105,属性名106に対応する短縮タグ名115,短縮属性名116を生成し、ステップST64において、短縮属性名生成部67は、生成したタグ名105,属性名106と、そのタグ名105,属性名106に対応する短縮タグ名115,短縮属性名116を、属性名メモリ62に格納する。
0049
ステップST65において、構文要素変換部65は、タグ名105,属性名106を、短縮タグ名生成部66が生成した短縮タグ名115,短縮属性名116に変換する。上記ステップST62において、属性名メモリ62に、変換しようとするタグ名105,属性名106が格納されている場合には、ステップST65の処理を行う。
0050
図12は文書型定義変換装置6により変換された短縮文書型定義8を示す図であり、図8の文書型定義7に対して、タグ名105,属性名106が短縮タグ名115,短縮属性名116に変換され、コメント201aが追加されている。図12に示す短縮文書型定義8は、EDI等における個々のデータ伝送には使用されないが、実施の形態1における短縮文書型定義整合文書3に誤りがないかを照合するのに使用される。
0051
このようにして、文書型定義7から、タグ名105,属性名106に対応する短縮タグ名115,短縮属性名116を生成することにより、タグ名対応表4,属性名対応表5を自動的に生成、更新し、実施の形態1のタグ名メモリ11,属性名メモリ12に格納することにより、実際のEDI等における個々のデータ伝送に使用する短縮文書型定義整合文書3を作成することができる。
0052
以上のように、この実施の形態2によれば、文書型定義7を、自動的に短縮文書型定義8に変換できるので、実際のEDI等における個々のデータ伝送に使用する短縮文書型定義整合文書3に誤りがないかを照合することができるという効果が得られる。
0053
また、この実施の形態2によれば、文書型定義7から、短縮タグ名生成部66,短縮属性名生成部67が、タグ名105,属性名106に対応する短縮タグ名115,短縮属性名116を生成することにより、タグ名対応表4,属性名対応表5を自動的に生成、更新できるので、実際のEDI等における個々のデータ伝送に使用する短縮文書型定義整合文書3を作成するときのタグ名対応表4,属性名対応表5を効率的に生成することができるという効果が得られる。
0054
【発明の効果】
以上のように、この発明によれば、構文要素変換部が、構文要素にタグ名が含まれている場合に、タグ名メモリを検索してタグ名を短縮タグ名に変換すると共に、構文要素に属性名が付加されたタグ名が含まれている場合に、属性名メモリを検索してタグ名及び属性名を、短縮タグ名及び短縮属性名に変換することにより、文書型定義を自動的に短縮文書型定義に変換できるので、個々のデータ伝送に使用する短縮文書型定義整合文書に誤りがないかを照合することができるという効果がある。
また、構文要素変換部がタグ名メモリを検索した際に、タグ名メモリに検索したタグ名が格納されていない場合、そのタグ名に対応する短縮タグ名を生成し、タグ名メモリに格納することにより、タグ名対応表を自動的に生成、更新できるので、個々のデータ伝送に使用する短縮文書型定義整合文書を作成するときのタグ名対応表を効率的に生成することができるという効果がある。
さらに、構文要素変換部が属性名メモリを検索した際に、属性名メモリに検索したタグ名と属性名が格納されていない場合、そのタグ名に対応する短縮タグ名とその属性名に対応する短縮属性名を生成し、上記属性名メモリに格納することにより、属性名対応表を自動的に生成、更新できるので、個々のデータ伝送に使用する短縮文書型定義整合文書を作成するときの属性名対応表を効率的に生成することができるという効果がある。
【図面の簡単な説明】
【図1】 この発明の実施の形態1による文書変換装置の構成を示す図である。
【図2】 EDI等で使用される文書型定義整合文書の例を示す図である。
【図3】 この発明の実施の形態1によるタグ名対応表を示す図である。
【図4】 この発明の実施の形態1による属性名対応表を示す図である。
【図5】 この発明の実施の形態1による文書変換装置の処理を示すフローチャートである。
【図6】 この発明の実施の形態1による短縮文書型定義整合文書の例を示す図である。
【図7】 この発明の実施の形態2による文書型定義変換装置の構成を示す図である。
【図8】 EDI等で使用される文書型定義の例を示す図である。
【図9】 この発明の実施の形態2による文書型定義変換装置の処理を示すフローチャートである。
【図10】 この発明の実施の形態2による文書型定義変換装置の処理を示すフローチャートである。
【図11】 この発明の実施の形態2による文書型定義変換装置の処理を示すフローチャートである。
【図12】 この発明の実施の形態2による短縮文書型定義の例を示す図である。
【符号の説明】
1 文書変換装置、2 文書型定義整合文書、3 短縮文書型定義整合文書、4 タグ名対応表、5 属性名対応表、6 文書型定義変換装置、7 文書型定義、8 短縮文書型定義、11,61 タグ名メモリ、12,62 属性名メモリ、13,63 構文要素抽出部、14,64 構文要素解析部、15,65 構文要素変換部、16,68 出力部。
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a document type definition conversion apparatus that reduces the data amount of a document when transmitting a document created by the document type definition.
[0002]
[Prior art]
  When a document is used for information processing such as data transmission, information processing is performed in a manner that clearly shows the structure of the document. In this method, the document structure is SGML (Standard Generalized Markup Language) according to the ISO (International Standards Organization International Standardization Organization) standard, or XML (extensive Markup Language D), which is a language that uses the D language (eXtensible Markup Language). Definition). This DTD defines the name of the component of the document and the structural relationship between the components.
[0003]
  A document created by this DTD includes a tag in which a tag name indicating the content, characteristics, etc. of a character string is inserted between the symbols “<” and “>”, and is called a tagged document. . In such a tagged document, since information common to each document can be easily extracted using the tag as a mark, it is effective in storing, processing, transmitting, etc. a large number of documents.
[0004]
  However, when such a tagged document is applied to EDI (Electronic Data Interchange Electronic Data Exchange) and the like, and data exchange is repeated many times, a common tag is repeatedly transmitted in each document. Become.
[0005]
[Problems to be solved by the invention]
  Conventionally, as described above, in EDI and the like, since a common tag is repeatedly transmitted in each document created by DTD, there is a problem that the entire data transmission amount is increased and the communication cost is increased. .
[0006]
  The present invention has been made to solve the above-described problems, and an object of the present invention is to obtain a document type definition conversion apparatus that shortens the data amount of a document to be transmitted and reduces the communication cost.
[0007]
[Means for Solving the Problems]
  A document type definition conversion apparatus according to the present invention includes a syntax element extraction unit that extracts a syntax element from a document type definition that defines a document structure, and a syntax element analysis unit that analyzes a syntax element extracted by the syntax element extraction unit A tag name memory for storing a short tag name corresponding to a tag name indicating the content of the character string included in the syntax element as a tag name correspondence table, and the tag name and its tag name.Attached toIf the tag name is included in the attribute name memory that stores the short tag name corresponding to the attribute name and the short attribute name as an attribute name correspondence table, and the syntax element analyzed by the syntax element analysis unit, the tag When the name memory is searched and the tag name is converted to the short tag name, and the syntax element analyzed by the syntax element analysis unit includes the tag name to which the attribute name is added, the attribute A syntax element conversion unit that searches the name memory and converts the tag name and the attribute name into the short tag name and the short attribute name, and the short tag name and the short attribute name converted by the syntax element conversion unit An output unit that combines the syntax elements configured by the above and outputs an abbreviated document type definition. When the syntax element conversion unit searches the tag name memory, the searched tag name is not stored in the tag name memory. If, to generate a short tag name corresponding to the tag name, stored in the tag name memoryIf the searched tag name and attribute name are not stored in the attribute name memory when the syntax element conversion unit searches the attribute name memory, it corresponds to the short tag name corresponding to the tag name and the attribute name. A short attribute name to be generated is generated and stored in the attribute name memory.
[0008]
  In the document type definition conversion apparatus according to the present invention, the syntax element analysis unit uses an element type declaration composed of a comment without a tag name or a tag name without an attribute name added to the extracted component. This is to analyze whether there is an attribute list type declaration composed of a tag name to which an attribute name is added.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
  An embodiment of the present invention will be described below.
Embodiment 1 FIG.
  FIG. 1 is a diagram showing a configuration of a document conversion apparatus according to the first embodiment. In the figure, 1 is a document conversion device, 2 is a document type definition matching document created by document type definition (DTD), 3 is a shortened document type definition matching document converted by the document conversion device 1, and 4 is document type definition matching. Tag name correspondence table 5 showing correspondence between tag names indicating the contents of character strings used in document 2 and the abbreviated abbreviated tag names, 5 is a tag name used in document type definition matching document 2, And an attribute name correspondence table showing correspondence between attribute names attached to the tag names, shortened shortened tag names, and shortened shortened attribute names.
[0010]
  In the document conversion apparatus 1 of FIG. 1, 11 is a tag name memory in which the tag name correspondence table 4 is stored, 12 is an attribute name memory in which the attribute name correspondence table 5 is stored, and 13 is a document type definition matching document. A syntax element extracting unit 14 extracts a syntax element from 2, and a syntax element analyzing unit 14 analyzes the syntax element extracted by the syntax element extracting unit 13. 15 is a syntax element conversion unit that searches the tag name memory 11 and the attribute name memory 12 based on the tag name and attribute name in the syntax element, and converts the tag name and attribute name to the short tag name and short attribute name. This is an output unit that combines the syntax elements converted by the syntax element conversion unit 15 and outputs the combined result as the short document type definition matching document 3.
[0011]
  FIG. 2 is a diagram showing an example of the document type definition matching document 2 used in EDI or the like. In the figure, “<? Xml version ...>” of 101 is version information, “<! DOCTYPE estimate request information SYSTEM ...... >>” is a document type declaration, and “<quote request information> …… </ quote request” of 103 “Information>” indicates a part in which the text of the document type definition matching document 2 is described, and “m_irai.dtd” 104 indicates a file name.
[0012]
  In FIG. 2, “Quote Request Information”, “Quotation Request Number”, “Quotation Request Date”, “Quantity”, and “Product Number” are the tag names, and “Year”, “Month”, “Day” are 106. "Is an attribute name, 107 is" year = ... month = ... day = ... "is an attribute list, 108 is" <...> "is a syntax element, 109 is" <tag name 105> "is a tag. As described above, the tag name 105 is information indicating the contents, features, properties, and the like of the character string, and the attribute name 106 indicates an index for identifying the tag name 105. The version information 101 does not include the tag name 105, but the document type declaration 102 includes the tag name 105.
[0013]
  FIG. 3 is a diagram showing the tag name correspondence table 4, in which 115 is a shortened tag name corresponding to each tag name 105. As shown in FIG. 3, the tag name correspondence table 4 describes abbreviated tag names 115 corresponding to the tag names 105 and is stored in the tag name memory 11.
[0014]
  FIG. 4 is a diagram showing the attribute name correspondence table 5, in which 116 is a shortened attribute name corresponding to the attribute name 106. As shown in FIG. 4, the attribute name correspondence table 5 describes the short tag name 115 corresponding to each tag name 105 and the short attribute name 116 corresponding to the attribute name 106 and is stored in the attribute name memory 12. ing.
[0015]
  Next, the operation will be described.
  FIG. 5 is a flowchart showing processing of the document conversion apparatus 1. In step ST11, the syntax element extraction unit 13 extracts the syntax element 108 from the document type definition matching document 2 shown in FIG. That is, one “<...>” In FIG. In step ST12, the syntax element analysis unit 14 checks whether or not the extracted syntax element 108 is the document type declaration 102.
[0016]
  If the extracted syntax element 108 is not the document type declaration 102 in step ST12, the syntax element analysis unit 14 checks whether the extracted syntax element 108 is the tag 109 in step ST13. That is, it is checked whether the syntax element 108 is “<tag name 105>”.
[0017]
  If the extracted syntax element 108 is not the tag 109 in step ST13, for example, in the case of the version information 101 shown in FIG. 2, the syntax element conversion unit 15 outputs the extracted syntax element 108 as it is in step ST14. In step ST15, it is checked whether or not the document type definition matching document 2 has the next syntax element 108. If the next syntax element 108 exists, the processes in and after step ST11 are performed.
[0018]
  In step ST15, when the document type definition matching document 2 does not have the next syntax element 108, in step ST16, the output unit 16 combines the syntax elements 108 output by the syntax element conversion unit 15, and shortens the document type. Output as definition matching document 3.
[0019]
  When the extracted syntax element 108 is the tag 109 in step ST13, for example, in the case of “<estimation request number>” illustrated in FIG. 2, the syntax element analysis unit 14 includes the tag 109 in step ST17. It is checked whether the attribute list 107 exists.
[0020]
  If the attribute list 107 is not included in the tag 109 in step ST17, for example, in the case of “<estimation request number>” shown in FIG. 2, the syntax element conversion unit 15 in step ST18 causes the tag 109 in the tag 109 to The tag name memory 11 is searched by the name 105, and the short tag name 115 corresponding to the tag name 105 is extracted. For example, “B” corresponding to “estimation request number” is extracted.
[0021]
  In step ST19, the syntax element conversion unit 15 converts the tag name 105 into the abbreviated tag name 115, for example, converts “estimation request number” into “B”, and performs the processing after step ST14.
[0022]
  If the attribute list 107 is included in the tag 109 in step ST17, for example, if “<estimation request date year =“ 1998 ”month =“ 7 ”day =“ 28 ”>” shown in FIG. 2, step ST20 2, the syntax element conversion unit 15 searches the attribute name memory 12 using the tag name 105 and the attribute name 106 in the tag 109, and shortens the tag name 115 corresponding to the tag name 105 and the abbreviation corresponding to the attribute name 106. The attribute name 116 is extracted. For example, “C” corresponding to “estimation request date”, “C1” corresponding to “year”, “C2” corresponding to “month”, and “C3” corresponding to “day” are extracted.
[0023]
  In step ST21, the syntax element conversion unit 15 converts the tag name 105 into the abbreviated tag name 115, converts the attribute name 106 into the abbreviated attribute name 116, and converts, for example, “estimation request date” into “C”. The “year” is converted to “C1”, the “month” is converted to “C2”, and the “day” is converted to “C3”, and the processes after step ST14 are performed.
[0024]
  If the extracted syntax element 108 is the document type declaration 102 in step ST12, for example, if “<! DOCTYPE estimate request information SYSTEM ...” in the document type declaration 102 shown in FIG. 2, the syntax element is determined in step ST22. The conversion unit 15 searches the tag name memory 11 using the tag name 105 in the tag 109 and extracts the short tag name 115 corresponding to the tag name 105. For example, “A” corresponding to “quotation request information” is extracted.
[0025]
  In step ST23, the syntax element conversion unit 15 converts the tag name 105 into the abbreviated tag name 115, for example, converts “quotation request information” into “A”. In step ST24, the syntax element conversion unit 15 converts the file name 104 in the document type declaration 102, for example, converts “m_irai.dtd” in the document type declaration 102 to “m_irai_c.dtd”. Processes after ST14 are performed.
[0026]
  In the above processing, for example, “ABCD0001” other than “<...>” In “<estimation request number> ABCD0001 </ quote>” shown in FIG. 2 is output as it is.
[0027]
  FIG. 6 is a diagram showing the abbreviated document type definition matching document 3 converted by the document conversion apparatus 1. The tag name 105 and the attribute name 106 are the abbreviated tag name 115 and the document name definition matching document 2 of FIG. The short attribute name 116 is converted, and the file name 104 is converted to 114. The data amount of the document type definition matching document 2 shown in FIG. 2 is 302 bytes, but the data amount of the shortened document type definition matching document 3 shown in FIG. 6 is 157 bytes, and the data amount is reduced to almost ½. ing. In this way, by using a shortened document with a reduced data amount for EDI, the data transmission amount is reduced.
[0028]
  The receiving side that receives the transmitted short document type definition matching document 3 has the same tag name correspondence table 4 and attribute name correspondence table 5 as the transmission side, so that the transmitted short document type definition matching document 3 is stored. Can be read as the original document type definition consistent document 2.
[0029]
  Further, by providing a document conversion device equivalent to the document conversion device 1 on the receiving side, it is possible to automatically convert the transmitted shortened document type definition consistent document 3 to the original document type definition consistent document 2. It is. For example, in the configuration of FIG. 1, the document type definition matching document 2 and the short document type definition matching document 3 are replaced, and the syntax element conversion unit 15 uses the short tag name 115 and the short attribute name 116 to change the tag name memory 11 and the attribute name. The memory 12 may be searched and converted into the tag name 105 and the attribute name 106.
[0030]
  As described above, according to the first embodiment, when a small amount of data exchange such as EDI is repeated many times, the syntax element conversion unit 15 converts the tag name 105 and the attribute name 106 into the short tag name 115, By converting to the shortened attribute name 116, it is possible to reduce the amount of data to be transmitted and to reduce the communication cost.
[0031]
Embodiment 2. FIG.
  FIG. 7 is a diagram showing a document type definition conversion apparatus 6 according to the second embodiment. In the figure, reference numeral 6 denotes a document type definition conversion apparatus that automatically generates and updates the tag name correspondence table 4 and the attribute name correspondence table 5 in the first embodiment. 7 is a document type definition (DTD) used in sentence EDI and the like, and 8 is a shortened document type definition converted by the document type definition conversion device 6.
[0032]
  In the document type definition conversion apparatus 6 of FIG. 7, 61 is a tag name memory for storing the tag name 105, 62 is an attribute name memory for storing the attribute name 106, and 63 is a syntax for extracting syntax elements from the document type definition 7. An element extraction unit 64 is a syntax element analysis unit that analyzes the syntax elements extracted by the syntax element extraction unit 63. A syntax element conversion unit 65 searches the tag name memory 61 and the attribute name memory 62 based on the tag name 105 and the attribute name 106 in the syntax element and converts them into the short tag name 115 and the short attribute name 116.
[0033]
  Further, in FIG. 7, reference numeral 66 denotes a shortened tag name generating unit that generates a shortened tag name 115 corresponding to the tag name 105 not stored in the tag name memory 61 according to an instruction from the syntax element converting unit 65. An abbreviated attribute name generation unit 68 generates a tag name 105, an abbreviated tag name 115 corresponding to the attribute name 106, and an abbreviated attribute name 116 which are not stored in the attribute name memory 62 according to an instruction from the element conversion unit 65. This is an output unit that combines the syntax elements converted by the element conversion unit 65 and outputs them as a shortened document type definition 8.
[0034]
  FIG. 8 is a diagram showing an example of the document type definition 7. In the figure, 201 “<!-Quotation request DTD example…>” is a comment, 202 “<! ELEMENT ...>” is an element type declaration, 203 “<! ATTLIST ...>” is an attribute list declaration, 204 “(...)” Indicates a content model, and 205 “EMPTYTY”, “CDATA”, and “#PCDATA” indicate system definitions. The tag name 105, attribute name 106, and syntax element 108 are the same as those in FIG. 2 of the first embodiment.
[0035]
  Next, the operation will be described.
  FIG. 9 is a flowchart showing processing of the document type definition conversion apparatus 6. In step ST31, the syntax element extraction unit 63 extracts the syntax element 108 from the document type definition 7 shown in FIG. That is, one “<...>” In FIG. 8 is extracted. In step ST <b> 32, the syntax element analysis unit 64 checks whether or not the extracted syntax element 108 is the element type declaration 202.
[0036]
  If the extracted syntax element 108 is not the element type declaration 202 in step ST32, the syntax element analysis unit 64 checks in step ST33 whether the extracted syntax element 108 is the attribute list declaration 203.
[0037]
  In step ST33, if the extracted syntax element 108 is not the attribute list declaration 203, for example, in the case of the comment 201 shown in FIG. 8, in step ST34, the syntax element conversion unit 65 uses the extracted syntax element 108 as it is. In step ST35, it is checked whether or not the next syntax element 108 exists in the document type definition 7. If the next syntax element 108 exists, the processing after step ST31 is performed.
[0038]
  In step ST35, if the document type definition 7 does not include the next syntax element 108, in step ST36, the output unit 68 combines the syntax elements 108 output by the syntax element conversion unit 65, and shortens the document type definition. 8 is output.
[0039]
  If the extracted syntax element 108 is the element type declaration 202 in step ST32, for example, “<! ELEMENT estimate request information ...>” in 202 shown in FIG. 8, the syntax element conversion unit in step ST37. 65 searches the tag name memory 61 using the tag name 105 in the element type declaration 202, extracts the short tag name 115 corresponding to the tag name 105, for example, “A” corresponding to “estimation request information” The syntax element conversion unit 65 converts the tag name 105 into the short tag name 115, for example, converts “quotation request information” into “A”.
[0040]
  In step ST38, the syntax element analysis unit 64 checks whether or not the content model 204 “(...)” Is included in the extracted element type declaration 202. If there is no content model 204, for example, FIG. In the case of “<! ELEMENT estimate request date EMPTY>” in the element type declaration 202, the processing after step ST34 is performed.
[0041]
  In step ST38, if the content model 204 is present, in step ST39, the syntax element analysis unit 64 checks whether the content model 204 has a system definition 205. If the system definition 205 is present, for example, If “<! ELEMENT estimate request number (#PCDATA)>” in the element type declaration 202 in FIG. 8, the processing after step ST34 is performed.
[0042]
  If there is no system definition 205 in step ST39, for example, if it is “<! ELEMENT estimate request information (estimate request number estimate request date quantity product number)>” of the element type declaration 202 of FIG. In step ST40, the syntax element conversion unit 65 searches the tag name memory 61 using the tag name 105 in the content model 204, extracts the short tag name 115 corresponding to the tag name 105, for example, “quotation request number” "B", "C" corresponding to "Quotation request date", "D" corresponding to "Quantity", and "E" corresponding to "Product number" are extracted, and the syntax element conversion unit 65 , Tag name 105 is converted to abbreviated tag name 115, for example, “quotation request number” is “B”, “quotation request date” is “C”, “quantity” is “D”, and “product number” is “E”. To Processes after step ST34 are performed.
[0043]
  If the extracted syntax element 108 is the attribute list declaration 203 in step ST33, for example, if it is “<! ATTLIST estimate request date year CDATA month CDATA date CDATA)>” shown in FIG. The syntax element conversion unit 65 searches the attribute name memory 62 by using the tag name 105 and the attribute name 106 in the attribute list declaration 203, and shortens the tag name 115 and the shortened attribute corresponding to the tag name 105 and the attribute name 106. The name 116 is extracted, for example, “C” corresponding to “estimation request date”, “C1, C2, C3” corresponding to “year, month, day” are extracted, and the syntax element conversion unit 65 selects the tag name 105 is converted to an abbreviated tag name 115, and attribute name 106 is converted to an abbreviated attribute name 116. Is converted to "C1, C2, C3", it performs the steps ST34 and subsequent steps.
[0044]
  FIG. 10 is a flowchart showing the conversion process to the short tag name 115 in steps ST37 and ST40 shown in FIG. In step ST51, the syntax element conversion unit 65 searches the tag name memory 61 based on the tag name 105 in the element type declaration 202. In step ST52, the syntax element conversion unit 65 converts the tag name memory 61 into the tag name memory 61. It is checked whether the tag name 105 is stored.
[0045]
  If the tag name 105 to be converted is not stored in the tag name memory 61 in step ST52, the abbreviated tag name generation unit 66 converts in accordance with an instruction from the syntax element conversion unit 65 in step ST53. Tag name 105 and the short tag name 115 corresponding to the tag name 105 are generated. In step ST54, the short tag name generation unit 66 generates the generated tag name 105 and the short tag name 115 corresponding to the tag name 105. Is stored in the tag name memory 61.
[0046]
  In step ST55, the syntax element conversion unit 65 converts the tag name 105 into the short tag name 115 generated by the short tag name generation unit 66. If the tag name 105 to be converted is stored in the tag name memory 61 in step ST52, the process of step ST55 is performed.
[0047]
  FIG. 11 is a flowchart showing the conversion process of the short tag name 115 and the short attribute name 116 in step ST41 shown in FIG. In step ST61, the syntax element conversion unit 65 searches the attribute name memory 62 using the tag name 105 and the attribute name 106 in the attribute list declaration 203. In step ST62, the syntax element conversion unit 65 searches for the attribute name memory 62. It is checked whether the tag name 105 and the attribute name 106 to be converted are stored.
[0048]
  If the tag name 105 and the attribute name 106 to be converted are not stored in the attribute name memory 62 in step ST62, the short attribute name generation unit 67 instructs the syntax element conversion unit 65 in step ST63. Thus, the tag name 105 and attribute name 106 to be converted, and the abbreviated tag name 115 and the abbreviated attribute name 116 corresponding to the tag name 105 and the attribute name 106 are generated. In step ST64, the abbreviated attribute name generation unit 67 The generated tag name 105 and attribute name 106, and the short tag name 115 and short attribute name 116 corresponding to the tag name 105 and attribute name 106 are stored in the attribute name memory 62.
[0049]
  In step ST65, the syntax element conversion unit 65 converts the tag name 105 and the attribute name 106 into the short tag name 115 and the short attribute name 116 generated by the short tag name generation unit 66. If the tag name 105 and the attribute name 106 to be converted are stored in the attribute name memory 62 in step ST62, the process of step ST65 is performed.
[0050]
  FIG. 12 is a diagram showing the abbreviated document type definition 8 converted by the document type definition conversion device 6. The tag name 105 and the attribute name 106 are the abbreviated tag name 115 and the abbreviated attribute for the document type definition 7 of FIG. 8. It is converted into the name 116, and a comment 201a is added. The shortened document type definition 8 shown in FIG. 12 is not used for individual data transmission in EDI or the like, but is used to check whether there is an error in the shortened document type definition matching document 3 in the first embodiment.
[0051]
  In this way, by generating the short tag name 115 and the short attribute name 116 corresponding to the tag name 105 and the attribute name 106 from the document type definition 7, the tag name correspondence table 4 and the attribute name correspondence table 5 are automatically generated. By generating, updating and storing in the tag name memory 11 and the attribute name memory 12 of the first embodiment, the shortened document type definition matching document 3 used for individual data transmission in actual EDI or the like can be created. it can.
[0052]
  As described above, according to the second embodiment, since the document type definition 7 can be automatically converted into the shortened document type definition 8, the shortened document type definition matching used for individual data transmission in actual EDI or the like is performed. There is an effect that it is possible to collate whether there is an error in the document 3.
[0053]
  Further, according to the second embodiment, from the document type definition 7, the short tag name generation unit 66 and the short attribute name generation unit 67 perform the short tag name 115 and the short attribute name corresponding to the tag name 105 and the attribute name 106. By generating 116, the tag name correspondence table 4 and the attribute name correspondence table 5 can be automatically created and updated. Therefore, the shortened document type definition matching document 3 used for individual data transmission in actual EDI or the like is created. The tag name correspondence table 4 and the attribute name correspondence table 5 can be efficiently generated.
[0054]
【The invention's effect】
  As described above, according to the present invention, when the syntax element conversion unit includes a tag name in the syntax element, the syntax element conversion unit searches the tag name memory and converts the tag name to the short tag name. If a tag name with an attribute name added is included, the document type definition is automatically determined by searching the attribute name memory and converting the tag name and attribute name to the short tag name and short attribute name. Therefore, there is an effect that it is possible to collate whether there is an error in the shortened document type definition matching document used for individual data transmission.
  When the searched tag name is not stored in the tag name memory when the syntax element conversion unit searches the tag name memory, a short tag name corresponding to the tag name is generated and stored in the tag name memory. As a result, the tag name correspondence table can be automatically generated and updated, and the tag name correspondence table can be efficiently generated when creating a short document type definition matching document used for individual data transmission. There is.
  Furthermore, when the syntax element conversion unit searches the attribute name memory and the searched tag name and attribute name are not stored in the attribute name memory, it corresponds to the short tag name corresponding to the tag name and the attribute name. By creating a short attribute name and storing it in the above attribute name memory, the attribute name correspondence table can be automatically created and updated, so attributes when creating a short document type definition consistent document used for individual data transmission There is an effect that the name correspondence table can be generated efficiently.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a document conversion apparatus according to Embodiment 1 of the present invention.
FIG. 2 is a diagram illustrating an example of a document type definition matching document used in EDI or the like.
FIG. 3 is a diagram showing a tag name correspondence table according to Embodiment 1 of the present invention.
FIG. 4 shows an attribute name correspondence table according to the first embodiment of the present invention.
FIG. 5 is a flowchart showing processing of the document conversion apparatus according to Embodiment 1 of the present invention.
FIG. 6 is a diagram showing an example of a shortened document type definition matching document according to the first embodiment of the present invention.
FIG. 7 is a diagram showing a configuration of a document type definition conversion apparatus according to Embodiment 2 of the present invention.
FIG. 8 is a diagram illustrating an example of a document type definition used in EDI or the like.
FIG. 9 is a flowchart showing processing of the document type definition conversion apparatus according to the second embodiment of the present invention.
FIG. 10 is a flowchart showing processing of the document type definition conversion apparatus according to the second embodiment of the present invention.
FIG. 11 is a flowchart showing processing of the document type definition conversion apparatus according to the second embodiment of the present invention.
FIG. 12 is a diagram showing an example of a shortened document type definition according to the second embodiment of the present invention.
[Explanation of symbols]
  1 Document conversion device, 2 Document type definition consistent document, 3 Short document type definition consistent document, 4 Tag name correspondence table, 5 Attribute name correspondence table, 6 Document type definition conversion device, 7 Document type definition, 8 Short document type definition, 11, 61 Tag name memory, 12, 62 Attribute name memory, 13, 63 Syntax element extraction unit, 14, 64 Syntax element analysis unit, 15, 65 Syntax element conversion unit, 16, 68 Output unit.

Claims (2)

文書の構造を定義した文書型定義から、構文要素を抽出する構文要素抽出部と、
上記構文要素抽出部が抽出した構文要素を解析する構文要素解析部と、
上記構文要素に含まれている文字列の内容等を示すタグ名に対応する短縮タグ名をタグ名対応表として格納するタグ名メモリと、
上記タグ名とそのタグ名に付属する属性名に対応する短縮タグ名と短縮属性名を属性名対応表として格納する属性名メモリと、
上記構文要素解析部により解析した構文要素に、上記タグ名が含まれている場合に、上記タグ名メモリを検索して上記タグ名を上記短縮タグ名に変換すると共に、上記構文要素解析部により解析した構文要素に、上記属性名が付加されたタグ名が含まれている場合に、上記属性名メモリを検索して上記タグ名及び上記属性名を、上記短縮タグ名及び上記短縮属性名に変換する構文要素変換部と、
上記構文要素変換部が変換した上記短縮タグ名及び上記短縮属性名により構成された構文要素を結合し短縮文書型定義として出力する出力部とを備え、
上記構文要素変換部が上記タグ名メモリを検索した際に、上記タグ名メモリに検索したタグ名が格納されていない場合、そのタグ名に対応する短縮タグ名を生成し、上記タグ名メモリに格納し、
上記構文要素変換部が上記属性名メモリを検索した際に、上記属性名メモリに検索したタグ名と属性名が格納されていない場合、そのタグ名に対応する短縮タグ名とその属性名に対応する短縮属性名を生成し、上記属性名メモリに格納することを特徴とする文書型定義変換装置。
A syntax element extractor that extracts syntax elements from a document type definition that defines the structure of the document;
A syntax element analysis unit for analyzing the syntax element extracted by the syntax element extraction unit;
A tag name memory for storing, as a tag name correspondence table, a shortened tag name corresponding to a tag name indicating the content of the character string included in the syntax element;
An attribute name memory storing the short tag name and short attribute name corresponding to the tag name and the attribute name attached to the tag name as an attribute name correspondence table;
When the tag name is included in the syntax element analyzed by the syntax element analysis unit, the tag name memory is searched to convert the tag name to the short tag name, and the syntax element analysis unit When the analyzed syntax element includes a tag name to which the attribute name is added, the attribute name memory is searched and the tag name and the attribute name are converted into the short tag name and the short attribute name. A syntax element converter to convert;
An output unit that combines the syntax element formed by the short tag name and the short attribute name converted by the syntax element conversion unit and outputs the combined short element name as a short document type definition;
When the syntax element conversion unit searches the tag name memory and the searched tag name is not stored in the tag name memory, a short tag name corresponding to the tag name is generated and stored in the tag name memory. Store and
When the syntax element conversion unit searches the attribute name memory and the searched tag name and attribute name are not stored in the attribute name memory, it corresponds to the short tag name corresponding to the tag name and the attribute name. A document type definition conversion apparatus characterized in that a short attribute name to be generated is generated and stored in the attribute name memory .
構文要素解析部が、抽出された構成要素について、タグ名のないコメントであるか、属性名が付加されていないタグ名により構成された要素型宣言であるか、属性名が付加されているタグ名により構成された属性リスト型宣言であるかを解析することを特徴とする請求項1記載の文書型定義変換装置。The syntax element analysis section is a comment without a tag name, an element type declaration composed of a tag name without an attribute name, or a tag with an attribute name added to the extracted component 2. The document type definition conversion apparatus according to claim 1 , wherein whether or not the attribute list type declaration is constituted by a name is analyzed.
JP02661399A 1999-02-03 1999-02-03 Document type definition converter Expired - Fee Related JP4447067B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02661399A JP4447067B2 (en) 1999-02-03 1999-02-03 Document type definition converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02661399A JP4447067B2 (en) 1999-02-03 1999-02-03 Document type definition converter

Publications (2)

Publication Number Publication Date
JP2000222404A JP2000222404A (en) 2000-08-11
JP4447067B2 true JP4447067B2 (en) 2010-04-07

Family

ID=12198350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02661399A Expired - Fee Related JP4447067B2 (en) 1999-02-03 1999-02-03 Document type definition converter

Country Status (1)

Country Link
JP (1) JP4447067B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008084341A (en) * 1999-06-21 2008-04-10 Fujitsu Ltd Structured document compressing method, compressing device, and computer-readable recording medium recording structured document compressing program
US6829614B2 (en) * 1999-09-30 2004-12-07 Nec Corporation Scrambling method of the data files
US20060184547A1 (en) * 2005-02-11 2006-08-17 Fujitsu Limited Method and system for fast encoding of data documents
JP4735155B2 (en) * 2005-09-21 2011-07-27 富士ゼロックス株式会社 Display device and character string database redefinition method
US7620645B2 (en) * 2006-02-24 2009-11-17 Microsoft Corporation Scalable algorithm for sharing EDI schemas
JP4571991B2 (en) * 2008-04-02 2010-10-27 富士通株式会社 Structured document converter

Also Published As

Publication number Publication date
JP2000222404A (en) 2000-08-11

Similar Documents

Publication Publication Date Title
AU2003243169B2 (en) System and method for processing of XML documents represented as an event stream
US8484552B2 (en) Extensible stylesheet designs using meta-tag information
US7519903B2 (en) Converting a structured document using a hash value, and generating a new text element for a tree structure
US6182029B1 (en) System and method for language extraction and encoding utilizing the parsing of text data in accordance with domain parameters
US20060041838A1 (en) System and method for automatically generating XML schema for validating XML input documents
US8332745B2 (en) Electronic filing system and electronic filing method
JPH0969101A (en) Method and device for generating structured document
US20040148612A1 (en) System and method for generating an application programming interface from a schema
JP4042830B2 (en) Content attribute information normalization method, information collection / service provision system, and program storage recording medium
JP4447067B2 (en) Document type definition converter
Castan et al. Extensible markup language (XML) for music applications: An introduction
US20080114797A1 (en) Importing non-native content into a document
US20090199089A1 (en) Converting a Heterogeneous Document
Romary et al. : serialising the ISO SynAF syntactic object model
KR100631086B1 (en) Method and apparatus for text normalization using extensible markup language(xml)
JP2002182915A (en) Source program storage method, its system, source program restoring method and system, and compiling method and device
Lemnitzer et al. Representing human and machine dictionaries in Markup languages
Hayashi et al. LAF/GrAF-grounded Representation of Dependency Structures.
JP4410005B2 (en) Structured document structure conversion device and program
CN111259634A (en) XSD format file analyzing method and generating method
KR20070013770A (en) Document conversion system using synchronization of structured documents, and it&#39;s method
Romary et al. EAD ODD: a solution for project-specific EAD schemes
JP4786695B2 (en) Structure conversion device for structured documents
Papaleo Introduction to XML and its applications
Dekhtyar et al. A framework for management of concurrent XML markup

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070522

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070731

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071001

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20071005

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20071026

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091209

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100120

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

Free format text: PAYMENT UNTIL: 20130129

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130129

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees