JP4173770B2 - Data processing apparatus, data processing method, data processing program, and recording medium - Google Patents

Data processing apparatus, data processing method, data processing program, and recording medium Download PDF

Info

Publication number
JP4173770B2
JP4173770B2 JP2003152096A JP2003152096A JP4173770B2 JP 4173770 B2 JP4173770 B2 JP 4173770B2 JP 2003152096 A JP2003152096 A JP 2003152096A JP 2003152096 A JP2003152096 A JP 2003152096A JP 4173770 B2 JP4173770 B2 JP 4173770B2
Authority
JP
Japan
Prior art keywords
data
tag
text
attribute
information
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
JP2003152096A
Other languages
Japanese (ja)
Other versions
JP2004355320A (en
JP2004355320A5 (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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2003152096A priority Critical patent/JP4173770B2/en
Priority to PCT/JP2004/006924 priority patent/WO2004104857A1/en
Priority to EP04733166A priority patent/EP1628227A4/en
Publication of JP2004355320A publication Critical patent/JP2004355320A/en
Publication of JP2004355320A5 publication Critical patent/JP2004355320A5/ja
Application granted granted Critical
Publication of JP4173770B2 publication Critical patent/JP4173770B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、データ処理装置、データ処理方法、データ処理プログラムおよび記録媒体に関し、特に、階層構造を有する電子データを、テキストデータと、タグ出現位置データと、タグ詳細データとを組合わせて処理するためのデータ処理装置、データ処理方法、データ処理プログラムおよび記録媒体に関する。
【0002】
【従来の技術】
文書記述言語の定義に従って所定の処理を実行させるための構造化された電子データであって、階層構造を有する構造化文書を記録するためのデータ形式として、SGML(Standard Generalized Mark−up Language)やXML(eXtensible Mark−up Language)などが知られている。特にXMLは、インターネットで交換する電子文書や電子データなどで近年盛んに使用されている(非特許文献1の14−15ページを参照)。
【0003】
XML形式の電子データを扱う処理方法として、DOM(Document Object Model)形式とSAX(Simple API for XML)形式が存在する。
【0004】
DOM形式とは、対象とする電子データをすべて読込み、電子データ内の全要素の階層構造を把握してから、電子データの各要素にアクセスする処理方法である。例えば、図12のような階層構造を持つ電子データがある場合、一旦、電子データ全体を読込み、全要素の階層構造を解析する。図12は電子データの階層構造のみを示し、本文、内容は省略している。そして、図12の階層構造を持つ電子データから、図13のような木構造を作成した後、各要素(TITLE、AUTHORなど)にアクセスする。よって、電子データの階層構造を把握した後に処理することになるため、任意の要素にアクセスしやすいという特徴がある。
【0005】
これに対し、SAX形式では、電子データを先頭から順に読込みながら、読込んだ要素のみ構造解析し、処理していく形式である。そのため、電子データ全体の解析処理を待たずに、順次処理していくことができ、処理速度に関してもメモリ容量に関してもオーバヘッドが少ないというメリットがある。
【0006】
【非特許文献1】
プログラミング技術情報誌 C MAGAZINE FEB.2000 2「特集1 XML C/C++による実用的な利用法」、発行元:ソフトバンクパブリッシング株式会社
【0007】
【発明が解決しようとする課題】
以上のように、DOM形式、SAX形式ともにそれぞれのメリットがあるが、反面、次のようなデメリットがそれぞれにある。
【0008】
DOM形式の場合、電子データ内の一部のデータだけを処理したい場合であっても、木構造を生成するために、電子データ全体の構造解析をしなくてはならず、処理に無駄が生じる。また、電子データのサイズが大きくなると、木構造を作成するための処理時間、および木構造を記憶しておくためのメモリ使用量が多くなるという欠点があった。
【0009】
一方、SAX形式の場合、電子データの先頭から順に処理することを前提にしたアクセス形式であるため、電子データの内容を先頭から順に処理せず、任意の要素を任意の順番に扱う場合でも、必ず先頭からデータを読込み、構造解析の処理が入る。また、電子データの後半の要素を処理したいときであっても、電子データの先頭から読込み、構造解析を必要とするために処理時間に無駄が生じる。
【0010】
階層構造を持つ電子データを高速に処理できるようにするため、電子データを、タグ情報を除き、表示すべき内容のみを記録したテキストデータと、そのテキストデータを処理する際に必要となるタグ情報(例えば、タグ名、属性名、属性値や、テキストデータにおけるそのタグの出現位置などの情報)を記録したタグデータとに変換して、それらを組合わせて処理することによって、処理時間を短縮する方法が考えられる。
【0011】
しかしながら、上記タグデータに記録されるタグ情報はタグの種類によって、属性の種類や数が異なり大きさが変動するため、上記タグデータは可変長領域または十分に大きなサイズの固定長領域を確保する必要がある。従って、電子データをテキストデータとタグデータとに変換することにより、タグ部分であるかテキスト部分であるかを判定する処理はなくなるが、任意箇所の要素を高速に処理する場合に関しては、タグデータの先頭から読込み、構造解析をしないといけないため、十分な効果を得ることができない。
【0012】
それゆえに、この発明の目的は、階層構造を有した電子データの取扱いを容易にするためのデータ処理装置、データ処理方法、データ処理プログラムおよび記録媒体を提供することである。
【0013】
【課題を解決するための手段】
この発明のある局面に従う、テキストデータとテキストデータにおいて出現する複数のタグを含み、かつタグを用いて階層構造化された電子データを処理するデータ処理装置は、テキストデータが記録されるテキスト情報と、複数タグのそれぞれに対応して該タグの属性を示す属性データが記録されるタグ詳細情報と、複数タグのそれぞれについて該タグのテキストデータにおける出現位置を示す出現位置データが記録されるタグ出現位置情報とを入力する入力手段と、入力手段により入力されたテキスト情報から、電子データの処理対象となる任意領域に対応するテキストデータを読出すテキスト読出手段と、入力手段により入力されたタグ出現位置情報に基づいて、任意領域に対応するテキストデータにおいて出現するタグを特定し、入力手段により入力されたタグ詳細情報から、特定されたタグの属性データを読出す属性読出手段と、テキスト読出手段により読出されたテキストデータを、属性読出手段により読出された属性データに基づいて処理するデータ処理手段とを備える。
【0014】
上述のデータ処理装置では、電子データを、そのテキスト情報とタグ出現位置情報とタグ詳細情報という個別に準備された情報を用いてデータ処理するので、処理対象のデータがタグ部分であるかテキスト部分であるかの判定に関する処理を省略できて、処理を高速に実行できる。
【0015】
また、電子データとは別個にタグ出現位置情報が準備されているので、タグ出現位置を特定するために電子データのタグに関する木構造(階層化構造)を個別に解析しなくて済むから木構造作成の処理を省略でき、木構造を構築するためのメモリ容量も省略できる。またテキストデータの任意箇所に出現するタグに関して処理する場合には、タグ出現位置データを検索することで該任意箇所に出現するタグを容易に特定できるから、該任意箇所に出現するタグの属性データをタグ詳細情報から速やかに読出すことができる。その結果、階層構造化された電子データの処理を簡単化・高速化できる。
【0016】
好ましくは、タグ出現位置情報に記録される出現位置データは固定長のデータである。したがって、タグ出現位置情報における各出現位置データの検索を該固定長に基づいて行なうことができて、検索を効率良く行なえる。
【0017】
好ましくは、出現位置データは、テキストデータにおける該タグの有効範囲を示す有効範囲データと、タグ詳細情報における該タグの属性データが記録された場所を示す記録場所データを含み、属性読出手段は、任意領域に該当するタグを有効範囲データに基づいて特定し、特定されたタグの記録場所データに基づいてタグ詳細情報から該タグの属性データを読出す。
【0018】
したがって、有効範囲データに基づいて任意領域のテキストデータにおいて出現するタグを容易に特定できる。また、特定できたタグの属性データのタグ詳細情報における記録位置も、その記録場所データに基づいて容易に特定して読出しできる。
【0019】
好ましくは、データ処理手段は、テキスト読出手段により読出されたテキストデータについて、属性読出手段により読出された属性データに基づいて、レイアウトを計算するレイアウト計算手段を有する。
【0020】
したがって、レイアウト計算のためのタグの属性データは上述のように簡単に特定してタグ詳細情報から読出した後にレイアウト計算できるから、レイアウト計算に要する負荷を少なくできる。
【0021】
好ましくは、レイアウト計算手段はテキスト読出手段により読出されたテキストデータの出力時のレイアウトを計算する。この出力は表示を含む。
【0022】
好ましくは、有効範囲データは、テキストデータにおける該タグの属性が有効となる部分のデータの開始場所と終了場所を示す。したがって、有効範囲データをデータの開始場所と終了場所により示すことができる。
【0023】
好ましくは、有効範囲データは、テキストデータにおける該タグの属性が有効となる部分のデータの開始場所と、該部分データの大きさとを示す。したがって、有効範囲データをデータの開始場所と該データの大きさ(サイズ)とで特定できる。
【0024】
好ましくは、記録場所データは、タグ詳細情報における該タグの属性データの記録開始場所と終了場所とを示す。したがって、記録場所データを対応の属性データの記録開始場所と終了場所により示すことができる。
【0025】
好ましくは、記録場所データは、タグ詳細情報における該タグの属性データの記録開始場所と該属性データの大きさを示す。したがって、記録場所データを属性データの記録開始場所と該データの大きさ(サイズ)とで特定できる。
【0026】
好ましくは、電子データを検索してテキストデータを抽出して記録しテキスト情報を作成するテキスト情報作成手段と、電子データを検索してタグが検索される毎に、該タグに対応して属性データを記録しタグ詳細情報を作成するタグ詳細情報作成手段と、電子データを検索してタグが検索される毎に、該タグに対応して出現位置データを記録しタグ出現位置情報を作成するタグ出現位置情報作成手段との少なくとも1つをさらに備える。
【0027】
したがってデータ処理装置では、電子データについて、テキスト情報、タグ詳細情報およびタグ出現位置情報のそれぞれを作成することができる。
【0028】
好ましくは、テキスト情報作成手段は、電子データの任意領域を検索してテキストデータを抽出して記録しテキスト情報に作成し、タグ詳細情報作成手段は、電子データの任意領域を検索してタグが検索される毎に、該タグに対応して属性データを記録しタグ詳細情報を作成し、タグ位置情報作成手段は、電子データの任意領域を検索してタグが検索される毎に、該タグに対応して出現位置データを記録しタグ出現位置情報を作成する。
【0029】
したがって、電子データの全体ではなく任意領域のデータについて、テキスト情報、タグ詳細情報およびタグ出現位置情報のそれぞれを作成することができる。
【0030】
好ましくは、データ処理装置は、電子データのためのテキスト情報、タグ出現位置情報およびタグ詳細情報を、入力手段により入力可能か否か判断する手段をさらに備える。
【0031】
したがって、入力手段によるこれらデータの入力が可能か否かをデータ処理に先立ち判定できる。また、これらデータの作成は、該判定の結果が、入力不可を示すときに行なわれるようにしてよい。
【0032】
この発明の他の局面に従う、テキストデータとテキストデータにおいて出現する複数のタグを含み、かつタグを用いて階層構造化された電子データを処理するデータ処理方法は、テキストデータが記録されるテキスト情報と、複数タグのそれぞれに対応して該タグの属性を示す属性データが記録されるタグ詳細情報と、複数タグのそれぞれについて該タグのテキストデータにおける出現位置を示す出現位置データが記録されるタグ出現位置情報とを入力する入力ステップと、入力ステップにより入力されたテキスト情報から、電子データの処理対象となる任意領域に対応するテキストデータを読出すテキスト読出ステップと、入力ステップにより入力されたタグ出現位置情報に基づいて、任意領域に対応するテキストデータにおいて出現するタグを前記情報処理部により特定し、入力ステップにより入力されたタグ詳細情報から、特定されたタグの前記属性データを読出す属性読出ステップと、テキスト読出ステップにより読出されたテキストデータを、属性読出ステップにおいて読出された属性データに基づいて処理するデータ処理ステップとを備える。
【0033】
好ましくは、上述のデータ処理方法はコンピュータにおいて実行されて、コンピュータに関連の入力部を介して入力ステップが実行されて、コンピュータに関連の情報処理部を介してテキスト読出ステップ、属性読出ステップおよびデータ処理ステップが実行される。
【0034】
この発明のさらに他の局面に従うデータ処理プログラムは、上述のデータ処理方法をコンピュータに実行させるためのプログラムである。
【0035】
この発明のさらに他の局面に従う記録媒体は、上述のデータ処理プログラムを記録したコンピュータ読取可能な記録媒体である。
【0036】
【発明の実施の形態】
以下、図を用いて本発明の実施の形態について説明する。
【0037】
本実施の形態では、階層構造を持つ電子文書データを高速に処理できるようにするため、電子文書データから作成して、表示すべき内容のみを記録したテキストデータと、そのテキストデータを処理する際に必要となるタグの情報およびテキストデータにおける出現位置の情報を記録した固定長のタグ出現位置データと、そのタグの属性などの情報を記録した可変長のタグ詳細データとを得て、それらを組合わせて処理することによって、処理時間を短縮するとともにメモリ使用量を削減する。
【0038】
(用語の説明)
まず、HTML、XML、SGMLなどのマークアップ言語で記載されたテキストファイル中で用いられるタグに関連した用語について説明する。タグは、ここでは文字列の出力態様(インデント、表示色など)を指定するための特別の文字または記号の列であり、予約語である。
【0039】
テキストファイル中に記載されたタグの情報を解析する場合には、開始タグ、これと対となる終了タグ(ここではタグ対という)、開始タグと終了タグとに挟まれた部分データである子供要素とに分け、また、開始タグの中を、タグ名、属性名、属性値に解析する必要がある。
【0040】
開始タグとは、「<」で始まり、「>」で終わる文字列の部分をいう。終了タグとは、「</」で始まり、「>」で終わる文字列の部分をいう。開始タグと終了タグとに挟まれた部分に子供要素がない場合は、開始タグと終了タグを1つにして、「<」で始まり、「/>」で終わる文字列として記述することもできる。これを、空タグという。空タグは、開始タグと終了タグとが並んでいるのと同等に考えることができる。
【0041】
空タグでない場合には、子供要素はテキストファイルを構成する文字列または他のタグ対を含む。子供要素において、該子供要素を挟むタグ対の開始タグと同一種類の属性を指示する1つ以上のタグ対が含まれる場合には、子供要素を挟むタグ対(これを外部タグ対という)と該子供要素中に含まれるタグ対(これを内部タグ対という)は、複数のタグ対が階層構造を有する入れ子関係を構成するので、内部タグ対の開始タグの属性値には上位層の外部タグ対の属性値が反映されることになる。
【0042】
タグ名は、開始タグまたは空タグの「<」の次に続く文字列で示される。タグ名の後ろに「=」を含んだ文字列が続く場合、「=」の左辺が属性名、右辺の「”」で囲まれた文字列が属性値という。例えば、「<a b=“c”>d</a>」というXMLデータがあった場合、「<a b=“c”>」が開始タグ、「d」が子供要素、「</a>」が終了タグである。開始タグの中の「a」がタグ名、「b」が属性名、「c」が属性値である。属性名は該開始タグの子供要素に関する出力時の属性、たとえばインデント、表示色などの固有の特徴を指し、属性値は対応する属性の値、たとえばインデントの文字下げの数、表示色が赤色などを示す。子供要素が空の場合の空タグの場合には、「<a b=“c”/>」という形式になる。なお、以下の説明では、タグ名が「a」である場合にはそのタグ名を「aタグ」、属性名が「b」である場合にはその属性名を「b属性」、対応する属性値を「b属性の値」という。
【0043】
(データ処理装置の構成)
図1は、本発明に係るデータ処理装置の構成を周辺装置と関連付けて示す図である。データ処理装置118の周辺には、ユーザからの要求を受信し、図示のないデータベースに記録された電子データを送信するサーバ114、ユーザが電子データを受信するためのパソコン(パーソナルコンピュータの略)116、サーバ114とパソコン116を接続するネットワーク115、およびパソコン116から電子データを取出してデータ処理装置118に電子データを供給するための記録媒体117が設けられる。データ処理装置118は記録媒体117から供給された電子データを処理して目的に応じたデータ処理、例えば表示のためのデータ処理などをする。ここでは電子データは表示されると想定して説明するが、他の出力形態、たとえば電子データは印刷されてもよい。
【0044】
パソコン116をコンビニエンスストア、駅構内などに設置された電子データ受信装置に代替し、この電子データ受信装置から電子データを読出して、記録媒体117に記録する方式としてもよい。この場合、電子データ受信装置から電子データを読出して記録媒体117に記録する際に課金することが可能である。
【0045】
また、サーバ114から送信される電子データを、パソコン116を介することなく、データ処理装置118が受信して記録媒体117に記録するように構成してもよい。
【0046】
記録媒体117にはパソコン116などの装置により電子データ100、ならびに該電子データ100から作成して得られたテキストデータ101、タグ出現位置データ102、およびタグ詳細データ103が対応付けして格納される。ここでは、説明を簡単にするために記録媒体117には電子データ100とそれから作成されたデータが対応付けられて1組だけ格納されると想定しているが、複数組が格納されていてよい。
【0047】
電子データ100は文書記述言語の定義に従って所定の処理を実行させるための構造化された電子データであって、複数のタグを用いた階層構造を有する構造化文書を記録するためのデータ形式であるSGMLやXMLなどを用いて記録される。
【0048】
テキストデータ101は、構造化された電子データ100から表示すべき内容のみを示すデータである。タグ出現位置データ102は、対応のテキストデータ101を処理する際に必要となるタグ情報のうち、各タグのタグ名情報、およびテキストデータ101における出現位置情報を記録したデータであり、固定長データのみで構成される。タグ詳細データ103は、対応のテキストデータ101を処理する際に必要となるタグ情報のうち、各タグの属性などの情報を記録したデータである。
【0049】
サーバ114から送信されて記録媒体117に格納されるデータは、電子データ100のみでもよいし、電子データ100から作成されたテキストデータ101、タグ出現位置データ102およびタグ詳細データ103の3つのデータのみでもよい。
【0050】
データ処理装置118は入力部104、データ構造解析部105、処理部106、制御部110、テキストデータ作成部111、タグ出現位置データ作成部112およびタグ詳細データ作成部113を備える。
【0051】
入力部104は記録媒体117から電子データ100、テキストデータ101、タグ出現位置データ102およびタグ詳細データ103を読込む。
【0052】
データ構造解析部105は電子データ100から、もしくはテキストデータ101、タグ出現位置データ102およびタグ詳細データ103から、電子データ100の階層構造を解析する。
【0053】
テキストデータ作成部111は、テキストデータ101が存在しない場合に電子データ100からテキストデータ101を作成する。サーバ114から送信されるデータが、テキストデータ101、タグ出現位置データ102およびタグ詳細データ103の3つである場合、テキストデータ作成部111は省略されてもよい。
【0054】
タグ出現位置データ作成部112は、タグ出現位置データ102が存在しない場合に電子データ100からタグ出現位置データ102を作成する。サーバ114から送信されるデータが、テキストデータ101、タグ出現位置データ102およびタグ詳細データ103の3つである場合、タグ出現位置データ作成部112は省略されてもよい。
【0055】
タグ詳細データ作成部113は、タグ詳細データ103が存在しない場合に電子データ100からタグ詳細データ103を作成する。サーバ114から送信されるデータが、テキストデータ101、タグ出現位置データ102およびタグ詳細データ103の3つである場合、タグ詳細データ作成部113は省略されてもよい。
【0056】
制御部110は、入力部104、データ構造解析部105、テキストデータ作成部111、タグ出現位置データ作成部112、タグ詳細データ作成部113、および処理部106の処理を制御する。
【0057】
処理部106は、データ構造解析部105による階層構造の解析結果に基づき所定の処理を行う。具体的には、処理部106は、対象とする電子データの内容、および処理内容によって構成が異なるが、データ処理装置118が、例えば、インターネットで交換する電子文書や電子データ、単行本、教科書、雑誌、小説や論文のような文章などの電子データを表示するための装置である場合には、文章の表示レイアウトを計算するレイアウト計算部107による算出された表示レイアウトに基づいて表示をする表示部108およびスクロールなどのユーザからの指示を処理するユーザ指示処理部109を有する。
【0058】
電子データが音声データである場合は、処理部106は音声データの読上げ装置に変更され、また、表示部108には音声再生部が使用され、レイアウト計算部107は読む部分と読まない部分を判定したり、強調して読む部分とそうでない部分を判定したり、また各読上げの間隔を調整する部分に変更される。音声データの場合、階層構造に応じて音声属性を変えて読上げるようにしてもよい。さらに音声の場合はシナリオ解釈部、音声出力部、再生源を管理するために、各要素の間で同期を取る同期部が必要になる。
【0059】
(データ処理装置の実現例)
図2にデータ処理装置118を携帯型の表示処理装置として実現した場合の例を示す。図2において、表示部108は液晶ディスプレイなどから構成される。記録媒体117は、入力部104に着脱自在に装着されて、装着されたときは、記録媒体117に予め格納された処理対象の電子データ100、もしくはテキストデータ101、タグ出現位置データ102およびタグ詳細データ103が入力部104を介して読取られる。ユーザ指示処理部109に関連して十字キー119およびペン120を備える。十字キー119は、ユーザが表示文書のスクロール指示や表示させたい書籍や文書の電子データ100の選択を指示する場合などに操作される。ペン120は、電子データにリンク機能が含まれるとき、リンク先にジャンプするためにユーザにより用いられて、データ処理装置118の制御部110からユーザに対して求められた確認事項に返答するためにも使用される。
【0060】
なお、データ処理装置118に対する電子データ100、もしくはテキストデータ101、タグ出現位置データ102およびタグ詳細データ103とのすべて、または一部の供給は、記録媒体117を介してするものに限定されない。たとえば、データ処理装置118本体の内部に所定の記録領域を設けて、そこに上述したようなデータの一部、もしくはすべてを記録するようにしてもよい。また、ネットワーク115上のサーバ114、あるいは図示のないデータベースに上述のデータの一部、もしくはすべてを記録し、ダウンロードしながら処理するようにしてもよい。
【0061】
(タグ出現位置データ102の説明)
図3にタグ出現位置データ102の構造の一例を示す。タグ出現位置データ102は、ファイル名情報300とタグ出現位置情報301とを含む。ファイル名情報300は、対応するテキストデータ101のファイル名、対応するタグ詳細データ103のファイル名を示すデータ302と303を含む。
【0062】
ファイル名情報300は、タグ出現位置データ102が、どのテキストデータ100、もしくは、どのタグ詳細データ103に対応するものかを指示するから、タグ出現位置データ102を、対応のテキストデータ101と連結して記録する場合には、テキストデータファイル名のデータ302の領域は省略してもよい。また、タグ出現位置データ102を、対応のタグ詳細データ103と連結して記録する場合には、タグ詳細データファイル名のデータ303の領域は省略してもよい。
【0063】
タグ出現位置情報301は、対応のテキストデータ101に含まれるタグの総数を示すデータ304および対応のテキストデータ101に含まれる全てのタグのそれぞれに対応してタグ位置データ305を含む。タグ位置データ305のそれぞれは、対応のタグ名を示すデータ306、対応のタグのテキストデータ101における出現開始位置と終了位置を示すデータ307と308、および対応のタグのタグ詳細データ103における格納開始位置と終了位置を示すデータ309と310を含む。なお、データ307と308は開始タグと終了タグのテキストデータ101における記述位置を示す。データ307〜310はタグの各データ(テキストデータ101またはタグ詳細データ102)の先頭からのバイト数などで記録される。
【0064】
タグのテキストデータ101における出現終了位置の代わりに、タグのテキストデータ101における影響範囲を記録してもよい。影響範囲とは、タグの属性が有効となる部分のテキストデータの大きさ(範囲)を示し、出現開始位置から出現終了位置までの範囲に対応する。つまり、(出現終了位置−出現開始位置)による差分を意味する。これによって、出現位置の情報の代わりに影響範囲の情報を記録しても、(出現開始位置+影響範囲)の値から出現終了位置のデータ308を得ることができる。
【0065】
同様に、タグのタグ詳細データ103における格納終了位置のデータ310の代わりに、タグのタグ詳細データ103におけるデータサイズを記録してもよいデータサイズとは、格納開始位置から格納終了位置までのサイズを意味する。つまり、(格納終了位置−格納開始位置)の差分を意味する。これによって、格納位置の情報の代わりにデータサイズの情報を記録しても、(格納開始位置+データサイズ)の値から格納終了位置のデータ310を得ることができる。
【0066】
タグ出現位置データ102を構成するデータは図3に示すように固定長のデータである。ここで、本実施の形態では、固定長データとは電子データ100の内容に応じて情報が変動しても予め準備する所定のサイズ(例えば4バイト)を超えないようなデータを指す。従って、例えば、図3に示すように、タグのテキストデータ101における出現開始位置を示すデータ307として4バイトが割当てられた場合、ファイルの先頭からのバイト数を示す0から4294967295のいずれかの値を入力する必要がある。なお、各領域に対するサイズの割当ては、取扱う電子データ100や、データ処理装置118の処理能力に応じて決定することができる。
【0067】
(タグ詳細データ103の説明)
図4にタグ詳細データ103の構造の一例を示す。図4を参照して、タグ詳細データ103は、対応のタグ出現位置データ102に記録されている全てのタグのそれぞれに対応してタグ詳細データ401を含む。タグ詳細データ401は対応のタグが示す異なる種類の属性の総数を示すデータ402、および、対応のタグが示す異なる種類の全ての属性それぞれに対応して属性の種類名を示すデータANおよび属性の値AVを示す。タグ詳細データ103は、その長さが各タグの内容に依存するため、基本的に可変長データで構成されるが、固定長データで構成されてもよい。
【0068】
(データの具体例について)
次に、テキストデータ101、タグ出現位置データ102内の各データおよびタグ詳細データ103内の各データの書式について、文書記述言語の定義に従って記述され、階層構造を有する電子データ100の具体例であるXHTML文書を用いて説明する。図5には、処理対象のXHTML文書である電子データ100の一例が示される。
【0069】
図6(A)には、図5のXHTML文書の電子データ100から作成したテキストデータ101の一例が示される。図6(A)に示すように、基本的には各タグによって挟まれた子供要素のうち、表示すべき内容、すなわち文字列のみがテキストデータ101に記録される。このように記録することにより、データ処理装置118の処理能力が低く、タグ出現位置データ102およびタグ詳細データ103の解析が困難な場合に、テキストデータ101のみを処理して表示した場合には、ユーザは表示内容から少なくとも、記述されている文書の内容だけは理解することができる、といった利点が生じる。そのため、表示すべき内容であっても、テキストデータ101に記録しない場合がある。これを、文字列にルビを設定するために使用するタグ(以下、ルビタグという)を例として示す。
【0070】
図5のルビタグ503の場合、通常であれば、開始タグ<rb>と終了タグ</rb>で挟まれた子供要素「吾輩」と、開始タグ<rt>と終了タグ</rt>で挟まれた子供要素「わがはい」はテキストデータ101に記録されるが、そのままでは、テキストデータ101の記録内容に従う表示内容は「吾輩わがはい」を示すこととなってしまい、意味がわからなくなってしまう。
【0071】
そこで、ルビタグ503を<ruby2 rt=“わがはい”>吾輩</ruby2>と変換する。本実施の形態では、<ruby2>は、ルビ用のタグであり、ルビ文字列を指定するrt属性を持ち、被ルビ文字列を子供要素に指定するタグを意味する。ルビタグ503を<ruby2>タグを使用した要素に変換することにより、テキストデータ101には、子供要素である「吾輩」を記録し、rt属性の値「わがはい」をタグ詳細データ103に記録する。この場合のタグ詳細データ103への記録内容に関しては後述する。
【0072】
ルビタグ505の場合も、同様に<ruby2 rt=“けんとう”>見当</ruby2>に変換し、子供要素「見当」をテキストデータ101に記録し、rt属性の値「けんとう」をタグ詳細データ103に記録する。
【0073】
ルビタグ以外にも、通常、テキストデータ101に記録すべき子供要素でも、その子供要素を対応のタグの属性値に変換し、タグ詳細データ103に記録した方がテキストデータ101の内容が理解しやすくなる場合は同様の処理を行ってもよい。
【0074】
上述のルビタグとは逆に、タグの属性値であっても、テキストデータ101に記録する場合もある。これを、外字を設定するために使用するタグ(以下、外字タグという)を例として説明する。
【0075】
本実施の形態では、<gaiji>は、外字用のタグであり、文字フォント名を指定するset属性と、そのset属性で指定した文字フォント内での位置を指定するcode属性と、横書き表示用の代替画像を指定するimg属性と、横書き表示用の代替画像を指定するvimg属性と、代替文字列を指定するalt属性という異なる複数種類の属性を持つタグを意味する。
【0076】
図5の外字タグ506の場合、通常であれば、テキストデータ101には何も記録されないので、そのままでは、テキストデータ101に記録される内容が「・・・という人間中で一番悪な種族で・・・」となってしまい、表示した場合に意味がわからなくなってしまう。そこで、外字タグ506を<gaiji2 set=“○○○外字” code=“0x1234” img=“dou1.jpg” vimg=“dou2.jpg”>どう</gaiji2>と変換する。ここで、本実施の形態では、<gaiji2>は、外字用のタグであり、文字フォント名を指定するset属性と、そのset属性で指定した文字フォント内での位置を指定するcode属性と、横書き表示用の代替画像を指定するimg属性と、横書き表示用の代替画像を指定するvimg属性という複数種類の属性を有して、代替文字列を子供要素に指定するタグを意味する。
【0077】
このようにして図5の外字タグ506を<gaiji2>タグを使用した要素に変換することにより、テキストデータ101には、子供要素である「どう」が記録されて、他の属性値はタグ詳細データ103に記録される。タグ詳細データ103に記録される内容に関しては後述する。これによって、テキストデータ101に記録される内容は「・・・という人間中で一番どう悪な種族で・・・」となり、意味がわかる文章になる。
【0078】
外字タグ以外にも、通常、テキストデータ101には何も記録されないものでも、その属性値を子供要素に変換し、テキストデータ101に記録した方がテキストデータ101の内容を理解しやすくなる場合は同様の処理を行ってもよい。
【0079】
図6(B)には、図5のXHTML文書の電子データ100から作成したテキストデータ101の他の例が示される。図6(B)では、改行タグ504があった位置で実際に改行している。このようにすることによって、テキストデータ101の内容を理解しやすくできる。この場合、改行タグ504の情報をタグ出現位置データ102に記録し、テキストデータ101における実際の改行情報はレイアウト計算部107において使用しなくてもよいし、逆に、改行タグ504の情報はタグ出現位置データ102に記録せず、テキストデータ101における実際の改行情報をレイアウト計算部107において使用してもよい。
【0080】
改行タグ以外にも、通常、テキストデータ101において改行しないものでも、改行した方がテキストデータ101の内容を理解しやすくなる場合は改行の処理を行ってもよい。
【0081】
図7には、図5のXHTML文書の電子データ100から作成したタグ出現位置データ102の一例が示される。図7のデータ700〜702は図3のデータ302〜304に対応する。データ702には、図5の電子データ100に含まれるタグ(タグ対)の数を記録する。本来ならば、図5のXHTML文書の電子データ100を構成するタグの数は11個であるが、先に説明したように、ルビ要素を構成する<ruby>タグ、<rb>タグ、<rt>タグの3つを1つのタグに変換して処理しているため7個となり、図7のデータ702には「7」を記録する。データ703〜707は、1つ目のタグである<html>タグ500のタグ位置データ305のデータ306〜310に対応する。データ703にはタグ名である「html」を記録し、データ704には、<html>タグ500のテキストデータ101における出現開始位置を記録し、データ705には、<html>500タグのテキストデータ101における出現終了位置を記録する。次に、データ706には、タグ詳細データ103における<html>タグ500の属性情報の格納開始位置を記録し、データ707には、タグ詳細データ103における<html>タグ500の属性情報の格納終了位置を記録する。以下同様に、データ708〜712には、2つ目のタグである<body>タグ501のタグ出現位置データ305のための情報を記録し、データ713〜717には、3つ目のタグである<img>タグ502のタグ出現位置データ305のための情報を記録し、データ718〜722には、4つ目のタグである<ruby>タグ503のタグ出現位置データ305のための情報を記録し、データ723〜727には、5つ目のタグである<br>タグ504のタグ出現位置データ305のための情報を記録し、データ729〜732には、6つ目のタグである<ruby>タグ505のタグ出現位置データ305のための情報を記録し、データ733〜737には、7つ目のタグである<gaiji>タグ506のタグ出現位置データ305のための情報を記録する。
【0082】
図8には、図5のXHTML文書の電子データ100から作成したタグ詳細データ103の一例が示される。データ402に対応のデータ800には、1つ目のタグである<html>タグ500の属性数「0」のみを記録する。なお、この情報が記録されている領域の開始位置、終了位置情報はタグ出現位置データ102のデータ706とデータ707として記録されている。また、<html>タグ500の属性数は0であるから、タグ詳細データ103に属性数情報のデータ800を記録せずに、タグ出現位置データ102のデータ706とデータ707として、「格納領域なし」と記録してもよい。これによって、タグ詳細データ103のデータ容量を削減することができる。
【0083】
以下同様に、2つ目のタグである<body>タグ501のタグ詳細データ401のためのデータ801〜805を、3つ目のタグである<img/>タグ502のタグ詳細データ401のためのデータ806〜810を、4つ目のタグである<ruby>タグ503のタグ詳細データ401のためのデータ811〜813をそれぞれ記録する。また5つ目のタグである<br/>504のタグ詳細データ401のためのデータ814に記録する。<br/>タグ504も<html>タグ500と同様に属性数は0であるから、タグ詳細データ103に属性数を記録せずに、タグ出現位置データ102の対応のデータ726とデータ727とに、「格納領域なし」と記録してもよい。そして、6つ目のタグである<ruby>タグ505のタグ詳細データ401のためのデータ815〜817を、7つ目のタグである<gaiji>タグ506のタグ詳細データ401のためのデータ818〜826をそれぞれ記録する。
【0084】
(データ処理装置118の処理手順について)
図9と図10を参照して、図1のデータ処理装置が表示装置として動作した場合の処理手順を説明する。図9と図10の手順は制御部110の制御の下に実行される。
【0085】
まず、ステップS901では、ユーザが表示したい電子データ100がユーザ指示としてユーザ指示処理部109を介して入力されて指定される。
【0086】
ステップS902では、入力部104は記録媒体117を検索して、ステップS901で指定された電子データ100について、記録媒体117において電子データ100のみが存在するのか、それとも、対応のテキストデータ101とタグ出現位置データ102とタグ詳細データ103の3つが存在するかを判定する。検索結果、電子データ100のみであれば、制御部110は処理をステップS903に進めるが、対応のテキストデータ101、タグ出現位置データ102およびタグ詳細データ103が存在していれば、処理をステップS904に進める。
【0087】
ステップS903では、指定された電子データ100を記録媒体117から読出して、読出した電子データ100についてテキストデータ101、タグ出現位置データ102およびタグ詳細データ103を作成する。その後、処理をステップS904に進める。ステップS903の詳細は後述する。
【0088】
ステップS904では、指定された電子データ100に対応のタグ出現位置データ102が記録媒体117から検索されて入力部104を介して読出される。
【0089】
ステップS906では、記録媒体117の対応のテキストデータ101から処理対象とされる任意のテキストデータ部分のみを入力部104を介して読出す。具体的にはステップS901にて、ユーザから表示したい電子データ100が指定されるので、その指定内容に基づいて処理対象部分を特定し読込む。例えば、ユーザが指定した電子データ100がはじめて表示処理されるのであれば、そのデータの最初から読込む。もしくは、以前に表示処理したことのあるデータで、そのときの最終表示位置をデータ処理装置118で記録していれば、その位置から読込む。また、データ処理装置118にページジャンプ機能のようなものが予め準備されていれば、ユーザが電子データ100の任意の箇所を表示するように指示すれば、該当する位置からデータを読込むことができる。
【0090】
ステップS907では、S906で特定された処理対象部分に基づき、記録媒体117のタグ詳細データ103から対応の処理対象部分を入力部104を介して読込む。
【0091】
ここで、タグ出現位置データ102が固定長であることを利用して、処理すべきタグの属性情報を効率よく読出すことができる。具体的には、もし、タグの属性を示す情報がタグ出現位置データ102とタグ詳細データ103とに分離されずに、まとめて可変長で記録されている場合には、タグ属性情報の最初から総当りで所望のデータ(処理すべきタグ情報。例えば、ルビ表示機能がないデータ処理装置118であれば、ルビタグ情報は不用となる。)であるかを判定していく必要がある。ところが、本実施の形態ではタグの属性の情報はタグ出現位置データ102とタグ詳細データ103とに分離され、さらにタグ出現位置データ102が固定長であるので、所望のデータがタグ詳細データ103の何バイト目に存在するかがタグ出現位置データ102から容易に特定できて、特定結果に基づきタグ詳細データ103を直接アクセスして読出すことが可能である。
【0092】
ステップS909ではレイアウト計算部107にてレイアウトを計算する。レイアウトの計算は次の手順で行なう。
【0093】
まず、ユーザの指示により決定されたテキストデータ101の表示開始位置情報と、タグ出現位置データ102における各タグのテキストデータ出現開始位置/終了位置のデータとから、表示すべきテキストデータ101の部分に関係するタグを特定する。次に、特定したタグについて、タグ出現位置データ102における該当するタグ詳細データ格納開始位置/終了位置のデータを読出し、読出したデータに基づいてタグ詳細データ103を検索して、対応のタグ詳細データ401を読出す。
【0094】
そして、該当するタグのテキストデータ出現開始位置から終了位置まで、上記手順で得たタグ詳細データ401に基づいて、テキストデータ101を表示開始位置から順次、図示されない所定記憶領域にレイアウトしていく。
【0095】
ステップS910では、ステップS909のレイアウト計算結果である所定記憶領域の内容に基づき、テキストデータ101を表示部108により表示される。
【0096】
ステップS911では、ユーザ指示処理部109を介したユーザからの指示を待つ。ユーザからの指示があるまで、ステップS911で待機する。ユーザから表示処理の終了が指示された場合には、図9の表示処理は終了する。ユーザから、次ページ、あるいは前ページへのスクロール指示があった場合には、処理はステップS906に戻り、以下、スクロール先のテキストデータ101の任意領域の部分データについて同様な処理が行なわれる。
【0097】
図9のステップS903のテキストデータ101、タグ出現位置データ102のタグ詳細データ103の作成処理の手順について図10のフローチャートに従い説明する。図中、[テキスト]はテキストデータ101を、[タグ出現]はタグ出現位置データ102を、[タグ詳細]はタグ詳細データ103をそれぞれ示す。また図中の[タグ情報]とは、電子データ100からテキストデータ101、タグ出現位置データ102およびタグ詳細データ103を作成するために、データ処理装置118内の図示されない記憶領域に一時的に記憶しておく情報を指し、タグ名と、そのタグのタグ出現位置データ102におけるテキストデータ出現終了位置を示すデータ308の記録位置を示す情報である。
【0098】
まず、ステップS921では、入力部104を介して記録媒体117から指定された電子データ100を読出し、処理をステップS922に進める。
【0099】
ステップS922以降の処理においては、データ構造解析部105にて、読出した電子データ100を解析すると、テキストデータ作成部111、タグ出現位置データ作成部112およびタグ詳細データ作成部113はテキストデータ101、タグ出現位置データ102およびタグ詳細データ103をそれぞれ作成し、作成したこれらデータを記録媒体117の指定の電子データ100と対応付けて書込み記録する。
【0100】
ステップS922では、各データ作成に必要な[タグ情報]の領域を初期化し、処理をステップS923に進める。
【0101】
ステップS923では、タグ出現位置データ102に、テキストデータファイル名、タグ詳細データファイル名、タグ数を示すデータ302〜304を記録し、処理をステップS924に進める。タグ数のデータ304としては、この場合には初期化としての0を記録する。
【0102】
ステップS924以降の処理では、ステップS921にて読込んだ電子データ100を先頭から要素単位で順に処理していく。
【0103】
ステップS924では、文字列またはタグなどの要素の有無を判定する。要素がなければ、電子データ100の最後の要素まで処理したことになり、データ作成処理を終了する。要素があれば、処理をステップS925に進める。
【0104】
ステップS925では、要素の種類を判定する。要素が開始タグまたは空タグであれば、処理をステップS926に進めるが、要素が終了タグであれば処理をステップS930に進める。要素が文字列であれば処理をステップS933に進める。
【0105】
ステップS926では、タグ出現位置データ102に該要素であるタグについてタグ位置データ305を記録する。
【0106】
まず、該要素はタグなのでデータ304が示すタグ数を1つ増やす。次に、該タグについて開始タグ/空タグを解析し、タグ名を取得して、取得したタグ名を該タグのためのタグ位置データ305のデータ306として記録する。そして、現時点でのテキストデータ101の書込み最終位置を、テキストデータ出現開始位置としたデータ307を記録する。もし、要素が空タグであれば、同じ値をテキストデータ出現終了位置としたデータ308を記録する。さらに、現時点でのタグ詳細データ103の書込み最終位置を、タグ詳細データ格納開始位置としたデータ309を記録し、処理をステップS927に進める。
【0107】
ステップS927では、一時的に記憶しておくべき[タグ情報]に、取得したタグ名と、タグ出現位置データ102における該当タグの「テキストデータ出現終了位置」のデータ308の格納位置を追加し、処理をステップS928に進める。
【0108】
ステップS928では、開始タグ/空タグを解析し、属性数、属性名および属性値を取得し、タグ詳細データ103に該タグのタグ詳細データ401のデータ402およびデータ403として記録し、処理をステップS929に進める。
【0109】
ステップS929では、タグ出現位置データ102に、現時点でのタグ詳細データ103の書込み最終位置を、タグ詳細データ格納終了位置のデータ310として記録する。これで、この要素に対する処理は終わり、処理をステップS924に戻し、次の要素に対する処理を行う。
【0110】
ステップS930では、終了タグを解析し、一時的に記憶している[タグ情報]からそのタグ名と「テキストデータ出現終了位置」の格納位置の情報を得て、処理をステップS931に進める。
【0111】
ステップS931では、ステップS930で得た情報が示す格納位置に、現時点でのテキストデータ101の書込み最終位置を、テキストデータ出現終了位置としたデータ308をタグ出現位置データ102の対応のタグ位置データ305に記録し、処理をステップS932に進める。
【0112】
ステップS932では、一時的に記憶している[タグ情報]から、該当タグの情報を削除する。これで、この要素に対する処理は終わり、処理をステップS924に戻して、次の要素に対する処理を行う。
【0113】
ステップS933では、要素の文字列をテキストデータ101に記録する。これで、この要素に対する処理は終わり、処理をステップS924に戻して、次の要素に対する処理を行う。
【0114】
ここまでの処理を電子データ100中の全ての要素について行うと、該電子データ100のテキストデータ101、タグ出現位置データ102およびタグ詳細データ103の作成が完了するので、ステップS934において、作成されたこれらデータを該電子データ100と対応付けて記録媒体117に格納して、一連の処理を終了する。
【0115】
なお、この実施の形態では、電子データ100がXHTML文書である場合を例に挙げて説明を行ったが、XHTML文書に限定されない。例えば、XML(extensible markup language)などにより記録された階層構造を有する電子データ100であっても、同様の処理を行うことができる。
【0116】
(まとめ)
このように、メモリ容量に応じて構成された固定長のタグ出現位置データ102を用いて処理することによって、テキストデータ101、タグ詳細データ103の一部のみのデータを効率よく読込むことができるため、高速かつ少ない容量のメモリで処理ができる。本実施の形態では、準備可能なメモリ容量が少ないときに、特に大きな効果を発揮する。具体的には、タグ情報データがタグ出現位置データ102とタグ詳細データ103とに分離されずに可変長であった場合、タグ情報データ量がメモリ容量をオーバーする惧れがある。本実施の形態では、タグ出現位置データ102を固定長データのみから構成することによって、記録媒体117の記録可能容量などからタグ情報を記録可能な最大サイズを見積もり、この記録可能容量をオーバーしないタグ出現位置データ102の構造を予め作成しておくことができる。
【0117】
また、本実施の形態によれば、階層構造を持つ電子データ100からテキストデータ101、タグ出現位置データ102、タグ詳細データ103とを作成して、それらを組合わせて処理することにより、処理時間を短縮することができ、メモリ使用量も削減できる。
【0118】
(データの変形例)
上述の実施の形態では、タグ出現位置データ102において、タグ名ぼデータ306として、タグ名そのものを記録するようにしていたが、これに代わって、タグ名を一意に識別することができる識別番号を記録するようにしてもよい。この場合、タグ名と識別番号の対応関係を記録したタグ識別情報データが必要となる。
【0119】
同様に、タグ詳細データ103において、属性名のデータANとして、属性名そのものを記録するようにしていたが、これに代わって、属性名を一意に識別することができる識別番号を記録するようにしてもよい。この場合、属性名と識別番号の対応関係を記録した属性識別情報データが必要になる。
【0120】
また、本実施の形態では、所望された電子データ100の全体についてテキストデータ101、タグ出現位置データ102およびタグ詳細データ103を作成していたが、作成の対象は電子データ100の全体に限定されない。つまり電子データ100のユーザが所望する任意領域の部分データについてテキストデータ101、タグ出現位置データ102およびタグ詳細データ103を作成するようにしてもよい。
【0121】
(他の実施の形態)
上述の実施の形態で示したデータ処理の方法は、これらの方法をコンピュータにより実行することにより実現される。このようなコンピュータの構成例が図11に示される。
【0122】
図11を参照してコンピュータは、表示部108に対応のCRT(陰極線管)、液晶などからなるモニタ143、ユーザ指示処理部109に対応のキーボード150、マウス160およびペンタブレット170、制御部に対応の該コンピュータ自体を集中的に制御するためのCPU(中央処理装置の略)122、記録媒体117に対応しうるROMまたはRAM(ランダムアクセスメモリの略)を含んで構成されるメモリ124、記録媒体117に対応しうる固定ディスク126、FD132が着脱自在に装着されて、装着されたFD132をアクセスするFD駆動装置130、CD−ROM142が着脱自在に装着されて、装着されたCD−ROM142をアクセスするCD−ROM駆動装置140、インターネットなどの通信ネットワーク182と、該コンピュータとを通信接続するための通信インターフェィス180を含む。これらの各部はバスを介して通信接続される。FD132、CD−ROM142は記録媒体117に対応しうる。通信ネットワーク182はネットワーク115に対応する。
【0123】
コンピュータには、カセット形式の磁気テープが着脱自在に装着されて磁気テープをアクセスする磁気テープ装置が設けられても良い。
【0124】
このようなコンピュータに上述のデータ処理方法を実行させるためのプログラムは、コンピュータで読取可能な記録媒体に格納される。本実施の形態では、この記録媒体として、図11に示されているコンピュータで処理が行なわれるために必要なメモリ、たとえばメモリ124のようなそのものがプログラムメディアであってもよいし、また外部記憶装置として図示のない磁気テープ装置およびCD−ROM駆動装置140などのプログラム読取装置が設けられ、そこに記憶媒体である磁気テープまたはCD−ROM142が装着されることで読取可能なプログラムメディアであってもよい。いずれの場合においても、格納されているプログラムはCPU122がアクセスして実行させる構成であってもよいし、あるいはいずれの場合もプログラムが一旦読出されて、読出されたプログラムは、図11のコンピュータの所定のプログラム記憶エリア、たとえばメモリ124のRAMの所定エリアにロードされて、CPU122により読出されて実行される方式であってもよい。このロード用のプログラムは、予め当該コンピュータに格納されているものとする。
【0125】
ここで、上述したプログラムメディアはコンピュータ本体と分離可能に構成される記録媒体であり、固定的なプログラムを担持する媒体であってもよい。たとえば、磁気テープやカセットテープなどのテープ系、FD132や固定ディスク126などの磁気ディスクやCD−ROM142/MO(Magnetic Optical Disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)などの光ディスクのディスク系、ICカード(メモリカードを含む)/光カードなどのカード系、あるいはマスクROM、EPROM(Erasable and Programmable ROM)、EEPROM(Electrically EPROM)、フラッシュROMなどによる半導体メモリなどである。
【0126】
また、流動的にプログラムを担持する媒体であってもよい。つまり、図11のコンピュータはインターネットを含む通信ネットワーク182と通信インターフェィス180を介して接続可能な構成が採用されているから、通信ネットワーク182からプログラムがダウンロードされるようなき禄媒体であってもよい。プログラムがダウンロードされる場合には、ダウンロード用プログラムは予め当該コンピュータ本体に格納しておくか、あるいは別の記録媒体から予め当該コンピュータ本体にインストールされるものであってもよい。
【0127】
なお記録媒体に格納されている内容としてはプログラムに限定されず、データであってもよい。
【0128】
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
【0129】
【発明の効果】
本発明では、電子データを、そのテキスト情報とタグ出現位置情報とタグ詳細情報という個別に準備された情報を用いてデータ処理するので、処理対象のデータがタグ部分であるかテキスト部分であるかの判定に関する処理を省略できて、またそれに要するメモリも削減できて、処理の高速化と消費メモリ容量の削減とが可能になる。
【図面の簡単な説明】
【図1】 本実施の形態に係るデータ処理装置のブロック図である。
【図2】 本実施の形態に係るデータ処理装置の一例である、携帯型機器で構成された表示装置を示す図である。
【図3】 本実施の形態に係るタグ出現位置データのデータ構造の一例を示す図である。
【図4】 本実施の形態に係るタグ詳細データのデータ構造の一例を示す図である。
【図5】 本実施の形態に係るXHTML文書の一例を示す図である。
【図6】 図5のXHTML文書から作成したテキストデータの一例を示す図である。
【図7】 図5のXHTML文書から作成したタグ出現位置データの一例を示す図である。
【図8】 図5のXHTML文書から作成したタグ詳細データの一例を示す図である。
【図9】 本実施の形態に係るデータ処理装置のフローチャートである。
【図10】 本実施の形態に係るデータ処理装置のフローチャートである。
【図11】 本実施の形態に係るデータ処理方法を実行するためのコンピュータの構成図である。
【図12】 階層構造を有する電子データの一例を示す図である。
【図13】 階層構造を有する電子データから取得した木構造を説明するための図である。
【符号の説明】
100 電子データ、101 テキストデータ、102 タグ出現位置データ、103 タグ詳細データ、104 入力部、105 データ構造解析部、107 レイアウト計算部、108 表示部、109 ユーザ指示処理部、110 制御部、111 テキストデータ作成部、112 タグ出現位置データ作成部、113 タグ詳細データ作成部、117 記録媒体、118 データ処理装置。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data processing device, a data processing method, a data processing program, and a recording medium, and in particular, processes electronic data having a hierarchical structure by combining text data, tag appearance position data, and tag detailed data. The present invention relates to a data processing apparatus, a data processing method, a data processing program, and a recording medium.
[0002]
[Prior art]
Structured electronic data for executing predetermined processing according to the definition of the document description language, and as a data format for recording a structured document having a hierarchical structure, SGML (Standard Generalized Mark-up Language) or XML (eXtensible Mark-up Language) is known. In particular, XML has been actively used in recent years for electronic documents and electronic data exchanged over the Internet (see pages 14-15 of Non-Patent Document 1).
[0003]
As processing methods for handling electronic data in XML format, there are a DOM (Document Object Model) format and a SAX (Simple API for XML) format.
[0004]
The DOM format is a processing method that reads all target electronic data, grasps the hierarchical structure of all elements in the electronic data, and then accesses each element of the electronic data. For example, when there is electronic data having a hierarchical structure as shown in FIG. 12, the entire electronic data is once read and the hierarchical structure of all elements is analyzed. FIG. 12 shows only the hierarchical structure of electronic data, and the text and contents are omitted. Then, after creating a tree structure as shown in FIG. 13 from the electronic data having the hierarchical structure shown in FIG. 12, each element (TITLE, AUTHOR, etc.) is accessed. Therefore, since processing is performed after grasping the hierarchical structure of electronic data, there is a feature that an arbitrary element can be easily accessed.
[0005]
On the other hand, in the SAX format, the electronic data is sequentially read from the top, and only the read elements are subjected to structural analysis and processed. Therefore, the processing can be sequentially performed without waiting for the analysis processing of the entire electronic data, and there is an advantage that there is little overhead in terms of processing speed and memory capacity.
[0006]
[Non-Patent Document 1]
Programming technical information magazine C MAGAZINE FEB. 2000 2 “Special Feature 1 Practical Usage by XML C / C ++”, Publisher: Softbank Publishing Co., Ltd.
[0007]
[Problems to be solved by the invention]
As described above, both the DOM format and the SAX format have their merits, but on the other hand, there are the following demerits.
[0008]
In the case of the DOM format, even if only part of the data in the electronic data is to be processed, the entire electronic data must be analyzed in order to generate a tree structure, resulting in wasteful processing. . In addition, when the size of the electronic data is increased, there is a disadvantage that the processing time for creating the tree structure and the memory usage for storing the tree structure increase.
[0009]
On the other hand, in the case of the SAX format, since the access format is based on the premise that the electronic data is processed in order from the top, even if the contents of the electronic data are not processed in order from the top and arbitrary elements are handled in any order, The data is always read from the beginning, and the structure analysis process is entered. Further, even when it is desired to process the latter half of the electronic data, the processing time is wasted because the electronic data is read from the beginning and requires structural analysis.
[0010]
To enable high-speed processing of electronic data with a hierarchical structure, the electronic data is text data that records only the content to be displayed, excluding tag information, and tag information that is required when processing the text data. (For example, tag name, attribute name, attribute value, and information such as the appearance position of the tag in the text data) is converted into recorded tag data and processed in combination to reduce processing time. A way to do this is considered.
[0011]
However, since the tag information recorded in the tag data varies in size depending on the type of tag and the type and number of attributes, the tag data secures a variable length region or a sufficiently large fixed length region. There is a need. Therefore, by converting the electronic data into text data and tag data, there is no processing to determine whether it is a tag portion or a text portion. Since it has to be read from the beginning of the file and structural analysis must be performed, sufficient effects cannot be obtained.
[0012]
Therefore, an object of the present invention is to provide a data processing apparatus, a data processing method, a data processing program, and a recording medium for facilitating handling of electronic data having a hierarchical structure.
[0013]
[Means for Solving the Problems]
According to one aspect of the present invention, a data processing device that processes text data and electronic data that is hierarchically structured using the tags, including text data and text data, text information in which the text data is recorded, Detailed tag information in which attribute data indicating the attribute of the tag is recorded corresponding to each of the plurality of tags, and appearance of the tag in which appearance position data indicating the appearance position in the text data of the tag is recorded for each of the plurality of tags Input means for inputting position information, text reading means for reading text data corresponding to an arbitrary area to be processed of electronic data from text information input by the input means, and appearance of a tag input by the input means Based on the location information, identify the tags that appear in the text data corresponding to the arbitrary area and enter them. Attribute reading means for reading the attribute data of the identified tag from the detailed tag information input by the means, and processing the text data read by the text reading means based on the attribute data read by the attribute reading means Data processing means.
[0014]
In the above-described data processing apparatus, electronic data is processed using individually prepared information such as text information, tag appearance position information, and tag detailed information, so whether the data to be processed is a tag part or a text part. The processing relating to the determination of whether or not can be omitted, and the processing can be executed at high speed.
[0015]
Since the tag appearance position information is prepared separately from the electronic data, it is not necessary to individually analyze the tree structure (hierarchical structure) related to the tags of the electronic data in order to identify the tag appearance position. The creation process can be omitted, and the memory capacity for constructing the tree structure can also be omitted. In addition, when processing a tag that appears at an arbitrary location in text data, it is possible to easily identify a tag that appears at the arbitrary location by searching the tag appearance position data. Can be quickly read from the tag detailed information. As a result, the processing of hierarchically structured electronic data can be simplified and speeded up.
[0016]
Preferably, the appearance position data recorded in the tag appearance position information is fixed-length data. Therefore, each appearance position data in the tag appearance position information can be searched based on the fixed length, and the search can be performed efficiently.
[0017]
Preferably, the appearance position data includes effective range data indicating an effective range of the tag in the text data, and recording location data indicating a location where the attribute data of the tag in the tag detailed information is recorded, and the attribute reading unit includes: A tag corresponding to the arbitrary area is specified based on the effective range data, and the attribute data of the tag is read from the tag detailed information based on the recording location data of the specified tag.
[0018]
Therefore, a tag that appears in text data in an arbitrary area can be easily specified based on the effective range data. Further, the recording position in the tag detailed information of the tag attribute data that can be specified can be easily specified and read based on the recording location data.
[0019]
Preferably, the data processing means includes layout calculation means for calculating a layout of the text data read by the text reading means based on the attribute data read by the attribute reading means.
[0020]
Therefore, since the tag attribute data for layout calculation can be easily specified as described above and read out from the tag detailed information, layout calculation can be performed, so the load required for layout calculation can be reduced.
[0021]
Preferably, the layout calculation unit calculates a layout at the time of outputting the text data read by the text reading unit. This output includes a display.
[0022]
Preferably, the valid range data indicates a start location and an end location of data of a portion in which the attribute of the tag in the text data is valid. Therefore, the effective range data can be indicated by the start location and the end location of the data.
[0023]
Preferably, the valid range data indicates the start location of the data of the portion where the attribute of the tag is valid in the text data and the size of the partial data. Therefore, the valid range data can be specified by the data start location and the size (size) of the data.
[0024]
Preferably, the recording location data indicates a recording start location and an end location of the tag attribute data in the tag detailed information. Therefore, the recording location data can be indicated by the recording start location and end location of the corresponding attribute data.
[0025]
Preferably, the recording location data indicates the recording start location of the attribute data of the tag in the tag detailed information and the size of the attribute data. Therefore, the recording location data can be specified by the recording start location of the attribute data and the size (size) of the data.
[0026]
Preferably, text information creating means for retrieving electronic data and extracting and recording text data to create text information, and attribute data corresponding to the tag each time a tag is retrieved by retrieving electronic data Tag detail information creating means for creating a tag detailed information and a tag for recording the appearance position data corresponding to the tag and creating the tag appearance position information each time the tag is searched by searching the electronic data It further includes at least one of appearance position information creation means.
[0027]
Therefore, in the data processing device, text information, detailed tag information, and tag appearance position information can be created for electronic data.
[0028]
Preferably, the text information creation means searches for an arbitrary area of the electronic data, extracts and records the text data and creates text information, and the tag detailed information creation means searches for the arbitrary area of the electronic data and creates a tag. Each time a search is made, attribute data is recorded corresponding to the tag to create detailed tag information, and the tag position information creation means searches the arbitrary area of the electronic data and searches for the tag each time the tag is searched. Appearance position data is recorded corresponding to, and tag appearance position information is created.
[0029]
Accordingly, text information, tag detailed information, and tag appearance position information can be created for data in an arbitrary area rather than the entire electronic data.
[0030]
Preferably, the data processing device further includes means for determining whether or not text information for electronic data, tag appearance position information, and tag detailed information can be input by the input means.
[0031]
Therefore, it can be determined prior to data processing whether these data can be input by the input means. The creation of these data may be performed when the result of the determination indicates that input is not possible.
[0032]
According to another aspect of the present invention, there is provided a data processing method for processing electronic data including text data and a plurality of tags appearing in the text data and having a hierarchical structure using the tags. And tag detail information in which attribute data indicating the attribute of the tag is recorded corresponding to each of the plurality of tags, and appearance position data indicating the appearance position in the text data of the tag for each of the plurality of tags An input step for inputting appearance position information, a text reading step for reading text data corresponding to an arbitrary area to be processed of electronic data from the text information input by the input step, and a tag input by the input step Appears in text data corresponding to an arbitrary area based on appearance position information An attribute reading step for reading out the attribute data of the specified tag from the detailed tag information input in the input step, and an attribute reading out of the text data read out in the text reading step. A data processing step for processing based on the attribute data read in the step.
[0033]
Preferably, the data processing method described above is executed in a computer, an input step is executed via an input unit associated with the computer, and a text reading step, an attribute reading step and data are performed via an information processing unit associated with the computer. Processing steps are executed.
[0034]
A data processing program according to still another aspect of the present invention is a program for causing a computer to execute the above-described data processing method.
[0035]
A recording medium according to still another aspect of the present invention is a computer-readable recording medium that records the above-described data processing program.
[0036]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0037]
In this embodiment, in order to be able to process electronic document data having a hierarchical structure at high speed, text data created from electronic document data and recording only the contents to be displayed, and the text data are processed. To obtain the fixed-length tag appearance position data that records the tag information and the appearance position information in the text data and the variable-length tag detailed data that records information such as the attribute of the tag. Processing in combination reduces processing time and memory usage.
[0038]
(Explanation of terms)
First, terms related to tags used in a text file written in a markup language such as HTML, XML, and SGML will be described. Here, the tag is a special character or symbol string for specifying a character string output mode (indentation, display color, etc.), and is a reserved word.
[0039]
When analyzing tag information described in a text file, a child that is a partial data sandwiched between a start tag, an end tag paired with the start tag (herein referred to as a tag pair), and a start tag and an end tag It is necessary to divide it into elements and analyze the start tag into a tag name, attribute name, and attribute value.
[0040]
The start tag is a part of a character string that starts with “<” and ends with “>”. The end tag is a part of a character string that starts with “</” and ends with “>”. If there is no child element in the part between the start tag and end tag, the start tag and end tag can be combined and written as a character string starting with "<" and ending with "/>" . This is called an empty tag. An empty tag can be considered equivalent to a start tag and an end tag being arranged.
[0041]
If it is not an empty tag, the child element contains a string or other tag pair that makes up the text file. If the child element includes one or more tag pairs indicating the same type of attribute as the start tag of the tag pair sandwiching the child element, the tag pair sandwiching the child element (this is referred to as an external tag pair) A tag pair included in the child element (this is called an internal tag pair) forms a nested relationship in which a plurality of tag pairs have a hierarchical structure. The attribute value of the tag pair is reflected.
[0042]
The tag name is indicated by a character string following the “<” of the start tag or empty tag. When a character string including “=” follows the tag name, the left side of “=” is an attribute name, and the character string enclosed by “” on the right side is an attribute value. For example, when there is XML data “<ab =“ c ”> d </a>”, “<ab =“ c ”>” is a start tag, “d” is a child element, “</ a” > ”Is an end tag. Among the start tags, “a” is a tag name, “b” is an attribute name, and “c” is an attribute value. The attribute name refers to a unique characteristic such as an indentation or display color for an output attribute related to the child element of the start tag. Indicates. In the case of an empty tag when the child element is empty, the format is “<ab =“ c ”/>”. In the following description, when the tag name is “a”, the tag name is “a tag”, and when the attribute name is “b”, the attribute name is “b attribute”. The value is referred to as “b attribute value”.
[0043]
(Configuration of data processing device)
FIG. 1 is a diagram showing a configuration of a data processing apparatus according to the present invention in association with peripheral devices. In the vicinity of the data processing device 118, a server 114 that receives a request from a user and transmits electronic data recorded in a database (not shown), and a personal computer (abbreviation of personal computer) 116 for the user to receive the electronic data. A network 115 for connecting the server 114 and the personal computer 116 and a recording medium 117 for taking out electronic data from the personal computer 116 and supplying the electronic data to the data processing device 118 are provided. The data processing device 118 processes the electronic data supplied from the recording medium 117 and performs data processing according to the purpose, for example, data processing for display. Here, description is made assuming that electronic data is displayed, but other output forms, for example, electronic data may be printed.
[0044]
The personal computer 116 may be replaced with an electronic data receiving device installed in a convenience store, a station, or the like, and electronic data may be read from the electronic data receiving device and recorded on the recording medium 117. In this case, it is possible to charge for reading electronic data from the electronic data receiving device and recording it on the recording medium 117.
[0045]
Further, the electronic data transmitted from the server 114 may be received by the data processing device 118 and recorded in the recording medium 117 without using the personal computer 116.
[0046]
In the recording medium 117, electronic data 100, text data 101 created from the electronic data 100, tag appearance position data 102, and tag detailed data 103 are stored in association with each other by a device such as a personal computer 116. . Here, in order to simplify the explanation, it is assumed that the recording medium 117 stores only one set of the electronic data 100 and data created therefrom, but a plurality of sets may be stored. .
[0047]
The electronic data 100 is structured electronic data for executing predetermined processing in accordance with the definition of the document description language, and has a data format for recording a structured document having a hierarchical structure using a plurality of tags. It is recorded using SGML or XML.
[0048]
The text data 101 is data indicating only contents to be displayed from the structured electronic data 100. The tag appearance position data 102 is data in which tag name information of each tag and appearance position information in the text data 101 are recorded among the tag information necessary for processing the corresponding text data 101, and fixed length data. Consists of only. The tag detail data 103 is data in which information such as the attribute of each tag is recorded among the tag information required when the corresponding text data 101 is processed.
[0049]
The data transmitted from the server 114 and stored in the recording medium 117 may be only the electronic data 100, or only three data, the text data 101, the tag appearance position data 102, and the tag detailed data 103 created from the electronic data 100. But you can.
[0050]
The data processing device 118 includes an input unit 104, a data structure analysis unit 105, a processing unit 106, a control unit 110, a text data creation unit 111, a tag appearance position data creation unit 112, and a tag detailed data creation unit 113.
[0051]
The input unit 104 reads the electronic data 100, text data 101, tag appearance position data 102, and tag detailed data 103 from the recording medium 117.
[0052]
The data structure analysis unit 105 analyzes the hierarchical structure of the electronic data 100 from the electronic data 100 or from the text data 101, the tag appearance position data 102, and the tag detailed data 103.
[0053]
The text data creation unit 111 creates the text data 101 from the electronic data 100 when the text data 101 does not exist. When the data transmitted from the server 114 is the text data 101, the tag appearance position data 102, and the tag detailed data 103, the text data creation unit 111 may be omitted.
[0054]
The tag appearance position data creation unit 112 creates the tag appearance position data 102 from the electronic data 100 when the tag appearance position data 102 does not exist. When the data transmitted from the server 114 is the text data 101, the tag appearance position data 102, and the tag detailed data 103, the tag appearance position data creation unit 112 may be omitted.
[0055]
The tag detail data creation unit 113 creates the tag detail data 103 from the electronic data 100 when the tag detail data 103 does not exist. When the data transmitted from the server 114 is the text data 101, the tag appearance position data 102, and the tag detailed data 103, the tag detailed data creation unit 113 may be omitted.
[0056]
The control unit 110 controls processing of the input unit 104, data structure analysis unit 105, text data creation unit 111, tag appearance position data creation unit 112, tag detail data creation unit 113, and processing unit 106.
[0057]
The processing unit 106 performs predetermined processing based on the analysis result of the hierarchical structure by the data structure analysis unit 105. Specifically, the configuration of the processing unit 106 varies depending on the content of electronic data to be processed and the processing content. In the case of an apparatus for displaying electronic data such as texts such as novels and papers, the display unit 108 displays based on the display layout calculated by the layout calculation unit 107 that calculates the text display layout. And a user instruction processing unit 109 that processes instructions from the user such as scrolling.
[0058]
When the electronic data is voice data, the processing unit 106 is changed to a voice data reading device, the voice reproduction unit is used as the display unit 108, and the layout calculation unit 107 determines a read portion and a non-read portion. Or a portion to be read with emphasis and a portion to be read are determined, and a portion to adjust the interval of each reading is changed. In the case of audio data, the audio attribute may be changed according to the hierarchical structure. Furthermore, in the case of voice, in order to manage the scenario interpretation unit, the voice output unit, and the playback source, a synchronization unit that synchronizes each element is required.
[0059]
(Example of data processing device implementation)
FIG. 2 shows an example in which the data processing device 118 is realized as a portable display processing device. In FIG. 2, the display unit 108 includes a liquid crystal display or the like. The recording medium 117 is detachably attached to the input unit 104. When the recording medium 117 is attached, the processing target electronic data 100 or text data 101, tag appearance position data 102, and tag details stored in advance in the recording medium 117 are attached. Data 103 is read via the input unit 104. A cross key 119 and a pen 120 are provided in association with the user instruction processing unit 109. The cross key 119 is operated when the user instructs to scroll the displayed document or to select the electronic data 100 of the book or document to be displayed. When the electronic data includes a link function, the pen 120 is used by the user to jump to the link destination, and responds to a confirmation item requested from the control unit 110 of the data processing device 118 to the user. Also used.
[0060]
The supply of all or part of the electronic data 100 or the text data 101, the tag appearance position data 102, and the tag detailed data 103 to the data processing device 118 is not limited to being supplied via the recording medium 117. For example, a predetermined recording area may be provided inside the main body of the data processing apparatus 118, and a part or all of the data as described above may be recorded therein. Alternatively, a part or all of the above data may be recorded in the server 114 on the network 115 or a database (not shown) and processed while being downloaded.
[0061]
(Description of tag appearance position data 102)
FIG. 3 shows an example of the structure of the tag appearance position data 102. The tag appearance position data 102 includes file name information 300 and tag appearance position information 301. The file name information 300 includes data 302 and 303 indicating the file name of the corresponding text data 101 and the file name of the corresponding tag detail data 103.
[0062]
Since the file name information 300 indicates which text data 100 or which tag detailed data 103 the tag appearance position data 102 corresponds to, the tag appearance position data 102 is linked to the corresponding text data 101. In this case, the area of the text data file name data 302 may be omitted. When the tag appearance position data 102 is recorded in connection with the corresponding tag detail data 103, the area of the tag detail data file name data 303 may be omitted.
[0063]
The tag appearance position information 301 includes data 304 indicating the total number of tags included in the corresponding text data 101 and tag position data 305 corresponding to each of all the tags included in the corresponding text data 101. Each of the tag position data 305 includes data 306 indicating the corresponding tag name, data 307 and 308 indicating the appearance start position and end position in the text data 101 of the corresponding tag, and storage start in the tag detail data 103 of the corresponding tag. Data 309 and 310 indicating the position and end position are included. Data 307 and 308 indicate description positions in the text data 101 of the start tag and the end tag. Data 307 to 310 are recorded by the number of bytes from the head of each piece of tag data (text data 101 or detailed tag data 102).
[0064]
Instead of the appearance end position in the tag text data 101, the influence range in the tag text data 101 may be recorded. The influence range indicates the size (range) of the text data of the portion where the tag attribute is valid, and corresponds to the range from the appearance start position to the appearance end position. That is, it means a difference by (appearance end position−appearance start position). Thus, even if the information on the influence range is recorded instead of the information on the appearance position, the data 308 on the appearance end position can be obtained from the value of (appearance start position + influence range).
[0065]
Similarly, the data size in which the data size in the tag detail data 103 may be recorded instead of the storage end position data 310 in the tag detail data 103 is the size from the storage start position to the storage end position. Means. That is, it means a difference of (storage end position−storage start position). Thus, even if data size information is recorded instead of storage location information, the storage end location data 310 can be obtained from the value of (storage start location + data size).
[0066]
Data constituting the tag appearance position data 102 is fixed-length data as shown in FIG. Here, in the present embodiment, the fixed-length data refers to data that does not exceed a predetermined size (for example, 4 bytes) prepared in advance even if the information varies according to the contents of the electronic data 100. Therefore, for example, as shown in FIG. 3, when 4 bytes are assigned as the data 307 indicating the appearance start position in the text data 101 of the tag, any value from 0 to 4294967295 indicating the number of bytes from the beginning of the file Need to be entered. Note that the allocation of size to each area can be determined according to the electronic data 100 to be handled and the processing capability of the data processing device 118.
[0067]
(Description of detailed tag data 103)
FIG. 4 shows an example of the structure of the tag detail data 103. Referring to FIG. 4, tag detailed data 103 includes tag detailed data 401 corresponding to each of all tags recorded in corresponding tag appearance position data 102. The tag detail data 401 includes data 402 indicating the total number of different types of attributes indicated by the corresponding tag, and data AN indicating attribute type names corresponding to all the different types of attributes indicated by the corresponding tags and attribute attributes. The value AV is indicated. The tag detail data 103 is basically composed of variable-length data because the length depends on the contents of each tag, but may be composed of fixed-length data.
[0068]
(Specific examples of data)
Next, a specific example of the electronic data 100 having a hierarchical structure in which the format of each data in the text data 101, the tag appearance position data 102, and each data in the tag detail data 103 is described according to the definition of the document description language. A description will be given using an XHTML document. FIG. 5 shows an example of electronic data 100 that is an XHTML document to be processed.
[0069]
FIG. 6A shows an example of text data 101 created from the electronic data 100 of the XHTML document in FIG. As shown in FIG. 6A, basically, the content to be displayed, that is, only the character string, is recorded in the text data 101 among the child elements sandwiched between the tags. By recording in this way, when the processing capability of the data processing device 118 is low and it is difficult to analyze the tag appearance position data 102 and the tag detailed data 103, when only the text data 101 is processed and displayed, There is an advantage that the user can understand at least the contents of the document described from the display contents. For this reason, even content to be displayed may not be recorded in the text data 101. This is shown as an example of a tag used to set ruby in a character string (hereinafter referred to as ruby tag).
[0070]
In the case of the ruby tag 503 in FIG. 5, normally, it is sandwiched between a child element “female” sandwiched between a start tag <rb> and an end tag </ rb>, and a start tag <rt> and an end tag </ rt>. Although the child element “my yes” is recorded in the text data 101, the display content according to the recorded content of the text data 101 will indicate “my baby yes” and the meaning will not be understood.
[0071]
Therefore, the ruby tag 503 is converted to <ruby2 rt = “my yes”> student </ ruby2>. In the present embodiment, <ruby2> is a ruby tag, has a rt attribute that designates a ruby character string, and means a tag that designates the ruby character string as a child element. By converting the ruby tag 503 into an element using the <ruby2> tag, the child element “Sai” is recorded in the text data 101, and the rt attribute value “Wagai” is recorded in the tag detailed data 103. The contents recorded in the detailed tag data 103 in this case will be described later.
[0072]
Similarly, in the case of the ruby tag 505, <ruby2 rt = “kento”> registration is converted into </ ruby2>, the child element “registration” is recorded in the text data 101, and the rt attribute value “kento” is tag details. Record in data 103.
[0073]
In addition to ruby tags, it is usually easier to understand the contents of text data 101 even if it is a child element to be recorded in text data 101, by converting the child element to the attribute value of the corresponding tag and recording it in tag detail data 103. In such a case, the same processing may be performed.
[0074]
Contrary to the ruby tag described above, even the tag attribute value may be recorded in the text data 101. This will be described using a tag used to set an external character (hereinafter referred to as an external character tag) as an example.
[0075]
In the present embodiment, <gaiji> is a tag for external characters, a set attribute that specifies a character font name, a code attribute that specifies a position in the character font specified by the set attribute, and a horizontal writing display This means a tag having a plurality of different types of attributes such as an img attribute for designating a substitute image, a img attribute for designating a substitute image for horizontal writing, and an alt attribute for designating a substitute character string.
[0076]
In the case of the external character tag 506 in FIG. 5, since nothing is normally recorded in the text data 101, the content recorded in the text data 101 is “... the worst race among human beings”. "...", and the meaning is not understood when displayed. Therefore, the external character tag 506 is converted to <gaiji2 set = “◯◯◯ external character” code = “0x1234” img = “dou1.jpg” vimg = “dou2.jpg”> how </ gaiji2>. Here, in the present embodiment, <gaiji2> is a tag for external characters, a set attribute that specifies a character font name, a code attribute that specifies a position in the character font specified by the set attribute, It means a tag that has a plurality of types of attributes, ie, an img attribute that designates an alternative image for horizontal writing display and a vimg attribute that designates an alternative image for horizontal writing display, and designates an alternative character string as a child element.
[0077]
In this way, by converting the external character tag 506 of FIG. 5 into an element using the <gaiji2> tag, the text data 101 records “how” which is a child element, and other attribute values are tag details. Data 103 is recorded. The contents recorded in the tag detail data 103 will be described later. As a result, the content recorded in the text data 101 is "... the worst race among human beings ...", and the sentence can be understood.
[0078]
In addition to the external character tag, even if nothing is normally recorded in the text data 101, it is easier to understand the contents of the text data 101 if the attribute value is converted into a child element and recorded in the text data 101. Similar processing may be performed.
[0079]
FIG. 6B shows another example of text data 101 created from the electronic data 100 of the XHTML document of FIG. In FIG. 6B, a line feed is actually started at the position where the line feed tag 504 was present. By doing so, the contents of the text data 101 can be easily understood. In this case, the information of the line feed tag 504 is recorded in the tag appearance position data 102, and the actual line feed information in the text data 101 may not be used in the layout calculation unit 107. The actual line feed information in the text data 101 may be used in the layout calculation unit 107 without being recorded in the appearance position data 102.
[0080]
In addition to the line feed tag, even if the text data 101 does not normally have a line break, if the line break makes it easier to understand the contents of the text data 101, a line feed process may be performed.
[0081]
FIG. 7 shows an example of tag appearance position data 102 created from the electronic data 100 of the XHTML document of FIG. Data 700 to 702 in FIG. 7 corresponds to data 302 to 304 in FIG. In the data 702, the number of tags (tag pairs) included in the electronic data 100 of FIG. 5 is recorded. Originally, the number of tags constituting the electronic data 100 of the XHTML document of FIG. 5 is 11, but as described above, the <ruby> tag, <rb> tag, <rt constituting the ruby element > Since three tags are converted into one tag and processed, there are seven, and “7” is recorded in the data 702 of FIG. Data 703 to 707 correspond to the data 306 to 310 of the tag position data 305 of the <html> tag 500 which is the first tag. The tag name “html” is recorded in the data 703, the appearance start position in the text data 101 of the <html> tag 500 is recorded in the data 704, and the text data of the <html> 500 tag is recorded in the data 705. The appearance end position in 101 is recorded. Next, storage location of attribute information of <html> tag 500 in tag detailed data 103 is recorded in data 706, and storage end of attribute information of <html> tag 500 in tag detailed data 103 is recorded in data 707. Record the position. Similarly, the data 708 to 712 record information for the tag appearance position data 305 of the <body> tag 501 which is the second tag, and the data 713 to 717 include the third tag. Information for tag appearance position data 305 of a certain <img> tag 502 is recorded, and information for tag appearance position data 305 of a <ruby> tag 503 that is the fourth tag is recorded in data 718 to 722. The information for the tag appearance position data 305 of the <br> tag 504 which is the fifth tag is recorded in the data 723 to 727, and the sixth tag is recorded in the data 729 to 732 Information for the tag appearance position data 305 of the <ruby> tag 505 is recorded, and in the data 733 to 737, the tag appearance position data 3 of the <gaiji> tag 506, which is the seventh tag, is recorded. The information for the 5 record.
[0082]
FIG. 8 shows an example of the detailed tag data 103 created from the electronic data 100 of the XHTML document shown in FIG. In the data 800 corresponding to the data 402, only the attribute number “0” of the <html> tag 500 which is the first tag is recorded. Note that the start position and end position information of the area in which this information is recorded is recorded as data 706 and data 707 of the tag appearance position data 102. Further, since the number of attributes of the <html> tag 500 is 0, the data 706 and the data 707 of the tag appearance position data 102 are recorded as “no storage area” without recording the attribute number information data 800 in the tag detail data 103. May be recorded. As a result, the data capacity of the tag detail data 103 can be reduced.
[0083]
Similarly, the data 801 to 805 for the tag detailed data 401 of the <body> tag 501 that is the second tag are used for the tag detailed data 401 of the <img /> tag 502 that is the third tag. Data 806 to 810 are recorded as data 811 to 813 for tag detailed data 401 of the <ruby> tag 503, which is the fourth tag. Further, the data is recorded in the data 814 for the tag detailed data 401 of <br/> 504 that is the fifth tag. Since the <br/> tag 504 has the same number of attributes as the <html> tag 500, the corresponding data 726 and data 727 of the tag appearance position data 102 are recorded without recording the number of attributes in the tag detail data 103. In addition, “no storage area” may be recorded. Then, the data 815 to 817 for the tag detailed data 401 of the <ruby> tag 505 that is the sixth tag is replaced with the data 818 for the tag detailed data 401 of the <gaiji> tag 506 that is the seventh tag. ˜826 are recorded respectively.
[0084]
(Regarding the processing procedure of the data processing device 118)
With reference to FIG. 9 and FIG. 10, a processing procedure when the data processing device of FIG. 1 operates as a display device will be described. The procedures of FIGS. 9 and 10 are executed under the control of the control unit 110.
[0085]
First, in step S901, the electronic data 100 that the user wants to display is input and specified via the user instruction processing unit 109 as a user instruction.
[0086]
In step S902, the input unit 104 searches the recording medium 117, and for the electronic data 100 specified in step S901, whether only the electronic data 100 exists in the recording medium 117 or the corresponding text data 101 and the appearance of the tag. It is determined whether three pieces of position data 102 and detailed tag data 103 exist. If only the electronic data 100 is found as a result of the search, the control unit 110 advances the process to step S903. If the corresponding text data 101, tag appearance position data 102, and tag detail data 103 exist, the process proceeds to step S904. Proceed to
[0087]
In step S903, the designated electronic data 100 is read from the recording medium 117, and text data 101, tag appearance position data 102, and tag detailed data 103 are created for the read electronic data 100. Thereafter, the process proceeds to step S904. Details of step S903 will be described later.
[0088]
In step S904, tag appearance position data 102 corresponding to the designated electronic data 100 is retrieved from the recording medium 117 and read out via the input unit 104.
[0089]
In step S <b> 906, only an arbitrary text data part to be processed is read from the corresponding text data 101 of the recording medium 117 via the input unit 104. Specifically, in step S901, since the electronic data 100 to be displayed is designated by the user, the processing target portion is specified and read based on the designated content. For example, if the electronic data 100 designated by the user is displayed for the first time, the data is read from the beginning. Alternatively, if the data has been subjected to display processing before and the final display position at that time is recorded by the data processing device 118, the data is read from that position. If the data processing device 118 is prepared in advance with a page jump function, if the user instructs to display an arbitrary part of the electronic data 100, the data can be read from the corresponding position. it can.
[0090]
In step S907, the corresponding processing target part is read from the tag detailed data 103 of the recording medium 117 via the input unit 104 based on the processing target part specified in S906.
[0091]
Here, using the fact that the tag appearance position data 102 has a fixed length, the attribute information of the tag to be processed can be efficiently read. Specifically, if the information indicating the tag attribute is not separated into the tag appearance position data 102 and the tag detail data 103 but is recorded in a variable length all together, the tag attribute information starts from the beginning. It is necessary to determine whether the data is brute force data (tag information to be processed. For example, if the data processing device 118 has no ruby display function, the ruby tag information is unnecessary). However, in the present embodiment, the tag attribute information is separated into the tag appearance position data 102 and the tag detail data 103, and the tag appearance position data 102 has a fixed length. The number of bytes can be easily identified from the tag appearance position data 102, and the tag detailed data 103 can be directly accessed and read based on the identification result.
[0092]
In step S909, the layout calculation unit 107 calculates the layout. The layout is calculated as follows.
[0093]
First, from the display start position information of the text data 101 determined by the user's instruction and the text data appearance start position / end position data of each tag in the tag appearance position data 102, the text data 101 to be displayed is displayed. Identify related tags. Next, for the specified tag, the corresponding tag detailed data storage start position / end position data in the tag appearance position data 102 is read, the tag detailed data 103 is searched based on the read data, and the corresponding tag detailed data 401 is read.
[0094]
Then, from the text data appearance start position to the end position of the corresponding tag, the text data 101 is sequentially laid out in a predetermined storage area (not shown) from the display start position based on the tag detailed data 401 obtained by the above procedure.
[0095]
In step S910, the text data 101 is displayed on the display unit 108 based on the contents of the predetermined storage area that is the layout calculation result in step S909.
[0096]
In step S911, an instruction from the user via the user instruction processing unit 109 is awaited. It waits at step S911 until there is an instruction from the user. When the user instructs the end of the display process, the display process of FIG. 9 ends. If the user gives an instruction to scroll to the next page or the previous page, the process returns to step S906, and the same process is performed on the partial data in the arbitrary area of the text data 101 that is the scroll destination.
[0097]
A procedure for creating the text data 101 in step S903 in FIG. 9 and the tag detail data 103 in the tag appearance position data 102 will be described with reference to the flowchart in FIG. In the figure, [Text] indicates text data 101, [Tag Appearance] indicates tag appearance position data 102, and [Tag Details] indicates tag detail data 103. [Tag information] in the figure is temporarily stored in a storage area (not shown) in the data processor 118 in order to create text data 101, tag appearance position data 102, and tag detailed data 103 from the electronic data 100. Information indicating the tag name and the recording position of data 308 indicating the text data appearance end position in the tag appearance position data 102 of the tag.
[0098]
First, in step S921, the designated electronic data 100 is read from the recording medium 117 via the input unit 104, and the process proceeds to step S922.
[0099]
In the processing after step S922, when the read electronic data 100 is analyzed by the data structure analysis unit 105, the text data creation unit 111, the tag appearance position data creation unit 112, and the tag detailed data creation unit 113 are the text data 101, The tag appearance position data 102 and the tag detailed data 103 are created, and the created data are written and recorded in association with the designated electronic data 100 of the recording medium 117.
[0100]
In step S922, the [tag information] area necessary for creating each data is initialized, and the process proceeds to step S923.
[0101]
In step S923, text data file name, tag detailed data file name, and data 302 to 304 indicating the number of tags are recorded in the tag appearance position data 102, and the process proceeds to step S924. In this case, 0 is recorded as the tag number data 304 as initialization.
[0102]
In the processing after step S924, the electronic data 100 read in step S921 is sequentially processed in element units from the top.
[0103]
In step S924, the presence / absence of an element such as a character string or a tag is determined. If there is no element, it means that the last element of the electronic data 100 has been processed, and the data creation process is terminated. If there is an element, the process proceeds to step S925.
[0104]
In step S925, the type of element is determined. If the element is a start tag or an empty tag, the process proceeds to step S926. If the element is an end tag, the process proceeds to step S930. If the element is a character string, the process proceeds to step S933.
[0105]
In step S926, tag position data 305 is recorded for the tag as the element in the tag appearance position data 102.
[0106]
First, since the element is a tag, the number of tags indicated by the data 304 is increased by one. Next, the start tag / empty tag is analyzed for the tag, the tag name is acquired, and the acquired tag name is recorded as the data 306 of the tag position data 305 for the tag. Then, data 307 is recorded in which the current writing final position of the text data 101 is the text data appearance start position. If the element is an empty tag, data 308 with the same value as the text data appearance end position is recorded. Further, the data 309 having the tag final data storage start position as the tag final data storage start position is recorded, and the process proceeds to step S927.
[0107]
In step S927, the acquired tag name and the storage position of the data 308 of “text data appearance end position” of the corresponding tag in the tag appearance position data 102 are added to [tag information] that should be temporarily stored. The process proceeds to step S928.
[0108]
In step S928, the start tag / empty tag is analyzed, the number of attributes, the attribute name, and the attribute value are acquired, recorded in the tag detailed data 103 as the data 402 and data 403 of the tag detailed data 401, and the processing is performed. Proceed to S929.
[0109]
In step S 929, the final writing position of the tag detail data 103 at the present time is recorded as the tag detail data storage end position data 310 in the tag appearance position data 102. This completes the process for this element, returns the process to step S924, and performs the process for the next element.
[0110]
In step S930, the end tag is analyzed, information on the storage location of the tag name and “text data appearance end position” is obtained from [tag information] temporarily stored, and the process proceeds to step S931.
[0111]
In step S931, the tag position data 305 corresponding to the tag appearance position data 102 is the data 308 in which the text data appearance end position is the current writing final position of the text data 101 at the storage position indicated by the information obtained in step S930. And the process proceeds to step S932.
[0112]
In step S932, the tag information is deleted from [tag information] temporarily stored. This completes the process for this element, returns the process to step S924, and performs the process for the next element.
[0113]
In step S933, the character string of the element is recorded in the text data 101. This completes the process for this element, returns the process to step S924, and performs the process for the next element.
[0114]
When the processing up to this point is performed for all elements in the electronic data 100, the creation of the text data 101, the tag appearance position data 102, and the tag detailed data 103 of the electronic data 100 is completed. These data are stored in the recording medium 117 in association with the electronic data 100, and the series of processes is completed.
[0115]
In this embodiment, the case where the electronic data 100 is an XHTML document has been described as an example. However, the present invention is not limited to an XHTML document. For example, the same processing can be performed even for electronic data 100 having a hierarchical structure recorded by XML (extensible markup language) or the like.
[0116]
(Summary)
As described above, by processing using the fixed-length tag appearance position data 102 configured according to the memory capacity, it is possible to efficiently read only a part of the text data 101 and the tag detailed data 103. Therefore, processing can be performed with a high-speed and small-capacity memory. In this embodiment, a particularly large effect is exhibited when the memory capacity that can be prepared is small. Specifically, if the tag information data has a variable length without being separated into the tag appearance position data 102 and the tag detail data 103, the tag information data amount may exceed the memory capacity. In the present embodiment, the tag appearance position data 102 is composed only of fixed-length data, so that the maximum size capable of recording tag information is estimated from the recordable capacity of the recording medium 117 and the like so that the recordable capacity is not exceeded. The structure of the appearance position data 102 can be created in advance.
[0117]
Further, according to the present embodiment, text data 101, tag appearance position data 102, and tag detailed data 103 are created from electronic data 100 having a hierarchical structure, and the combined processing is performed, thereby processing time. And the memory usage can be reduced.
[0118]
(Data modification)
In the above-described embodiment, the tag name itself is recorded as the tag name data 306 in the tag appearance position data 102, but instead of this, an identification number that can uniquely identify the tag name May be recorded. In this case, tag identification information data in which the correspondence between the tag name and the identification number is recorded is required.
[0119]
Similarly, in the tag detail data 103, the attribute name itself is recorded as the attribute name data AN. Instead, an identification number for uniquely identifying the attribute name is recorded. May be. In this case, attribute identification information data in which the correspondence between attribute names and identification numbers is recorded is required.
[0120]
In the present embodiment, the text data 101, the tag appearance position data 102, and the tag detailed data 103 are created for the entire desired electronic data 100. However, the creation target is not limited to the entire electronic data 100. . That is, the text data 101, the tag appearance position data 102, and the tag detailed data 103 may be created for partial data in an arbitrary area desired by the user of the electronic data 100.
[0121]
(Other embodiments)
The data processing methods described in the above embodiments are realized by executing these methods by a computer. An example of the configuration of such a computer is shown in FIG.
[0122]
Referring to FIG. 11, the computer corresponds to a CRT (cathode ray tube) corresponding to the display unit 108, a monitor 143 made of liquid crystal, a keyboard 150 corresponding to the user instruction processing unit 109, a mouse 160 and a pen tablet 170, and a control unit. CPU 124 (abbreviation of central processing unit) 122 for centrally controlling the computer itself, ROM 124 or RAM (abbreviation of random access memory) that can correspond to recording medium 117, recording medium The fixed disk 126 and the FD 132 corresponding to 117 can be detachably attached, and the FD driving device 130 and the CD-ROM 142 that access the attached FD 132 are detachably attached and the attached CD-ROM 142 is accessed. CD-ROM drive 140, communication network such as the Internet And 182, including the communication Intafeisu 180 for communicating connecting the said computer. These units are connected for communication via a bus. The FD 132 and the CD-ROM 142 can correspond to the recording medium 117. Communication network 182 corresponds to network 115.
[0123]
The computer may be provided with a magnetic tape device in which a cassette type magnetic tape is detachably mounted to access the magnetic tape.
[0124]
A program for causing such a computer to execute the above-described data processing method is stored in a computer-readable recording medium. In the present embodiment, as the recording medium, a memory necessary for processing by the computer shown in FIG. 11, for example, the memory 124 itself may be a program medium, or an external storage. As a device, there is provided a program reading device such as a magnetic tape device (not shown) and a CD-ROM drive device 140, and a program medium that can be read by mounting a magnetic tape or CD-ROM 142 as a storage medium. Also good. In any case, the stored program may be configured to be accessed and executed by the CPU 122, or in any case, the program is read once, and the read program is stored in the computer of FIG. A method may be employed in which the program is loaded into a predetermined program storage area, for example, a predetermined area of the RAM of the memory 124, and read and executed by the CPU 122. This loading program is assumed to be stored in advance in the computer.
[0125]
Here, the above-described program medium is a recording medium configured to be separable from the computer main body, and may be a medium carrying a fixed program. For example, tape systems such as magnetic tape and cassette tape, magnetic disks such as FD132 and fixed disk 126, and optical discs such as CD-ROM 142 / MO (Magnetic Optical Disc) / MD (Mini Disc) / DVD (Digital Versatile Disc) IC cards (including memory cards) / optical cards, or semiconductor memories such as mask ROM, EPROM (Erasable and Programmable ROM), EEPROM (Electrically EPROM), flash ROM, and the like.
[0126]
Moreover, the medium which carries a program fluidly may be sufficient. That is, since the computer of FIG. 11 employs a configuration that can be connected to the communication network 182 including the Internet via the communication interface 180, the computer may be a medium on which a program is downloaded from the communication network 182. When the program is downloaded, the download program may be stored in advance in the computer main body, or may be installed in advance in the computer main body from another recording medium.
[0127]
Note that the content stored in the recording medium is not limited to a program, and may be data.
[0128]
The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
[0129]
【The invention's effect】
In the present invention, since electronic data is processed using individually prepared information such as text information, tag appearance position information, and tag detailed information, whether the data to be processed is a tag part or a text part. The processing relating to the determination can be omitted, and the memory required for the determination can be reduced, so that the processing speed can be increased and the memory consumption capacity can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram of a data processing apparatus according to an embodiment.
FIG. 2 is a diagram illustrating a display device configured with a portable device, which is an example of a data processing device according to the present embodiment;
FIG. 3 is a diagram showing an example of a data structure of tag appearance position data according to the present embodiment.
FIG. 4 is a diagram illustrating an example of a data structure of tag detailed data according to the present embodiment.
FIG. 5 is a diagram showing an example of an XHTML document according to the present embodiment.
6 is a diagram showing an example of text data created from the XHTML document of FIG. 5. FIG.
7 is a diagram showing an example of tag appearance position data created from the XHTML document of FIG. 5. FIG.
FIG. 8 is a diagram illustrating an example of tag detail data created from the XHTML document of FIG.
FIG. 9 is a flowchart of the data processing apparatus according to the present embodiment.
FIG. 10 is a flowchart of the data processing apparatus according to the present embodiment.
FIG. 11 is a configuration diagram of a computer for executing a data processing method according to the present embodiment.
FIG. 12 is a diagram illustrating an example of electronic data having a hierarchical structure.
FIG. 13 is a diagram for explaining a tree structure acquired from electronic data having a hierarchical structure.
[Explanation of symbols]
100 electronic data, 101 text data, 102 tag appearance position data, 103 tag detailed data, 104 input unit, 105 data structure analysis unit, 107 layout calculation unit, 108 display unit, 109 user instruction processing unit, 110 control unit, 111 text Data creation unit, 112 tag appearance position data creation unit, 113 tag detailed data creation unit, 117 recording medium, 118 data processing device.

Claims (11)

テキストデータと前記テキストデータにおいて出現する複数のタグを含み、かつ前記タグを用いて階層構造化された電子データを処理するデータ処理装置であって、
前記テキストデータが記録されるテキスト情報と、前記複数タグのそれぞれに対応して該タグの属性を示す属性データが記録されるタグ詳細情報と、前記複数タグのそれぞれについて該タグの前記テキストデータにおける出現位置を示す固定長の出現位置データが記録されるタグ出現位置情報とを入力する入力手段と、
前記入力手段により入力された前記テキスト情報から、前記電子データの処理対象となる任意領域に対応する前記テキストデータを読出すテキスト読出手段と、
前記入力手段により入力された前記タグ出現位置情報に基づいて、前記任意領域に対応する前記テキストデータにおいて出現する前記タグを特定し、前記入力手段により入力された前記タグ詳細情報から、前記特定された前記タグの前記属性データを読出す属性読出手段と、
前記テキスト読出手段により読出された前記テキストデータを、前記属性読出手段により読出された前記属性データに基づいて処理するデータ処理手段とを備える
前記出現位置データは、前記テキストデータにおける該タグの有効範囲を指示する有効範囲データと、前記タグ詳細情報における該タグの前記属性データが記録された場所を示す記録場所データを含み、
前記属性読出手段は、前記任意領域に該当するタグを前記有効範囲データに基づいて特定し、特定された前記タグの前記記録場所データに基づいて前記タグ詳細情報から該タグの前記属性データを読出し、
前記データ処理手段は、前記テキスト読出手段により読出された前記テキストデータについて、前記属性読出手段により読出された前記属性データに基づいて、レイアウトを計算するレイアウト計算手段を有する、データ処理装置。
A data processing device including text data and a plurality of tags appearing in the text data and processing electronic data hierarchically structured using the tags,
The text information in which the text data is recorded, the tag detailed information in which attribute data indicating the attribute of the tag corresponding to each of the plurality of tags is recorded, and the text data of the tag for each of the plurality of tags Input means for inputting tag appearance position information in which fixed-length appearance position data indicating the appearance position is recorded;
Text reading means for reading the text data corresponding to an arbitrary area to be processed of the electronic data from the text information input by the input means;
Based on the tag appearance position information input by the input means, the tag that appears in the text data corresponding to the arbitrary area is specified, and the specified information is specified from the tag detailed information input by the input means. Attribute reading means for reading the attribute data of the tag;
Data processing means for processing the text data read by the text reading means based on the attribute data read by the attribute reading means ;
The appearance position data includes effective range data indicating an effective range of the tag in the text data, and recording location data indicating a location where the attribute data of the tag in the tag detailed information is recorded,
The attribute reading unit specifies a tag corresponding to the arbitrary area based on the effective range data, and reads the attribute data of the tag from the tag detailed information based on the recording location data of the specified tag. ,
The data processing device, wherein the data processing means includes layout calculation means for calculating a layout of the text data read by the text reading means based on the attribute data read by the attribute reading means .
前記有効範囲データは、前記テキストデータにおける該タグの属性が有効となる部分のデータの開始場所と終了場所を示すことを特徴とする、請求項に記載のデータ処理装置。The data processing apparatus according to claim 1 , wherein the valid range data indicates a start location and an end location of data in a portion where the attribute of the tag in the text data is valid. 前記有効範囲データは、前記テキストデータにおける該タグの属性が有効となる部分のデータの開始場所と、該部分データの大きさとを示すことを特徴とする、請求項に記載のデータ処理装置。The data processing apparatus according to claim 1 , wherein the valid range data indicates a start location of data of a portion where the attribute of the tag is valid in the text data and a size of the partial data. 前記記録場所データは、前記タグ詳細情報における該タグの前記属性データの記録開始場所と終了場所とを示すことを特徴とする、請求項からのいずれか1項に記載のデータ処理装置。The recording location data, the tag is characterized by indicating the termination location as recording start location of the attribute data of the tag in the details, the data processing device according to any one of claims 1 to 3. 前記記録場所データは、前記タグ詳細情報における該タグの前記属性データの記録開始場所と該属性データの大きさを示すことを特徴とする、請求項からのいずれか1項に記載のデータ処理装置。The data according to any one of claims 1 to 3 , wherein the recording location data indicates a recording start location of the attribute data of the tag and a size of the attribute data in the tag detailed information. Processing equipment. 前記電子データを検索して前記テキストデータを抽出して記録し前記テキスト情報を作成するテキスト情報作成手段と、
前記電子データを検索して前記タグが検索される毎に、該タグに対応して前記属性データを記録し前記タグ詳細情報を作成するタグ詳細情報作成手段と、
前記電子データを検索して前記タグが検索される毎に、該タグに対応して前記出現位置データを記録し前記タグ出現位置情報を作成するタグ出現位置情報作成手段との少なくとも1つをさらに備える、請求項1からのいずれか1項に記載のデータ処理装置。
Text information creating means for retrieving the electronic data and extracting and recording the text data to create the text information;
Tag detailed information creating means for recording the attribute data corresponding to the tag and creating the tag detailed information each time the electronic data is searched and the tag is searched,
Each time the electronic data is searched and the tag is searched, at least one of tag appearance position information creating means for recording the appearance position data corresponding to the tag and creating the tag appearance position information is further provided. The data processing apparatus according to any one of claims 1 to 5 , further comprising:
前記テキスト情報作成手段は、前記電子データの前記任意領域を検索して前記テキストデータを抽出して記録し前記テキスト情報に作成し、
前記タグ詳細情報作成手段は、前記電子データの前記任意領域を検索して前記タグが検索される毎に、該タグに対応して前記属性データを記録し前記タグ詳細情報を作成し、
前記タグ出現位置情報作成手段は、前記電子データの前記任意領域を検索して前記タグが検索される毎に、該タグに対応して前記出現位置データを記録し前記タグ出現位置情報を作成することを特徴とする、請求項に記載のデータ処理装置。
The text information creating means extracts the text data by searching the arbitrary area of the electronic data, records and creates the text information,
The tag detailed information creating means creates the tag detailed information by recording the attribute data corresponding to the tag each time the tag is searched by searching the arbitrary area of the electronic data,
The tag appearance position information creation means searches the arbitrary area of the electronic data and records the appearance position data corresponding to the tag and creates the tag appearance position information each time the tag is searched. The data processing apparatus according to claim 6 , wherein:
前記電子データのための前記テキスト情報、前記タグ出現位置情報および前記タグ詳細情報を、前記入力手段により入力可能か否か判断する手段をさらに備える、請求項1からのいずれか1項に記載のデータ処理装置。Wherein the text information for the electronic data, the tag occurrence position information and the tag details, further comprising means for determining whether it is possible input by said input means, according to any one of claims 1 7 Data processing equipment. テキストデータと前記テキストデータにおいて出現する複数のタグを含み、かつ前記タグを用いて階層構造化された電子データを、コンピュータを用いて処理するデータ処理方法であって、
前記コンピュータの入力手段が、前記テキストデータが記録されるテキスト情報と、前記複数タグのそれぞれに対応して該タグの属性を示す属性データが記録されるタグ詳細情報と、前記複数タグのそれぞれについて該タグの前記テキストデータにおける出現位置を示す固定長の出現位置データが記録されるタグ出現位置情報とを入力する入力ステップと、
前記コンピュータのテキスト読出手段が、前記入力ステップにより入力された前記テキスト情報から、前記電子データの処理対象となる任意領域に対応する前記テキストデータを読出すテキスト読出ステップと、
前記コンピュータの属性読出手段が、前記入力ステップにより入力された前記タグ出現位置情報に基づいて、前記任意領域に対応する前記テキストデータにおいて出現する前記タグを前記情報処理部により特定し、前記入力ステップにより入力された前記タグ詳細情報から、前記特定された前記タグの前記属性データを読出す属性読出ステップと、
前記コンピュータのデータ処理手段が、前記テキスト読出ステップにより読出された前記テキストデータを、前記属性読出ステップにおいて読出された前記属性データに基づいて処理するデータ処理ステップとを備え
前記出現位置データは、前記テキストデータにおける該タグの有効範囲を指示する有効範囲データと、前記タグ詳細情報における該タグの前記属性データが記録された場所を示す記録場所データを含み、
前記属性読出ステップでは、前記任意領域に該当するタグを前記有効範囲データに基づいて特定し、特定された前記タグの前記記録場所データに基づいて前記タグ詳細情報から該タグの前記属性データを読出し、
前記データ処理ステップでは、前記テキスト読出ステップにより読出された前記テキストデータについて、前記属性読出ステップにより読出された前記属性データに基づいて、レイアウトを計算する、データ処理方法。
A data processing method for processing electronic data including text data and a plurality of tags appearing in the text data and having a hierarchical structure using the tags, using a computer,
Each of the input means of the computer includes text information in which the text data is recorded, tag detailed information in which attribute data indicating the attribute of the tag is recorded corresponding to each of the plurality of tags, and each of the plurality of tags. An input step of inputting tag appearance position information in which fixed-length appearance position data indicating an appearance position of the tag in the text data is recorded;
A text reading step in which the text reading means of the computer reads the text data corresponding to an arbitrary area to be processed of the electronic data from the text information input in the input step;
The attribute reading means of the computer specifies the tag appearing in the text data corresponding to the arbitrary area based on the tag appearance position information input in the input step by the information processing unit, and the input step An attribute read step of reading the attribute data of the identified tag from the tag detailed information input by
A data processing means for processing the text data read in the text reading step based on the attribute data read in the attribute reading step ;
The appearance position data includes effective range data indicating an effective range of the tag in the text data, and recording location data indicating a location where the attribute data of the tag in the tag detailed information is recorded,
In the attribute reading step, a tag corresponding to the arbitrary area is specified based on the effective range data, and the attribute data of the tag is read from the tag detailed information based on the recording location data of the specified tag. ,
Wherein the data processing step, the for the text data read by the text reading step, based on the attribute data read by the attribute reading step, you calculate the layout, the data processing method.
請求項に記載のデータ処理方法をコンピュータに実行させるためのデータ処理プログラム。A data processing program for causing a computer to execute the data processing method according to claim 9 . 請求項1に記載のデータ処理プログラムを記録したコンピュータ読取可能な記録媒体。Computer readable recording medium recording the data processing program according to claim 1 0.
JP2003152096A 2003-05-22 2003-05-29 Data processing apparatus, data processing method, data processing program, and recording medium Expired - Fee Related JP4173770B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003152096A JP4173770B2 (en) 2003-05-29 2003-05-29 Data processing apparatus, data processing method, data processing program, and recording medium
PCT/JP2004/006924 WO2004104857A1 (en) 2003-05-22 2004-05-14 Data processing device, data processing method, data processing program, and computer-readable recording medium containing the data processing program
EP04733166A EP1628227A4 (en) 2003-05-22 2004-05-14 Data processing device, data processing method, data processing program, and computer-readable recording medium containing the data processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003152096A JP4173770B2 (en) 2003-05-29 2003-05-29 Data processing apparatus, data processing method, data processing program, and recording medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008172192A Division JP4628450B2 (en) 2008-07-01 2008-07-01 Data processing apparatus, data processing method, data processing program, and recording medium

Publications (3)

Publication Number Publication Date
JP2004355320A JP2004355320A (en) 2004-12-16
JP2004355320A5 JP2004355320A5 (en) 2005-11-24
JP4173770B2 true JP4173770B2 (en) 2008-10-29

Family

ID=34047391

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003152096A Expired - Fee Related JP4173770B2 (en) 2003-05-22 2003-05-29 Data processing apparatus, data processing method, data processing program, and recording medium

Country Status (1)

Country Link
JP (1) JP4173770B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8024353B2 (en) * 2005-02-11 2011-09-20 Fujitsu Limited Method and system for sequentially accessing compiled schema
JP4658657B2 (en) * 2005-03-28 2011-03-23 ヒューレット−パッカード デベロップメント カンパニー エル.ピー. Storage system, method for storing information in storage device and related method, and computer program product

Also Published As

Publication number Publication date
JP2004355320A (en) 2004-12-16

Similar Documents

Publication Publication Date Title
JP4990302B2 (en) Data processing method, data processing program, and data processing apparatus
US10671251B2 (en) Interactive eReader interface generation based on synchronization of textual and audial descriptors
US8775472B2 (en) Dynamic presentation framework
US20110087959A1 (en) Method and device for processing the structure of a layout file
KR20060046002A (en) Method and system for mapping content between a starting template and a target template
JPH10124413A (en) Method for priority order down loading of buried web object and device therefor
JP2012133659A (en) File format, server, electronic comic viewer device and electronic comic generation device
JPH08241332A (en) Device and method for retrieving all-sentence registered word
KR102087280B1 (en) Server for editing electronic document based on message including edit command and operating method thereof
JP4173770B2 (en) Data processing apparatus, data processing method, data processing program, and recording medium
JP2006215681A (en) Document detail determination support system
JP4628450B2 (en) Data processing apparatus, data processing method, data processing program, and recording medium
JP2001306601A (en) Device and method for document processing and storage medium stored with program thereof
JPWO2006051974A1 (en) Document processing apparatus and document processing method
JP2003091344A (en) Information processor, information processing method, recording medium, data structure and program
CN100385439C (en) Data processing device, data processing method, data processing program, and computer-readable recording medium containing the data processing program
JP2007127798A (en) Electronic document reproduction device, server, electronic document reproduction system, electronic document reproduction method, electronic document reproduction program, and recoding medium with the electronic document reproduction program recoded thereon
EP1628227A1 (en) Data processing device, data processing method, data processing program, and computer-readable recording medium containing the data processing program
JP2004280237A (en) Data processor, data processing method, data processing program and record medium
JP5230193B2 (en) Data search apparatus, data search method, and computer program
JP2004280278A (en) Data processor, data processing method, data processing program and recording medium
CN113535017B (en) Method and device for processing and synchronously displaying drawing files and storage medium
JP4783401B2 (en) Information processing apparatus and method, program, and recording medium
JPH0778800B2 (en) Document processor
JP2005056043A (en) Information processor and information processing method, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050930

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080410

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080507

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080701

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20080718

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080805

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: 20080814

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: 20110822

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110822

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120822

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120822

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130822

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees