[go: up one dir, main page]

JP2004021500A - Form processing device and form processing program - Google Patents

Form processing device and form processing program Download PDF

Info

Publication number
JP2004021500A
JP2004021500A JP2002174226A JP2002174226A JP2004021500A JP 2004021500 A JP2004021500 A JP 2004021500A JP 2002174226 A JP2002174226 A JP 2002174226A JP 2002174226 A JP2002174226 A JP 2002174226A JP 2004021500 A JP2004021500 A JP 2004021500A
Authority
JP
Japan
Prior art keywords
xml
data structure
information
definition
xml data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002174226A
Other languages
Japanese (ja)
Inventor
▼吉▲澤 洋
Hiroshi Yoshizawa
Hiroyuki Tsuji
辻 弘行
Makiko Yamamoto
山本 真紀子
Tomoko Kurata
蔵田 知子
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.)
PFU Ltd
Original Assignee
PFU Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PFU Ltd filed Critical PFU Ltd
Priority to JP2002174226A priority Critical patent/JP2004021500A/en
Publication of JP2004021500A publication Critical patent/JP2004021500A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Machine Translation (AREA)

Abstract

【課題】本発明は、帳票処理装置に関し、XMLで記述された帳票から帳票定義のXMLデータ構造情報を作成することを目的とする。
【解決手段】帳票処理装置1は、XMLで記述された帳票(XML帳票)についてのXMLデータ構造を解析してレイアウト情報及びデータ構造情報を抽出するXMLデータ構造解析部12と、抽出されたレイアウト情報に基づいてXML帳票についての帳票定義のレイアウト情報を作成するレイアウト情報作成部16と、抽出されたデータ構造情報に基づいてXML帳票についての帳票定義のXMLデータ構造情報を作成するXMLデータ構造情報作成部17とを備える。
【選択図】   図1
An object of the present invention is to create a form processing XML data structure information from a form described in XML.
A form processing apparatus (1) analyzes an XML data structure of a form (XML form) described in XML to extract layout information and data structure information, and an XML data structure analysis unit (12). A layout information creating unit 16 for creating form definition layout information for an XML form based on the information; and XML data structure information for creating form definition XML data structure information for the XML form based on the extracted data structure information And a creating unit 17.
[Selection diagram] Fig. 1

Description

【0001】
【発明の属する技術分野】
本発明は、帳票処理装置及び帳票処理プログラムに関し、特に、XMLで記述された帳票から帳票定義情報を作成し、これとXMLデータとに基づいて帳票を作成して出力する帳票処理装置及び帳票処理プログラムに関する。
【0002】
【従来の技術】
売上伝票等の各種の帳票を作成して出力するシステム(帳票システム又は帳票処理装置)が広く用いられている。このような帳票処理装置は、通常、図10に示すような帳票定義作成処理部(帳票定義作成プログラム)と、図11に示すような帳票出力処理部(帳票出力プログラム)とを備える。
【0003】
図10に示す帳票定義作成処理部は、当該帳票処理装置における独自のデータ形式で作成された帳票の項目情報を解析して、これから例えば項目名やその属性等の当該帳票のレイアウト情報を抽出する。そして、操作端末から項目の印刷位置や大きさ等のレイアウト情報を入力し、両者を合わせて当該帳票についての帳票定義のレイアウト情報を作成している。また、同様にして、解析で得たデータ構造情報と操作端末から入力したデータ構造情報とを合わせて、帳票定義のデータ構造情報を作成している。
【0004】
更に、図11に示す帳票出力処理部は、品名、数量、単価等の帳票データを読み込んで、これと先に作成した帳票定義とに基づいて、帳票を作成して出力している。
【0005】
【発明が解決しようとする課題】
前述のように、帳票の定義の形式は、各メーカ毎に異なる独自の形式によっており、帳票定義作成処理部は各々の定義の形式に対応した解析処理(のみ)を行う構成となっている。このため、ほぼ世界的に標準の言語であるXML(Extensible Markup Language)によって記述された帳票(XML帳票)があっても、これを解析することはできず、帳票定義を作成することはできなかった。即ち、図10に示すように、XML帳票からこれを定義するレイアウト情報を抽出することができなかった。同様に、XML帳票についてこれを定義するデータ構造情報についても、抽出することができなかった。従って、XML帳票については、その帳票定義(レイアウト情報とデータ構造情報とからなる)は、手作業で記述して作成する他なかった。
【0006】
更に、同様の理由で、帳票出力処理部は各々の定義の形式に対応した解析処理(のみ)を行う構成となっている。このため、既に作成された品名、数量、単価等のXML形式のデータ(XMLデータ)があっても、これを読み込んで帳票を作成し出力することはできなかった。即ち、XMLデータを直接読み込むことはできなかった。このため、図11に示すように、別に変換プログラムを用意して、これによりXMLデータを当該独自形式のデータ(例えばcsv.形式)に変換した後でなければ、帳票出力処理部に読み込むことはできなかった。
【0007】
本発明は、XMLで記述された帳票から帳票定義のXMLデータ構造情報を作成する帳票処理装置を提供することを目的とする。
【0008】
本発明は、XMLで記述された帳票から帳票定義のレイアウト情報を作成する帳票処理装置を提供することを目的とする。
【0009】
また、本発明は、XMLで記述された帳票から作成された帳票定義とXMLデータとに基づいて帳票を作成して出力する帳票処理装置を提供することを目的とする。
【0010】
また、本発明は、XMLで記述された帳票から帳票定義を作成する帳票処理プログラムを提供することを目的とする。
【0011】
また、本発明は、XMLで記述された帳票から作成された帳票定義とXMLデータとに基づいて帳票を作成して出力する帳票処理プログラムを提供することを目的とする。
【0012】
【課題を解決するための手段】
本発明の帳票処理装置は、XMLで記述された帳票についてのXMLデータ構造を解析してレイアウト情報を抽出するXMLデータ構造解析部と、抽出されたレイアウト情報に基づいてXMLで記述された帳票についての帳票定義のレイアウト情報を作成するレイアウト情報作成部とを備える。
【0013】
本発明の帳票処理装置によれば、XMLで記述された帳票(XML帳票)を解析して、これからレイアウト情報を得て、帳票定義のレイアウト情報とすることができる。これにより、世界標準の言語であるXMLで作成された既存の帳票を読み込んで、帳票定義を作成することができ、XML帳票について帳票定義を手作業で記述する手間を省くことができる。
【0014】
また、本発明の帳票処理装置は、XMLで記述された帳票についてのXMLデータ構造を解析してデータ構造情報を抽出するXMLデータ構造解析部と、抽出されたデータ構造情報に基づいてXMLで記述された帳票についての帳票定義のXMLデータ構造情報を作成するXMLデータ構造情報作成部とを備える。
【0015】
本発明の帳票処理装置によれば、XML帳票を解析して、これからXMLデータ構造情報を得て、帳票定義のXMLデータ構造情報とすることができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票定義を作成することができ、XML帳票について帳票定義を手作業で記述する手間を省くことができる。
【0016】
また、本発明の帳票処理装置は、XMLで記述された帳票についてのXMLデータを読み取るXMLデータ読取部と、XMLで記述された帳票についての帳票定義であってXMLデータ構造情報とレイアウト情報とからなる帳票定義と、帳票定義のXMLデータ構造情報を読み取るデータ構造読取部と、帳票定義のレイアウト情報を読み取るレイアウト情報読取部と、読み取ったXMLデータと帳票定義のXMLデータ構造情報とに基づいて当該XMLデータを解析するデータ解析部と、データ解析部での解析と帳票定義のレイアウト情報とに基づいて帳票を作成して出力する帳票出力部とを備える。
【0017】
本発明の帳票処理装置によれば、別に変換プログラムを用意してXMLデータを各社の独自形式のデータ(例えばcsv.形式)に変換しなくとも、帳票定義にXMLデータ構造情報を備えるので、XMLデータを直接読み込むことができる。
【0018】
また、本発明の帳票処理プログラムは、XMLで記述された帳票についての帳票定義を作成するプログラムであって、前記プログラムは、コンピュータに、XMLで記述された帳票についてのXMLデータ構造を解析してレイアウト情報を抽出させ、抽出されたレイアウト情報に基づいてXMLで記述された帳票についての帳票定義のレイアウト情報を作成させ、XMLで記述された帳票についてのXMLデータ構造を解析してデータ構造情報を抽出させ、抽出されたデータ構造情報に基づいてXMLで記述された帳票についての帳票定義のXMLデータ構造情報を作成させる。
【0019】
本発明の帳票処理プログラムによれば、XML帳票を解析して、これからレイアウト情報及びXMLデータ構造情報を得て、帳票定義のレイアウト情報及びXMLデータ構造情報とすることができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票定義を作成することができる。本発明の帳票処理プログラムは、フレキシブルディスク、CD−ROM、CDR/W、DVD等の種々の記録媒体に格納して提供することができ、本発明の帳票処理装置を容易に実現することができる。
【0020】
また、本発明の帳票処理プログラムは、XMLで記述された帳票から帳票データを読み取って帳票を作成し出力するプログラムであって、前記プログラムは、コンピュータに、XMLで記述された帳票についてのXMLデータを読み取らせ、XMLで記述された帳票についての帳票定義であってXMLデータ構造情報とレイアウト情報とからなる帳票定義のXMLデータ構造情報を読み取らせ、帳票定義のレイアウト情報を読み取らせ、読み取ったXMLデータと帳票定義のXMLデータ構造情報とに基づいて、当該XMLデータを解析させ、前記解析と帳票定義のレイアウト情報とに基づいて、帳票を作成して出力させる。
【0021】
本発明の帳票処理プログラムによれば、別に変換プログラムを用意してXMLデータを各社の独自形式のデータ(例えばcsv.形式)に変換しなくとも、帳票定義にXMLデータ構造情報を備えるので、XMLデータを直接読み込むことができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票を作成して出力することができる。本発明の帳票処理プログラムは、フレキシブルディスク、CD−ROM、CDR/W、DVD等の種々の記録媒体に格納して提供することができ、本発明の帳票処理装置を容易に実現することができる。
【0022】
【発明の実施の形態】
図1は、帳票処理装置構成図であり、本発明の帳票定義作成処理及び帳票出力処理を行なう帳票処理装置の構成を示す。
【0023】
帳票処理装置1は、帳票定義作成処理部(以下、作成処理部)11、帳票出力処理部(以下、出力処理部)21、帳票定義(ファイル)41、操作端末5を備える。作成処理部11は、XMLで記述された帳票(XML帳票)についてのデータであってXMLデータ構造情報を含むXMLスキーマ31、XMLデータ32を読み込んで、これらを解析し、これに基づいて当該XML帳票についての帳票定義41を作成して、例えばファイルの形式で出力する。帳票定義41は、XML帳票についての定義情報であって、XMLデータ構造情報42、XMLレイアウト情報(以下、レイアウト情報とも言う)43からなる。出力処理部21は、XML帳票における数値等のXMLデータ35、当該XML帳票について作成された帳票定義41を読み込んで、これらを解析し、これに基づいて当該帳票6を作成して出力する。
【0024】
なお、作成処理部11は、独自形式の帳票についての独自形式項目情報33を読み込んでこれをXML帳票の帳票定義41に反映させる。また、作成処理部11は、操作端末5から入力された操作情報をXML帳票の帳票定義41に反映させる。
【0025】
また、作成処理部11及び出力処理部21は、前述のように、1個の帳票処理プログラム又は個々の帳票定義作成処理プログラム及び帳票出力処理プログラムとして用意される。当該プログラムをコンピュータで実行することにより、帳票処理装置が実現される。
【0026】
作成処理部11は、XML帳票の帳票定義41を作成するために、XMLデータ構造解析部12、項目情報解析部13、独自データ構造解析部14、操作情報解析部15、レイアウト情報作成部16、XMLデータ構造情報作成部17からなる。作成処理部11について、図2及び図3を用いて説明する。図2は、XML帳票の帳票定義41のXMLレイアウト情報43の作成について示し、これに関係する部分を図1から抜き出して示しており、図10と対比すべきものである。図3は、XML帳票の帳票定義41のXMLデータ構造情報42の作成について示し、これに関係する部分を図1から抜き出して示している。
【0027】
図2において、XMLデータ構造解析部12は、XML帳票についてのXMLデータ構造を記述した情報からそのXMLデータ構造を解析して、これらに含まれるレイアウトについての情報を抽出する。XMLデータ構造を記述した情報としては、XMLスキーマ31、XMLデータ32等がある。XMLスキーマ31は少なくともDTD(Document Type Definition、文書型定義)相当の情報を含む。従って、当該情報としてDTDを解析してもよい。レイアウト情報作成部16は、抽出されたレイアウト情報に基づいて、XML帳票についての帳票定義41のレイアウト情報43を作成する。
【0028】
XMLスキーマ31は、詳細は図示しないが、当該XML帳票に含まれる項目(データ名)について、その(出力又は印刷)位置、大きさ等を記述することができる。そこで、XMLデータ構造解析部12は、XMLスキーマ31を解析して、当該記述(情報)がある場合にはこれをレイアウトについての情報として抽出する。又は、XMLデータ構造解析部12は、DTDを解析して、レイアウトについての情報を抽出する。従って、レイアウト情報43は、例えば、少なくともXML帳票についての抽出された項目名及びその属性からなる。
【0029】
即ち、DTDは、図2に示すように、当該XML帳票に含まれる項目(データ名)及びその属性や構造を示す。従って、XMLデータ構造解析部12は、DTDを解析して、項目名及びその属性を抽出する。
【0030】
図2のDTDにおいて、例えば、その1行分の記述は「!ELEMENT  売上伝票( 顧客名, 売上日, 売上明細+, 合計) 」とされる。この1行毎に、レイアウト情報が抽出される。この行の場合、項目(項目名又はデータ名)は!ELEMENTの次にあるので、項目「売上伝票」が抽出される。DTDの2行目は、「!ELEMENT  顧客名(#PCDATA)」とある。これにより、項目「顧客名」と、その属性として所定の位置に文字データ(当該顧客の名前)が当てはめられることが抽出される。これとの比較で、1行目においては、他の文字データ等を伴わないことが抽出される。このように、XML帳票のレイアウト情報の中の項目及び属性がDTDから得られる。一方、レイアウト情報の中の項目の位置や大きさについては、DTDからは得られないので、XMLスキーマ31から得る必要がある。
【0031】
この例では、XML帳票のXMLスキーマ31に位置等の記述を含まない(DTD等のみの場合)場合、項目の位置及び大きさ等の情報を他の手段により与えてもよい。そこで、この例では、周知の帳票システムにおける独自データ構造解析部14又は操作情報解析部15を利用する。即ち、独自データ構造解析部14から独自形式の帳票についての独自形式項目情報33を読み込んで解析し、これからレイアウト情報、即ち、項目、項目の属性、項目の位置、項目の大きさ等の情報をレイアウトについての情報として抽出する。又は、操作情報解析部15からレイアウト情報、即ち、項目、項目の属性、項目の位置、項目の大きさ等の情報をレイアウトについての情報として直接入力する。
【0032】
図3において、XMLデータ構造解析部12は、XML帳票についてのXMLスキーマ31の中のXMLデータ構造を記述した情報を解析して、これに含まれるXML帳票に関するXMLデータ構造についての情報を抽出する。XMLデータ構造情報作成部17は、抽出されたデータ構造情報に基づいて、XML帳票についての帳票定義41のXMLデータ構造情報42を作成する。
【0033】
抽出されたデータ構造情報におけるデータ構造は、階層情報を用いて表される。階層情報は、当該データ構造に含まれる項目の各々について、他の項目(上位の項目)との階層関係を表す。具体的には、階層情報はツリー構造を記述できるものであればよい。例えば、リンク(例えば、DTDにおけるリンク等)等であってもよい。
【0034】
この例では、階層情報としてレベル番号を用いる。レベル番号の一例を、図4に示す。例えば、DTDの最初に表れる「・・・売上伝票・・・」が最上位の階層であるので、レベル番号「00」とされる。以下、順に下位の階層「01」「02」・・・とされる。そして、売上伝票の行に「・・・売上伝票(顧客名, 売上日, 売上明細+, 合計)」とあるので、これらが次の階層として抽出され、レベル番号「01」とされる。図示しないが、売上明細の行に「・・・売上明細(品名,数量,単価)」とあれば、これらが次の階層として抽出され、レベル番号「02」とされる。これにより、図4のレベル番号が得られる。レベル番号は、図4におけるレベル番号の表示とXMLデータ構造のモデルの表示との比較から判るように、XMLデータ構造の階層(ツリー)構造と1対1に対応している(等価である)。
【0035】
一方、XML帳票によっては、DTD又はXMLデータに所望の項目(データ名)を含まない場合がある。この場合、当該項目を他の手段により与える必要がある。そこで、独自データ構造解析部14又は操作情報解析部15を使用する。即ち、独自データ構造解析部14から独自形式の帳票についての独自形式項目情報33を読み込んで解析し、これから特に項目等の情報をデータ構造についての情報として抽出する。又は、操作情報解析部15から特に項目等の情報をデータ構造についての情報として直接入力する。
【0036】
出力処理部21は、帳票を作成して出力するために、XMLデータ読取部22、データ解析部23、データ構造読取部24、レイアウト情報読取部25、帳票出力部26を備える。出力処理部21について、図5を用いて説明する。図5は、XML帳票の作成及び出力について示し、これに関係する部分を図1から抜き出して示しており、図11と対比すべきものである。
【0037】
図5において、XMLデータ読取部22は、XML帳票についてのXMLデータ35を読み取る。帳票定義41は、XML帳票についての帳票定義41であって、XMLデータ構造情報42とレイアウト情報43とからなる。これは作成処理部11により作成されたものである。データ構造読取部24は、帳票定義41のXMLデータ構造情報42を読み取る。レイアウト情報読取部25は、帳票定義41のレイアウト情報43を読み取る。データ解析部23は、読み取ったXMLデータ35と帳票定義41のXMLデータ構造情報42とに基づいて、当該XMLデータを解析する。帳票出力部26は、データ解析部23での解析と帳票定義41のレイアウト情報43とに基づいて、帳票を作成して出力する。
【0038】
データ解析部23は、読み取ったXMLデータ35から得られる階層関係を階層情報により表す。一方、前述のように、帳票定義41のXMLデータ構造情報42は、当該データ構造を、当該データ構造に含まれる項目の各々について他の項目との階層関係を表す階層情報を用いて表す。そこで、データ解析部23は、XMLデータ35から得た階層情報と帳票定義41のXMLデータ構造情報42における階層情報とが一致する場合に、当該項目のXMLデータを抽出する。
【0039】
具体的には、読み取ったXMLデータ35から、前述と同様にして、1個の項目を抽出し、これにその階層関係を表す階層情報としてレベル番号を付したものを得る。例えば、先頭は「<売上伝票>」であるので、「00売上伝票」が得られる。一方、前述のように、XMLデータ構造情報42において、最上位階層「00」は「売上伝票」である。そこで、同一階層の同一出現順の両者を比較すると、項目が「売上伝票」で一致する。
【0040】
なお、両者が不一致となる場合がある。これは、実際の帳票であるXML帳票が、データ構造を考える上では余分なデータを含むことが多いためである。例えば、買い上げに対する「お礼の文章」、当該売り主の「会社名」等が入る場合がある。これらは、データ構造を考える上では無視すべきものであり、出現順には数えずに、次の項目へ処理を進める。
【0041】
項目が一致すると、当該項目がXML帳票の正しい項目(例えば「売上伝票」)であると判断する。そして、必要に応じて、当該項目についてのデータを抽出する。例えば、項目「品名」である場合の当該名前(文字データ)、項目「数量」である場合の当該数量(数値データ)等である。更に、抽出した当該項目(及びデータ)をXMLレイアウト情報43に従って、対応する位置に指定の大きさであてはめる(レイアウトする)。
【0042】
このために、この例では、XMLデータ構造情報42とXMLレイアウト情報43とは、XML帳票におけるタグを用いて相互に関連付けられる。例えば、XMLレイアウト情報43において、前述のように、1行目において「!ELEMENT  売上伝票・・・」とあるので、この行から抽出されるレイアウト情報にはタグ<売上伝票>が付加される。一方、XMLデータ構造情報42において、前述のように、最上位階層「00売上伝票」であるので、当該データ構造情報にはタグ<売上伝票>が付加される。これにより、両者が関連付けられ、抽出された項目「売上伝票」が、関連付けられたレイアウト情報に従ってレイアウトされる。また、項目の出現順によらずタグで関連付けているので、実際のXML帳票はデータ構造とは関係のない項目を含むことができ、これを含んでいても正しい位置にレイアウトすることができる。
【0043】
図6は、帳票処理フローであり、本発明の帳票処理装置1における帳票の処理について示す。
【0044】
作成処理部11が、XMLスキーマ31等に基づいて、帳票定義41のレイアウト情報43を作成し(ステップS11)、帳票定義41のXMLデータ構造情報42を作成する(ステップS12)。なお、ステップS11及びS12はいずれを先に実行してもよい。この後、出力処理部21がXML帳票のXMLデータ35を読み込んで(ステップS13)、これと帳票定義41のXMLデータ構造情報42及びレイアウト情報43とに基づいて、帳票を作成して出力する(ステップS14)。
【0045】
図7は、帳票定義作成処理フローであり、本発明の帳票処理装置1における帳票定義41のレイアウト情報43の作成処理について示す。これは、図2に対応し、図6のステップS11において実行される処理である。
【0046】
作成処理部11にXMLスキーマ31が入力されると(ステップS21)、XMLデータ構造解析部12がこれを読み取ってXMLスキーマ31を解析し(ステップS22)、これに基づいて、当該XMLデータのレイアウト情報を抽出する(ステップS23)。この後、レイアウト情報作成部16が、レイアウト情報が抽出されたか否かを調べ(ステップS24)、レイアウト情報が抽出された場合、当該抽出した情報に基づいて帳票定義41のレイアウト情報43を作成し(ステップS25)、更にこれに基づいて帳票レイアウトを操作端末5に表示する(ステップS26)。レイアウト情報が抽出されない場合、ステップS25及びS26は省略される。レイアウト情報作成部16は、必要に応じて、操作端末5からの入力等に従って、帳票定義41のレイアウト情報43を作成又は変更することにより(ステップS27)、完成した帳票定義41のレイアウト情報43を出力する(ステップS28)。
【0047】
なお、ステップS27においては、図2において説明したように、レイアウト情報43を種々の手段で編集することができる。即ち、XMLスキーマ31から抽出したレイアウト情報でよければ、ステップS27での編集処理は省略してもよい。XMLスキーマ31から抽出したレイアウト情報を変更する場合、独自形式項目情報33を読み込んで、これから抽出したレイアウト情報を付加する等して表示された帳票レイアウトを変更するか、又は、操作端末5からレイアウトの操作情報を入力してレイアウト情報43を変更する。
【0048】
また、実際には、XMLスキーマ31に全てのレイアウト情報を記述するよりは、操作端末5からレイアウトの操作情報として項目の位置及びサイズを入力してレイアウト情報を作成する方が、ユーザの負担が少なく、また、ユーザの希望に沿い易い。また、独自形式項目情報33は、事前に読み込まれレイアウト情報が抽出され、これがライブラリとして用意される。従って、ステップS21ではXML帳票のXMLスキーマ31の中のDTDのみを用意して読み込み、ステップS23でレイアウト情報として項目名及びその属性を得る。そして、ステップS26でこれを適当な位置及び大きさに表示し、ステップS27で操作端末5から希望の位置及び大きさとなるようにレイアウト情報を変更し、また、独自形式項目情報33のレイアウト情報のライブラリからの選択によりレイアウト情報を変更する。これにより、簡単にレイアウト情報43を作成し変更することができる。
【0049】
図8は、帳票定義作成処理フローであり、本発明の帳票処理装置1における帳票定義41のXMLデータ構造情報42の作成処理について示す。これは、図3及び図4に対応し、図6のステップS12において実行される処理である。
【0050】
XMLデータ構造解析部12が、XMLデータ32又はXMLスキーマ31等のXMLデータ構造を記述した情報を読み取り(ステップS31)、そのXMLデータ構造を解析し(ステップS32)、これに基づいてレベル番号を付加して、データ構造のツリー構造を作成する(ステップS33)。この後、XMLデータ構造情報作成部17が、当該データ構造への追加の項目があるか否かを調べ(ステップS34)、追加の項目がある場合、更に、独自項目データからの追加であるか否かを調べる(ステップS35)。独自項目データからの追加である場合、XMLデータ構造情報作成部17は、当該独自項目データを追加し(ステップS36)、当該追加した項目にレベル番号を付与する(ステップS37)。独自項目データからの追加でない場合、XMLデータ構造情報作成部17は、ステップS36及びS37を省略して、操作端末5から項目データを入力して追加し(ステップS38)、当該追加した項目にレベル番号を付与して(ステップS39)、処理を終了する。ステップS34において、追加の項目がない場合も、処理を終了する。
【0051】
図9は、帳票出力処理フローであり、本発明の帳票処理装置1における帳票の出力処理について示す。これは、図5に対応し、図6のステップS13及びS14において実行される処理である。
【0052】
XMLデータ読取部22がその先頭からXMLデータを読み取り(ステップS41)、これについて、データ解析部23がそのXMLデータ構造、即ち、ツリー構造を解析する(ステップS42)。一方、データ構造読取部24が帳票定義41のXMLデータ構造情報42を読み出して(ステップS43)、データ解析部23が、読み取ったXMLデータのツリー構造に現れるタグ名と、帳票定義41のXMLデータ構造情報42に現れるタグ名とを比較して、両者におけるタグ名の位置及び出現順序が一致するか否かを調べる(ステップS44)。一致しない場合、ステップS41以下を繰り返す。一致する場合、データ解析部23は、読み取ったXMLデータから項目データを抽出する(ステップS45)。この後、レイアウト情報読取部25が帳票定義41のレイアウト情報43を読み取り(ステップS46)、データ解析部23が、ステップS45において抽出した項目データを読み取った帳票のレイアウトに当てはめて(ステップS47)、処理が終了したか否かを調べる(ステップS48)。処理が終了しない場合、ステップS41以下を繰り返す。処理が終了した場合、帳票を出力して(ステップS49)、処理を終了する。
【0053】
【発明の効果】
以上説明したように、本発明によれば、帳票処理装置において、XML帳票を解析してレイアウト情報を得て、帳票定義のレイアウト情報とすることができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票定義を作成することができ、XML帳票について帳票定義を手作業で記述する手間を省くことができる。
【0054】
また、本発明によれば、帳票処理装置において、XML帳票を解析してXMLデータ構造情報を得て、帳票定義のXMLデータ構造情報とすることができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票定義を作成することができ、XML帳票について帳票定義を手作業で記述する手間を省くことができる。
【0055】
また、本発明によれば、帳票処理装置において、別に変換プログラムを用意してXMLデータを各社の独自形式のデータに変換しなくとも、帳票定義にXMLデータ構造情報を備えるので、XMLデータを直接読み込むことができる。
【0056】
また、本発明によれば、帳票処理プログラムにおいて、XML帳票を解析してレイアウト情報及びXMLデータ構造情報を得て、帳票定義のレイアウト情報及びXMLデータ構造情報とすることができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票定義を作成することができる。本発明の帳票処理プログラムは、フレキシブルディスク、CD−ROM、CDR/W、DVD等の種々の記録媒体に格納して提供することができ、本発明の帳票処理装置を容易に実現することができる。
【0057】
また、本発明によれば、帳票処理プログラムにおいて、別に変換プログラムを用意してXMLデータを各社の独自形式のデータに変換しなくとも、帳票定義にXMLデータ構造情報を備えるので、XMLデータを直接読み込むことができる。これにより、XMLで作成された既存の帳票を読み込んで、帳票を作成して出力することができる。本発明の帳票処理プログラムは、フレキシブルディスク、CD−ROM、CDR/W、DVD等の種々の記録媒体に格納して提供することができ、本発明の帳票処理装置を容易に実現することができる。
【図面の簡単な説明】
【図1】帳票処理装置構成図である。
【図2】帳票定義作成処理説明図である。
【図3】帳票定義作成処理説明図である。
【図4】帳票定義作成処理説明図である。
【図5】帳票出力処理説明図である。
【図6】帳票処理フローである。
【図7】帳票定義作成処理フローである。
【図8】帳票定義作成処理フローである。
【図9】帳票出力処理フローである。
【図10】従来技術説明図である。
【図11】従来技術説明図である。
【符号の説明】
11  帳票定義作成処理部(作成処理部)
12  XMLデータ構造解析部
13  項目情報解析部
14  独自データ構造解析部
15  操作情報解析部
16  レイアウト情報作成部
17  XMLデータ構造情報作成部
21  帳票出力処理部(出力処理部)
22  XMLデータ読取部
23  データ解析部
24  データ構造読取部
25  レイアウト情報読取部
26  帳票出力部
41  帳票定義(ファイル)
42  XMLデータ構造情報
43  レイアウト情報
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a form processing apparatus and a form processing program, and more particularly to a form processing apparatus and form processing for creating form definition information from a form described in XML, creating and outputting a form based on the form definition information and XML data. About the program.
[0002]
[Prior art]
2. Description of the Related Art A system (form system or form processing device) for creating and outputting various forms such as sales slips is widely used. Such a form processing apparatus usually includes a form definition creation processing unit (form definition creation program) as shown in FIG. 10 and a form output processing unit (form output program) as shown in FIG.
[0003]
The form definition creation processing unit shown in FIG. 10 analyzes the item information of the form created in a unique data format in the form processing apparatus, and extracts layout information of the form, such as an item name and its attribute, from the form information. . Then, layout information such as the print position and size of the item is input from the operation terminal, and the layout information of the form definition for the form is created by combining the two. Similarly, the data structure information of the form definition is created by combining the data structure information obtained by the analysis and the data structure information input from the operation terminal.
[0004]
Further, the form output processing unit shown in FIG. 11 reads form data such as a product name, a quantity, a unit price, etc., and creates and outputs a form based on the form data and the form definition created earlier.
[0005]
[Problems to be solved by the invention]
As described above, the format of the form definition is a unique format that differs for each manufacturer, and the form definition creation processing unit is configured to perform (only) the analysis processing corresponding to each definition format. For this reason, even if there is a form (XML form) described by XML (Extensible Markup Language), which is a standard language almost worldwide, it cannot be analyzed and a form definition cannot be created. Was. That is, as shown in FIG. 10, the layout information defining the XML form could not be extracted from the XML form. Similarly, data structure information defining the XML form could not be extracted. Therefore, for the XML form, the form definition (consisting of layout information and data structure information) has to be manually described and created.
[0006]
Further, for the same reason, the form output processing unit is configured to perform the analysis processing (only) corresponding to each definition format. For this reason, even if there is XML data (XML data) such as a product name, a quantity, and a unit price that have already been created, it has not been possible to read and create and output a form. That is, the XML data cannot be directly read. For this reason, as shown in FIG. 11, a separate conversion program is prepared, and unless the XML data is converted into the data in the original format (for example, csv. Format) by this, it is not possible to read the data into the form output processing unit. could not.
[0007]
SUMMARY OF THE INVENTION It is an object of the present invention to provide a form processing apparatus that creates XML data structure information of a form definition from a form described in XML.
[0008]
SUMMARY OF THE INVENTION It is an object of the present invention to provide a form processing apparatus that creates form definition layout information from a form described in XML.
[0009]
It is another object of the present invention to provide a form processing device that creates and outputs a form based on a form definition created from a form described in XML and XML data.
[0010]
Another object of the present invention is to provide a form processing program for creating a form definition from a form described in XML.
[0011]
It is another object of the present invention to provide a form processing program for creating and outputting a form based on a form definition created from a form described in XML and XML data.
[0012]
[Means for Solving the Problems]
A form processing apparatus of the present invention analyzes an XML data structure of a form described in XML to extract layout information, and an XML data structure analysis unit for analyzing a form described in XML based on the extracted layout information. And a layout information creating unit for creating layout information of the form definition.
[0013]
According to the form processing apparatus of the present invention, it is possible to analyze a form described in XML (XML form), obtain layout information from the form, and use the layout information as form definition layout information. As a result, it is possible to read an existing form created in XML, which is a world standard language, to create a form definition, and to save the labor of manually writing the form definition for the XML form.
[0014]
In addition, the form processing apparatus of the present invention analyzes an XML data structure of a form described in XML and extracts data structure information, and an XML data structure analysis unit that describes the form based on the extracted data structure information. And an XML data structure information creating unit that creates XML data structure information of a form definition for the created form.
[0015]
According to the form processing device of the present invention, it is possible to analyze an XML form, obtain XML data structure information from the form, and use it as XML data structure information of the form definition. As a result, an existing form created in XML can be read and a form definition can be created, and the labor of manually describing the form definition for the XML form can be saved.
[0016]
Also, the form processing apparatus of the present invention includes an XML data reading unit that reads XML data about a form described in XML, and a form definition for a form described in XML, which is based on XML data structure information and layout information. A data structure reading unit for reading the form definition XML data structure information, a layout information reading unit for reading the form definition layout information, and the read XML data and the form definition XML data structure information. It has a data analysis unit for analyzing XML data, and a form output unit for creating and outputting a form based on the analysis by the data analysis unit and the layout information of the form definition.
[0017]
According to the form processing apparatus of the present invention, since the form definition is provided with the XML data structure information without having to prepare a separate conversion program to convert the XML data into data in a format unique to each company (for example, csv. Format), the XML is used. Data can be read directly.
[0018]
The form processing program according to the present invention is a program for creating a form definition for a form described in XML, and the program analyzes the XML data structure of the form described in XML by a computer. Layout information is extracted, form definition layout information for a form described in XML is created based on the extracted layout information, and the XML data structure of the form described in XML is analyzed to convert the data structure information. Then, based on the extracted data structure information, XML data structure information of a form definition for a form described in XML is created.
[0019]
According to the form processing program of the present invention, an XML form can be analyzed, layout information and XML data structure information can be obtained from the form, and can be used as layout information and XML data structure information of the form definition. As a result, an existing form created in XML can be read and a form definition can be created. The form processing program of the present invention can be provided by being stored in various recording media such as a flexible disk, a CD-ROM, a CDR / W, and a DVD, and the form processing apparatus of the present invention can be easily realized. .
[0020]
A form processing program according to the present invention is a program for reading form data from a form described in XML to create and output a form, wherein the program stores, in a computer, XML data for a form described in XML. Is read, the form definition of the form described in XML, the form definition XML data structure information including the XML data structure information and the layout information is read, the form definition layout information is read, and the read XML is read. The XML data is analyzed based on the data and the XML data structure information of the form definition, and a form is created and output based on the analysis and the layout information of the form definition.
[0021]
According to the form processing program of the present invention, since the form definition is provided with the XML data structure information without the need to prepare a separate conversion program and convert the XML data into data in a format unique to each company (for example, csv. Format), the XML is provided. Data can be read directly. Thus, it is possible to read an existing form created in XML, create a form, and output the form. The form processing program of the present invention can be provided by being stored in various recording media such as a flexible disk, a CD-ROM, a CDR / W, and a DVD, and the form processing apparatus of the present invention can be easily realized. .
[0022]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a configuration diagram of a form processing apparatus, and shows a configuration of a form processing apparatus that performs a form definition creation process and a form output process according to the present invention.
[0023]
The form processing apparatus 1 includes a form definition creation processing unit (hereinafter, creation processing unit) 11, a form output processing unit (hereinafter, output processing unit) 21, a form definition (file) 41, and an operation terminal 5. The creation processing unit 11 reads the XML schema 31 and XML data 32 which are data on a form (XML form) described in XML and includes XML data structure information, analyzes these, and based on the data, analyzes the XML. A form definition 41 for the form is created and output in, for example, a file format. The form definition 41 is definition information about an XML form, and includes XML data structure information 42 and XML layout information (hereinafter, also referred to as layout information) 43. The output processing unit 21 reads the XML data 35 such as numerical values in the XML form, and the form definition 41 created for the XML form, analyzes these, creates the form 6 based on this, and outputs it.
[0024]
Note that the creation processing unit 11 reads the unique format item information 33 for the unique format form, and reflects this in the form definition 41 of the XML form. Further, the creation processing unit 11 reflects the operation information input from the operation terminal 5 in the form definition 41 of the XML form.
[0025]
The creation processing unit 11 and the output processing unit 21 are prepared as one form processing program or individual form definition creation processing programs and form output processing programs, as described above. A form processing device is realized by executing the program on a computer.
[0026]
The creation processing section 11 creates an XML form definition 41, an XML data structure analysis section 12, an item information analysis section 13, an original data structure analysis section 14, an operation information analysis section 15, a layout information creation section 16, It comprises an XML data structure information creation unit 17. The creation processing unit 11 will be described with reference to FIGS. FIG. 2 shows the creation of the XML layout information 43 of the form definition 41 of the XML form, and a part related thereto is extracted from FIG. 1 and should be compared with FIG. FIG. 3 shows creation of the XML data structure information 42 of the form definition 41 of the XML form, and a part related thereto is extracted from FIG.
[0027]
In FIG. 2, an XML data structure analysis unit 12 analyzes the XML data structure from the information describing the XML data structure of the XML form, and extracts information on a layout included in the XML data structure. Information describing the XML data structure includes an XML schema 31, XML data 32, and the like. The XML schema 31 includes at least information corresponding to a DTD (Document Type Definition, document type definition). Therefore, the DTD may be analyzed as the information. The layout information creating unit 16 creates layout information 43 of the form definition 41 for the XML form based on the extracted layout information.
[0028]
Although not shown in detail, the XML schema 31 can describe the position (output or print), size, and the like of an item (data name) included in the XML form. Therefore, the XML data structure analysis unit 12 analyzes the XML schema 31 and extracts the description (information), if any, as layout information. Alternatively, the XML data structure analysis unit 12 analyzes the DTD and extracts information about the layout. Therefore, the layout information 43 includes, for example, at least the extracted item names and attributes of the XML form.
[0029]
That is, as shown in FIG. 2, the DTD indicates items (data names) included in the XML form and their attributes and structures. Therefore, the XML data structure analysis unit 12 analyzes the DTD and extracts the item names and their attributes.
[0030]
In the DTD of FIG. 2, for example, the description of one line is “! ELEMENT sales slip (customer name, sales date, sales details +, total)”. Layout information is extracted for each row. In this line, the item (item name or data name) is! The item “sales slip” is extracted because it is next to ELEMENT. The second line of the DTD reads “! ELEMENT customer name (#PCDATA)”. As a result, it is extracted that the character data (name of the customer) is applied to the item “customer name” and its attribute at a predetermined position. In comparison with this, it is extracted that the first line does not involve other character data or the like. As described above, the items and attributes in the layout information of the XML form are obtained from the DTD. On the other hand, since the position and size of the item in the layout information cannot be obtained from the DTD, it must be obtained from the XML schema 31.
[0031]
In this example, when the description of the position or the like is not included in the XML schema 31 of the XML form (in the case of only DTD or the like), information such as the position and size of the item may be provided by other means. Therefore, in this example, the unique data structure analysis unit 14 or the operation information analysis unit 15 in a well-known form system is used. That is, the unique format item information 33 on the unique format form is read from the unique data structure analysis unit 14 and analyzed, and the layout information, that is, information such as the item, the attribute of the item, the position of the item, the size of the item, etc. It is extracted as information about the layout. Alternatively, layout information, that is, information on items, item attributes, item positions, item sizes, and the like is directly input from the operation information analysis unit 15 as information on layout.
[0032]
3, the XML data structure analysis unit 12 analyzes information describing the XML data structure in the XML schema 31 for the XML form, and extracts information about the XML data structure for the XML form included therein. . The XML data structure information creating unit 17 creates the XML data structure information 42 of the form definition 41 for the XML form based on the extracted data structure information.
[0033]
The data structure in the extracted data structure information is represented using hierarchical information. The hierarchy information indicates a hierarchical relationship between each item included in the data structure and another item (upper item). Specifically, the hierarchy information may be any information that can describe the tree structure. For example, it may be a link (for example, a link in the DTD).
[0034]
In this example, a level number is used as hierarchy information. FIG. 4 shows an example of the level number. For example, since “... sales slip ...” appearing first in the DTD is the highest level, the level number is “00”. Hereinafter, the lower layers are “01”, “02”,. Then, the line of the sales slip includes "... sales slip (customer name, sales date, sales details +, total)", and these are extracted as the next hierarchy and set to the level number "01". Although not shown, if “... sales statement (article name, quantity, unit price)” is included in the line of the sales statement, these are extracted as the next hierarchy and set to the level number “02”. As a result, the level numbers shown in FIG. 4 are obtained. The level numbers correspond one-to-one with (equivalent to) the hierarchical (tree) structure of the XML data structure, as can be seen from a comparison between the display of the level numbers in FIG. 4 and the display of the model of the XML data structure. .
[0035]
On the other hand, depending on the XML form, DTD or XML data may not include a desired item (data name). In this case, the item needs to be provided by other means. Therefore, the unique data structure analysis unit 14 or the operation information analysis unit 15 is used. That is, the unique format item information 33 on the unique format form is read from the unique data structure analysis unit 14 and analyzed, and information such as items in particular is extracted as information on the data structure. Alternatively, information such as items in particular is directly input from the operation information analysis unit 15 as information on the data structure.
[0036]
The output processing unit 21 includes an XML data reading unit 22, a data analysis unit 23, a data structure reading unit 24, a layout information reading unit 25, and a form output unit 26 in order to create and output a form. The output processing unit 21 will be described with reference to FIG. FIG. 5 shows the creation and output of an XML form, and the relevant parts are extracted from FIG. 1 and should be compared with FIG.
[0037]
In FIG. 5, an XML data reading unit 22 reads XML data 35 on an XML form. The form definition 41 is a form definition 41 for an XML form, and is composed of XML data structure information 42 and layout information 43. This is created by the creation processing unit 11. The data structure reading unit 24 reads the XML data structure information 42 of the form definition 41. The layout information reading unit 25 reads the layout information 43 of the form definition 41. The data analysis unit 23 analyzes the XML data based on the read XML data 35 and the XML data structure information 42 of the form definition 41. The form output unit 26 creates and outputs a form based on the analysis by the data analysis unit 23 and the layout information 43 of the form definition 41.
[0038]
The data analysis unit 23 expresses the hierarchical relationship obtained from the read XML data 35 by hierarchical information. On the other hand, as described above, the XML data structure information 42 of the form definition 41 indicates the data structure using the hierarchical information indicating the hierarchical relationship between each item included in the data structure and other items. Therefore, when the hierarchy information obtained from the XML data 35 matches the hierarchy information in the XML data structure information 42 of the form definition 41, the data analysis unit 23 extracts the XML data of the item.
[0039]
Specifically, one item is extracted from the read XML data 35 in the same manner as described above, and a value obtained by adding a level number to this as hierarchical information indicating the hierarchical relationship is obtained. For example, since the top is “<sales slip>”, “00 sales slip” is obtained. On the other hand, as described above, in the XML data structure information 42, the highest hierarchy “00” is “sales slip”. Therefore, when the two items in the same hierarchy and in the same appearance order are compared, the items match in the “sales slip”.
[0040]
In some cases, they do not match. This is because an XML form, which is an actual form, often includes extra data when considering the data structure. For example, a “thank you sentence” for the purchase, the “company name” of the seller, and the like may be entered. These should be ignored when considering the data structure, and the processing proceeds to the next item without counting in the order of appearance.
[0041]
If the items match, it is determined that the item is a correct item in the XML form (for example, “sales slip”). Then, if necessary, data on the item is extracted. For example, the name (character data) when the item is “item name”, the quantity (numerical data) when the item is “quantity”, and the like. Further, the extracted item (and data) is fitted (layed out) to a corresponding position with a designated size according to the XML layout information 43.
[0042]
For this reason, in this example, the XML data structure information 42 and the XML layout information 43 are associated with each other using a tag in the XML form. For example, in the XML layout information 43, as described above, “! ELEMENT sales slip...” Is included in the first row, and therefore, the tag <sales slip> is added to the layout information extracted from this row. On the other hand, in the XML data structure information 42, the tag <sales slip> is added to the data structure information because it is the highest hierarchy “00 sales slip” as described above. As a result, the two items are linked, and the extracted item “sales slip” is laid out according to the linked layout information. Also, since the items are related by tags regardless of the appearance order of the items, the actual XML form can include items that are not related to the data structure, and even if the items are included, they can be laid out at the correct positions.
[0043]
FIG. 6 is a form processing flow, and shows processing of a form in the form processing apparatus 1 of the present invention.
[0044]
The creation processing unit 11 creates the layout information 43 of the form definition 41 based on the XML schema 31 and the like (step S11), and creates the XML data structure information 42 of the form definition 41 (step S12). Note that any of steps S11 and S12 may be performed first. Thereafter, the output processing unit 21 reads the XML data 35 of the XML form (step S13), and forms and outputs the form based on the XML data structure information 42 and the layout information 43 of the form definition 41 (step S13). Step S14).
[0045]
FIG. 7 is a flowchart of a form definition creation process, and illustrates a process of creating the layout information 43 of the form definition 41 in the form processing apparatus 1 of the present invention. This is a process corresponding to FIG. 2 and executed in step S11 of FIG.
[0046]
When the XML schema 31 is input to the creation processing unit 11 (step S21), the XML data structure analysis unit 12 reads the XML schema 31, analyzes the XML schema 31 (step S22), and based on this, lays out the XML data. Information is extracted (step S23). Thereafter, the layout information creating unit 16 checks whether or not the layout information has been extracted (step S24). If the layout information has been extracted, the layout information creating unit 16 creates the layout information 43 of the form definition 41 based on the extracted information. (Step S25), and based on this, the form layout is displayed on the operation terminal 5 (Step S26). If the layout information is not extracted, steps S25 and S26 are omitted. The layout information creating unit 16 creates or changes the layout information 43 of the form definition 41 according to the input from the operation terminal 5 as needed (step S27), and thereby converts the layout information 43 of the completed form definition 41. Output (Step S28).
[0047]
In step S27, as described in FIG. 2, the layout information 43 can be edited by various means. That is, if the layout information extracted from the XML schema 31 is acceptable, the editing process in step S27 may be omitted. When the layout information extracted from the XML schema 31 is changed, the original form item information 33 is read, and the displayed form layout is changed by adding the layout information extracted from the original format item information 33 or the layout information is changed from the operation terminal 5. Is input to change the layout information 43.
[0048]
Actually, it is more burdensome for the user to create the layout information by inputting the position and size of the item as the layout operation information from the operation terminal 5 than to describe all the layout information in the XML schema 31. It is easy to meet the user's desire. The unique format item information 33 is read in advance to extract layout information, which is prepared as a library. Therefore, in step S21, only the DTD in the XML schema 31 of the XML form is prepared and read, and in step S23, the item name and its attribute are obtained as layout information. In step S26, the layout information is displayed at an appropriate position and size. In step S27, the layout information is changed from the operation terminal 5 to the desired position and size. Change layout information by selecting from library. Thus, the layout information 43 can be easily created and changed.
[0049]
FIG. 8 is a flowchart of the form definition creation processing flow, and shows the creation processing of the XML data structure information 42 of the form definition 41 in the form processing apparatus 1 of the present invention. This is a process corresponding to FIGS. 3 and 4 and executed in step S12 of FIG.
[0050]
The XML data structure analysis unit 12 reads information describing an XML data structure such as the XML data 32 or the XML schema 31 (step S31), analyzes the XML data structure (step S32), and determines a level number based on the information. In addition, a tree structure of the data structure is created (step S33). Thereafter, the XML data structure information creation unit 17 checks whether or not there is an additional item to the data structure (step S34). If there is an additional item, whether the addition is based on the unique item data It is checked whether or not it is (step S35). If the addition is from the unique item data, the XML data structure information creating unit 17 adds the unique item data (step S36), and assigns a level number to the added item (step S37). If it is not the addition from the unique item data, the XML data structure information creating unit 17 omits steps S36 and S37, inputs the item data from the operation terminal 5 and adds it (step S38), and adds the level to the added item. A number is assigned (step S39), and the process ends. If there is no additional item in step S34, the process ends.
[0051]
FIG. 9 is a form output processing flow, and shows the form output processing in the form processing apparatus 1 of the present invention. This is a process corresponding to FIG. 5 and executed in steps S13 and S14 in FIG.
[0052]
The XML data reading unit 22 reads the XML data from the beginning (step S41), and the data analysis unit 23 analyzes the XML data structure, that is, the tree structure (step S42). On the other hand, the data structure reading unit 24 reads the XML data structure information 42 of the form definition 41 (step S43), and the data analysis unit 23 checks the tag name appearing in the tree structure of the read XML data and the XML data of the form definition 41. The tag names appearing in the structure information 42 are compared with each other, and it is checked whether the positions and the appearance order of the tag names match in both cases (step S44). If they do not match, step S41 and subsequent steps are repeated. If they match, the data analysis unit 23 extracts item data from the read XML data (step S45). Thereafter, the layout information reading unit 25 reads the layout information 43 of the form definition 41 (step S46), and the data analysis unit 23 applies the item data extracted in step S45 to the read form layout (step S47). It is checked whether or not the processing has been completed (step S48). If the process is not completed, the process from step S41 is repeated. When the processing is completed, the form is output (step S49), and the processing is terminated.
[0053]
【The invention's effect】
As described above, according to the present invention, the form processing apparatus can analyze the XML form to obtain the layout information and use the layout information as the layout information of the form definition. As a result, an existing form created in XML can be read and a form definition can be created, and the labor of manually describing the form definition for the XML form can be saved.
[0054]
Further, according to the present invention, the form processing apparatus can analyze the XML form to obtain the XML data structure information and use the XML data structure information as the XML data structure information of the form definition. As a result, an existing form created in XML can be read and a form definition can be created, and the labor of manually describing the form definition for the XML form can be saved.
[0055]
Further, according to the present invention, the form definition is provided with the XML data structure information without having to prepare a separate conversion program and convert the XML data into data in a format unique to each company in the form processing apparatus. Can be read.
[0056]
Further, according to the present invention, the form processing program can analyze the XML form, obtain the layout information and the XML data structure information, and make the layout information and the XML data structure information of the form definition. As a result, an existing form created in XML can be read and a form definition can be created. The form processing program of the present invention can be provided by being stored in various recording media such as a flexible disk, a CD-ROM, a CDR / W, and a DVD, and the form processing apparatus of the present invention can be easily realized. .
[0057]
Further, according to the present invention, since the form definition includes the XML data structure information in the form processing program without preparing a separate conversion program and converting the XML data into data in a format unique to each company, the XML data can be directly converted. Can be read. Thus, it is possible to read an existing form created in XML, create a form, and output the form. The form processing program of the present invention can be provided by being stored in various recording media such as a flexible disk, a CD-ROM, a CDR / W, and a DVD, and the form processing apparatus of the present invention can be easily realized. .
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a form processing device.
FIG. 2 is an explanatory diagram of a form definition creation process.
FIG. 3 is an explanatory diagram of a form definition creation process.
FIG. 4 is an explanatory diagram of a form definition creation process.
FIG. 5 is an explanatory diagram of a form output process.
FIG. 6 is a form processing flow.
FIG. 7 is a form definition creation processing flow.
FIG. 8 is a flowchart of a form definition creation process.
FIG. 9 is a form output processing flow.
FIG. 10 is an explanatory view of a conventional technique.
FIG. 11 is an explanatory diagram of a conventional technique.
[Explanation of symbols]
11 Form definition creation processing unit (creation processing unit)
12 XML data structure analysis unit
13 Item information analysis unit
14 Original Data Structure Analysis Department
15 Operation information analysis unit
16 Layout information creation section
17 XML data structure information creation unit
21 Form output processing unit (output processing unit)
22 XML data reading unit
23 Data analysis unit
24 Data structure reading unit
25 Layout information reading unit
26 Report output section
41 Form definition (file)
42 XML data structure information
43 Layout information

Claims (8)

XMLで記述された帳票についてのXMLデータ構造を解析してレイアウト情報を抽出するXMLデータ構造解析部と、
抽出されたレイアウト情報に基づいて、前記XMLで記述された帳票についての帳票定義のレイアウト情報を作成するレイアウト情報作成部とを備える
ことを特徴とする帳票処理装置。
An XML data structure analysis unit that analyzes an XML data structure of a form described in XML and extracts layout information;
A form processing apparatus, comprising: a layout information creating unit that creates form definition layout information for the form described in the XML based on the extracted layout information.
前記レイアウト情報は、少なくとも前記XMLで記述された帳票についての当該データ構造を記述した情報から抽出された項目名及びその属性からなる
ことを特徴とする請求項1に記載の帳票処理装置。
2. The form processing apparatus according to claim 1, wherein the layout information includes at least an item name extracted from information describing the data structure of the form described in the XML and an attribute thereof.
XMLで記述された帳票についてのXMLデータ構造を解析してデータ構造情報を抽出するXMLデータ構造解析部と、
抽出された前記データ構造情報に基づいて、前記XMLで記述された帳票についての帳票定義のXMLデータ構造情報を作成するXMLデータ構造情報作成部とを備える
ことを特徴とする帳票処理装置。
An XML data structure analysis unit that analyzes an XML data structure of a form described in XML and extracts data structure information;
A form processing apparatus comprising: an XML data structure information creation unit that creates XML data structure information of a form definition for a form described in the XML based on the extracted data structure information.
前記XMLデータ構造情報作成部は、抽出された前記データ構造情報におけるデータ構造を、当該データ構造に含まれる項目の各々について他の項目との階層関係を表す階層情報を用いて表す
ことを特徴とする請求項3に記載の帳票処理装置。
The XML data structure information creating unit represents the data structure in the extracted data structure information using hierarchical information indicating a hierarchical relationship with other items for each of the items included in the data structure. The form processing device according to claim 3.
XMLで記述された帳票についてのXMLデータを読み取るXMLデータ読取部と、
前記XMLで記述された帳票についての帳票定義であって、XMLデータ構造情報とレイアウト情報とからなる帳票定義と、
前記帳票定義のXMLデータ構造情報を読み取るデータ構造読取部と、
前記帳票定義のレイアウト情報を読み取るレイアウト情報読取部と、
読み取った前記XMLデータと前記帳票定義のXMLデータ構造情報とに基づいて、当該XMLデータを解析するデータ解析部と、
前記データ解析部での解析と前記帳票定義のレイアウト情報とに基づいて、帳票を作成して出力する帳票出力部とを備える
ことを特徴とする帳票処理装置。
An XML data reading unit that reads XML data about a form described in XML;
A form definition for the form described in the XML, the form definition including XML data structure information and layout information;
A data structure reading unit that reads the XML data structure information of the form definition;
A layout information reading unit that reads layout information of the form definition;
A data analysis unit that analyzes the XML data based on the read XML data and the XML data structure information of the form definition;
A form processing device, comprising: a form output unit that creates and outputs a form based on the analysis by the data analysis unit and the layout information of the form definition.
前記帳票定義のXMLデータ構造情報は、当該データ構造を、当該データ構造に含まれる項目の各々について他の項目との階層関係を表す階層情報を用いて表し、
前記データ解析部は、読み取った前記XMLデータから得られる階層関係を階層情報により表し、これと前記帳票定義のXMLデータ構造情報における階層情報とが一致する場合に、当該項目のXMLデータを抽出する
ことを特徴とする請求項5に記載の帳票処理装置。
The XML data structure information of the form definition expresses the data structure using hierarchical information indicating a hierarchical relationship with other items for each of the items included in the data structure,
The data analysis unit expresses a hierarchical relationship obtained from the read XML data by hierarchical information, and when the hierarchical relationship matches the hierarchical information in the XML data structure information of the form definition, extracts the XML data of the item. 6. The form processing apparatus according to claim 5, wherein:
XMLで記述された帳票についての帳票定義を作成するプログラムであって、
前記プログラムは、コンピュータに、
前記XMLで記述された帳票についてのXMLデータ構造を解析してレイアウト情報を抽出させ、
抽出された前記レイアウト情報に基づいて、前記XMLで記述された帳票についての帳票定義のレイアウト情報を作成させ、
前記XMLで記述された帳票についてのXMLデータ構造を解析してデータ構造情報を抽出させ、
抽出された前記データ構造情報に基づいて、前記XMLで記述された帳票についての帳票定義のXMLデータ構造情報を作成させる
ことを特徴とする帳票処理プログラム。
A program for creating a form definition for a form described in XML,
The program is stored in a computer,
Analyzing the XML data structure of the form described in the XML to extract layout information;
Based on the extracted layout information, form information of a form definition for the form described in the XML is created,
Analyzing the XML data structure of the form described in the XML to extract data structure information;
A form processing program for generating XML data structure information of a form definition for a form described in XML based on the extracted data structure information.
XMLで記述された帳票から帳票データを読み取って帳票を作成し出力するプログラムであって、
前記プログラムは、コンピュータに、
前記XMLで記述された帳票についてのXMLデータを読み取らせ、
前記XMLで記述された帳票についての帳票定義であってXMLデータ構造情報とレイアウト情報とからなる帳票定義の前記XMLデータ構造情報を読み取らせ、
前記帳票定義の前記レイアウト情報を読み取らせ、
読み取った前記XMLデータと前記帳票定義のXMLデータ構造情報とに基づいて、当該XMLデータを解析させ、
前記解析と前記帳票定義のレイアウト情報とに基づいて、帳票を作成して出力させる
ことを特徴とする帳票処理プログラム。
A program for reading form data from a form described in XML, creating and outputting the form,
The program is stored in a computer,
Read XML data on the form described in the XML,
Reading the form data definition of the form described in the XML, the form data comprising the XML data structure information and the layout information;
Read the layout information of the form definition,
Analyzing the XML data based on the read XML data and the XML data structure information of the form definition,
A form processing program for creating and outputting a form based on the analysis and the layout information of the form definition.
JP2002174226A 2002-06-14 2002-06-14 Form processing device and form processing program Pending JP2004021500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002174226A JP2004021500A (en) 2002-06-14 2002-06-14 Form processing device and form processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002174226A JP2004021500A (en) 2002-06-14 2002-06-14 Form processing device and form processing program

Publications (1)

Publication Number Publication Date
JP2004021500A true JP2004021500A (en) 2004-01-22

Family

ID=31173253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002174226A Pending JP2004021500A (en) 2002-06-14 2002-06-14 Form processing device and form processing program

Country Status (1)

Country Link
JP (1) JP2004021500A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008266514A (en) * 2007-04-24 2008-11-06 Soken Chem & Eng Co Ltd Adhesive composition comprising terminal-reactive acrylic polymer and use thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008266514A (en) * 2007-04-24 2008-11-06 Soken Chem & Eng Co Ltd Adhesive composition comprising terminal-reactive acrylic polymer and use thereof

Similar Documents

Publication Publication Date Title
CN100362464C (en) Document processing apparatus and document processing method
CN101427272B (en) System and method for user creation and direction of a rich-content life-cycle
US7509576B2 (en) Information processing system and method, program, and recording medium
US20140222625A1 (en) Intelligent Multimedia E-Catalog
CN101308490A (en) A method and platform for generating dynamic reports
CN100565521C (en) Dynamic method for generating XML documents from a database
JP2019518275A (en) Data flow design with static and dynamic elements
US20060143562A1 (en) Self-describing editors for browser-based WYSIWYG XML/HTML editors
JP2004503841A (en) Method and system for reporting XML data from legacy computer systems
KR20060096268A (en) Designer-Generated Aspects for Electronic Form Templates
JPH11513151A (en) How to generate a multimedia presentation
WO2015162737A1 (en) Transcription task support device, transcription task support method and program
US7765472B2 (en) Method and device for editing SVG type digital graphical documents in particular from a browser
JP2004021500A (en) Form processing device and form processing program
JP3531579B2 (en) Multimedia document generation apparatus and method, and recording medium storing program for causing computer to execute these
JP2002288153A (en) Application-independent data forming method, information processing program, and layout information processing system
KR20040090866A (en) XML Document Editor Using a Form and Computer-Readable Recording Medium
JP4373470B2 (en) Document conversion utilization system
Turley Professional Microsoft SQL Server 2016 Reporting Services and Mobile Reports
WO2017090054A1 (en) Editfile
CN118550572B (en) A low-code platform secondary development method and system based on page metamodel
JP5589396B2 (en) Layout support device, layout support method, and program
JP2008217170A (en) Information processing apparatus and program
JP4706001B2 (en) Design computer programs
JP2008108144A (en) Information processing method, information processing apparatus, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041111

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060725

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061121