JP3597940B2 - HTML document book type shaping method and apparatus - Google Patents
HTML document book type shaping method and apparatus Download PDFInfo
- Publication number
- JP3597940B2 JP3597940B2 JP8698996A JP8698996A JP3597940B2 JP 3597940 B2 JP3597940 B2 JP 3597940B2 JP 8698996 A JP8698996 A JP 8698996A JP 8698996 A JP8698996 A JP 8698996A JP 3597940 B2 JP3597940 B2 JP 3597940B2
- Authority
- JP
- Japan
- Prior art keywords
- html
- book
- attribute
- logical structure
- document
- 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
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
- Digital Computer Display Output (AREA)
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、インターネットに蓄積されているWWW(World Wide Web)のようなHTML(Hyper Text Makeup Language)文書を利用者が閲覧しやすい本の形に整形し表示する際に、HTMLのリンクに本型の論理的構造を記述するための属性を追加し、その属性付きのリンクを用いて本の形に整形するための方法とその装置に関するものである。
【0002】
【従来の技術】
従来のHTML文書を整形し表示するための装置、特にWWWクライアントと呼ばれる装置においては、表示されるHTML文書を1表示装置につき1文書であった。そのHTML文書と他のHTML文書との関係はリンクを用いて表現され、例えそのHTML文書が他のHTML文書と一冊の本で表されるような密な関係をもっていたとしても、それぞれは独立に管理される。
【0003】
このようなリンクを用いて、HTML文書間の階層や前後関係などの論理的構造、例えば本のような目次、章、節など、を利用者に認識させるためには、「次ページ」、「前ページ」のようなリンクを設定し利用者にそのような遷移を行わせる必要がある。
【0004】
【発明が解決しようとする課題】
従来の技術を用いた場合、HTML文書間に本のような目次、章、節などの論理的構造を付与しようとしても、利用者に認識に頼った「次ページ」、「前ページ」のようなリンクを設定する必要があった。また、例え「次ページ」、「前ページ」のようなリンクが設定されていたとしても、それらのリンクは他のリンクと何ら区別されていないために、本の形に整形する際にどのリンクを使って順序づけすれば良いかという情報が不足し、これを計算機で処理することは難しかった。
【0005】
本発明の目的は、HTML文書間のリンクに本のような目次、章、節などの論理的構造を記述することができる属性を追加することで、HTML文書間の論理的構造を記述し、その情報を使ってHTML文書を並べ替えることで効率的に本の形に整形し表示することができる方法とその装置を提供することにある。
【0006】
【課題を解決するための手段】
上記目的を達成するため、請求項1記載の本発明は、インターネット上のハイパーテキスト情報などの情報をタグベースで記述するための構造記述言語であるHTMLを用いて記述されたHTML文書を整形する方法であって、任意の情報から他の情報に遷移するための、リンクと呼ばれるHTML文書内にある識別子に与えられた、複数のHTML文書間の本型の階層や前後関係といった論理的構造の記述である属性を解釈する第一の過程と、該属性を用いて該論理的構造を木構造に変換する第二の過程と、該木構造を該属性で表現された複数のHTML文書間の前後関係と矛盾の無いように並べ替える第三の過程と、該並べ替えられた木構造を基にHTML文書を線形に並べる第四の過程と、成ることを特徴とするHTML文書本型整形方法であり、HTML文書を本型に整形することができることを最も主要な特徴とする。
【0007】
請求項1記載の本発明にあっては、HTML文書間のリンクに本のような目次、章、節などの論理的構造を記述することができ、従来の技術ではできなかったHTML文書間の論理的構造を記述することができるようになる。その情報を用いてHTML文書を並べ替えることで効率的に本の形に整形することができるようになる。
【0008】
また、請求項2記載の本発明は、請求項1記載の発明において、前記第二の過程が、複数のHTML文書間の本型の論理的構造を記述した目次文書を用意し、該目次文書の記述を用いてHTML文書間の論理的構造を木構造に変換する過程であるとして、HTML文書間の本型の論理的構造を記述した目次文書のみを与えることで、該目次文書の記述を用いてHTML文書間の論理的構造を木構造に変換する過程を有するものであり、HTML文書そのものに本型の論理的構造を記述しなくてもHTML文書を本型に整形することができることを最も主要な特徴とする。
【0009】
請求項2記載の本発明にあっては、HTML文書そのものは従来の技術で記述されたものでも、HTML文書間の本型の論理的構造を記述した目次文書を与えるだけで、従来の技術ではできなかったHTML文書間の論理的構造を記述することができるようになる。その情報を用いてHTML文書を並べ替えることで効率的に本の形に整形することができるようになる。
【0010】
更に、請求項3記載の本発明は、請求項1または2記載の発明において、複数のHTML文書間の論理的構造が、該リンクの存在する順方向の関係を表現するREL属性と逆方向の関係を表現するREV属性とで記述されている場合、この論理的構造を本型の論理的構造の記述に変換する過程を前記第一の過程の前に新たに有し、HTML文書間の論理的構造をHTMLのリンクに従来から存在するREL属性やREV属性で記述し、該記述を用いて表現されたHTML文書間の論理的構造を本型の論理的構造の記述に変換することで、HTML文書を本型に整形することができることを最も主要な特徴とする。
【0011】
請求項3記載の本発明にあっては、HTMLのリンクの属性に対する拡張は行わなくとも、従来から存在するREL属性やREV属性を用いて、階層や前後関係などの本型の論理的関係を記述することで、HTML文書間の論理的構造を記述することができるようになる。その情報を用いてHTML文書を並べ替えることで効率的に本の形に整形することができるようになる。
【0012】
次に、上記目的を達成するため、請求項4記載の本発明は、インターネット上のハイパーテキスト情報などの情報をタグベースで記述するための構造記述言語であるHTMLを用いて記述されたHTML文書を整形する装置であって、HTMLを用いて記述されたHTML文書を本型の構造に整形する手段と、本型の構造を画面上に本の形で表示する手段とを備えた装置において、HTML文書間の本型の階層や前後関係といった論理的構造の記述である属性を解釈する手段と、該属性を用いて該論理的構造を木構造に変換する手段と、該木構造を該属性で表現された複数のHTML文書間の前後関係と矛盾の無いように並べ替える手段と、該並べ替えられた木構造を基にHTML文書を線形に並べる手段と、を備えることを特徴とするHTML文書本型整形装置であり、HTML文書を本型に整形し表示することができることを最も主要な特徴とする。
【0013】
請求項4記載の本発明を用いることで、HTML文書間のリンクに本のような目次、章、節などの論理的構造を記述することができ、従来の技術ではできなかったHTML文書間の論理的構造を記述することができるようになる。その情報を用いてHTML文書を並べ替えることで効率的に本の形に整形し表示することができるようになる。
【0014】
また、請求項5記載の本発明は、請求項4記載の発明において、前記論理的構造を木構造に変換する手段が、複数のHTML文書間の本型の論理的構造を記述した目次文書を用意し、これに基づいてHTML文書間の論理的構造を木構造に変換する手段であるとして、HTML文書間の本型の論理的構造を記述した目次文書のみを与えることで、HTML文書そのものに本型の論理的構造を記述しなくてもHTML文書を本型に整形することができることを最も主要な特徴とする。
【0015】
請求項5記載の本発明にあっては、HTML文書そのものは従来の技術で記述されたものでも、HTML文書間の本型の論理的構造を記述した目次文書を与えるだけで、従来の技術ではできなかったHTML文書間の論理的構造を記述することができるようになる。その情報を用いてHTML文書を並べ替えることで効率的に本の形に整形することができるようになる。
【0016】
更に、請求項6記載の本発明は、請求項4、または5記載の発明において、複数のHTML文書間の論理的構造が、リンクに存在する順方向の関係を表現するREL属性と逆方向の関係を表現するREV属性とで記述されている場合、この論理的構造を本型の論理的構造の記述に変換する手段を新たに備えることで、HTML文書を本型に整形することができることを最も主要な特徴とする。
【0017】
請求項6記載の本発明にあっては、HTMLのリンクの属性に対する拡張は行わなくとも、従来から存在するREL属性やREV属性を用いて、階層や前後関係などの本型の論理的関係を記述することで、HTML文書間の論理的構造を記述することができるようになる。その情報を用いてHTML文書を並べ替えることで効率的に本の形に整形することができるようになる。
【0018】
以下に、本発明の作用を述べる。
【0019】
請求項1記載の本発明において、リンクにHTML文書間の本型の階層や前後関係などの論理的構造の記述として与えられた属性を解釈する過程は、従来の技術では解釈することができなかった本型の論理的構造を解釈することができるようにしている。また、該属性を用いて表現されたHTML文書間の論理的構造を木構造に変換する過程は、各HTML文書に分散した論理的構造の記述を一つの木構造として表現することで集中化して扱うことができるようにしている。更に、該木構造を前記属性で表現された文書間の前後関係とできるだけ矛盾のないように並べ替える過程は、より上位の階層で記述された前後関係を補助としてHTML文書間のリンクに記述されている前後関係の順に並べ替えることで、HTML文書間に前後関係が記述されていない場合や矛盾した記述を含む場合にも正常に並べ替えが行われるようにしている。一方、該並べ替えられた木構造を基にHTML文書を線形に並べる過程は、HTML文書に記述された本型の論理的構造にできるだけ適合させた木構造を深さ優先で探索することで、HTML文書を線形に並べている。従って、HTML文書間の論理的構造を記述し、その情報を使ってHTML文書を並べ替えることが可能となり、本発明の目的であるHTML文書を効率的に本の形に整形することができるようになる。
【0020】
請求項2記載の本発明において、目次文書の記述を用いて表現されたHTML文書間の論理的構造を木構造に変換する過程は、与えられた目次文書の記述を文書の先頭から順に展開することでHTML文書間の階層や前後関係などを得、その情報を用いてHTML文書間の論理構造を木構造に変換することを行っている。従って、HTML文書そのものには本型の論理的構造が記述されていなくても、目次文書の記述からHTML文書間の論理構造を木構造に変換することが可能となり、本発明の目的であるHTML文書を効率的に木の形に整形することができるようになる。
【0021】
請求項3記載の本発明において、HTMLのリンクに従来から存在するREL属性やREV属性の記述を用いて表現されたHTML文書間の論理的構造を本型の論理的構造の記述に変換する過程は、リンクのREL属性やREV属性によって表現された親子関係や前後関係を本型の階層関係や前後関係に変換することを行っている。従って、HTML文書間の論理的構造を記述し、その情報を使ってHTML文書を並べ替えることが可能となり、本発明の目的であるHTML文書を効率的に本の形に整形することができるようになる。
【0022】
請求項4記載の本発明において、リンクにHTML文書間の本型の階層や前後関係などの論理的構造の記述として与えられた属性を解釈する手段は、従来の技術では解釈することができなかった本型の論理的構造を解釈することができるようにしている。次に、該属性を用いて表現されたHTML文書間の論理的構造を木構造に変換する手段は、各HTML文書に分散した論理的構造の記述を一つの木構造として表現することで集中化して扱うことができるようにしている。更に、該木構造を前記属性で表現された文書間の前後関係とできるだけ矛盾のないように並べ替える手段は、より上位の階層で記述された前後関係を補助としてHTML文書間のリンクに記述されている前後関係の順に並べ替えることで、HTML文書間に前後関係が記述されていない場合や矛盾した記述を含む場合にも正常に並べ替えが行われるようにしている。最後に、該並べ替えられた木構造を基にHTML文書を線形に並べる手段は、HTML文書に記述された本型の論理構造にできるだけ適合させた木構造を深さ優先で探索することで、HTML文書を線形に並べている。従って、HTML文書間の論理的構造を記述し、その情報を使ってHTML文書を並べ替えることが可能となり、本発明の目的であるHTML文書を効率的に本の形に整形し表示することができる装置を提供することができるようになる。
【0023】
請求項5記載の本発明において、目次文書の記述を用いて表現されたHTML文書間の論理的構造を木構造に変換する手段は、与えられた目次文書の記述を文書の先頭から順に展開することでHTML文書間の階層や前後関係などを得、その情報を用いてHTML文書間の論理構造を木構造に変換することを行っている。従って、HTML文書そのものには本型の論理的構造が記述されていなくても、目次文書の記述からHTML文書間の論理構造を木構造に変換することが可能となり、本発明の目的であるHTML文書を効率的に木の形に整形することができるようになる。
【0024】
請求項6記載の本発明において、HTMLのリンクに従来から存在するREL属性やREV属性で記述されたHTML文書間の論理的構造を本型の論理的構造の記述に変換する手段は、リンクのREL属性やREV属性によって表現された親子関係や前後関係を本型の階層関係や前後関係に変換することを行っている。従って、HTML文書間の論理的構造を記述し、その情報を使ってHTML文書を並べ替えることが可能となり、本発明の目的であるHTML文書を効率的に本の形に整形することができるようになる。
【0025】
【発明の実施の形態】
以下、図面を用いて本発明の実施形態例について説明する。
【0026】
〔実施形態例1〕
図1は、本発明の第一の実施形態例によって整形された結果の本型の論理的構造をモデル化した図である。同図に示す本1は論理的構造としての本全体を表す。このような本は、通常、まえがき2や目次3、本文4、参考文献目録5、索引6、その他7から構成される。ここで、本文4は更に章8が繰り返されたもので構成され、章8は節9が繰り返されたもの、節9はページ10が繰り返されたもの、ページ11は単語11が繰り返されたもので構成される。まえがき2やその他7も本文4と同様に、節9や章8が繰り返されたもので構成される。その他7には、付録や補追と呼ばれるものが該当する。また、目次3は主に章8は節9のような本内部への参照で構成される。索引6も同様にページ10などの本内部への参照で構成される。一方、参考文献目録5は別の本など本の外部の情報への参照で構成され、本内部の単語11などから参照される。本発明では、ページ10と単語11の論理的構造以外を記述し、ページ10の繰り返しの構造は自動的に作成する。
【0027】
図2は、本発明の第一の実施形態例における上記の論理的構造をリンクに記述するために必要となる属性を示した図である。同図に示す属性book12は図1における本1に対応し、本全体を記述したHTML文書からのリンクであることを表している。また、属性section13は図1におけるまえがき2やその他7、本文4の章8や節9に対応し、章や節などのページをまとめた構造のHTML文書からのリンクであることを表している。属性index14は図1における目次3や索引6に対応し、本内部への参照をまとめたHTML文書からのリンクであることを表している。属性bibliography15は図1における参考文献目録5に対応し、本の外部への参照をまとめたHTML文書からのリンクであることを表している。
【0028】
属性book12の値としては、まえがき2や本文4、その他7などの属性section13で表されるHTML文書へのリンクの場合は“section”、目次3や索引6などの属性index14で表されるHTML文書へのリンクの場合は“index”、参考文献目録5などの属性bibliography15で表されるHTML文書へのリンクの場合は“bibliography”を与える。また、続き物小説のように何冊かの本で一つのまとまりとなる本を記述するために、論理的に前を表す“previous”や、論理的に後ろを表す“next”を与えることもできる。更に、作者を表す“made”を与えることもできる。次に、属性section13の値としては、リンクの書かれているHTML文書が章ならば節、節ならば項を表すHTML文書へのリンクに対して“section”を与える。また、章や節などの論理的な前後関係を記述するために、前を表す“previous”や、後ろを表す“next”を与えることもできる。属性index14の値としては、本内部の情報に対する参照のリンクの場合は“refer”を与える。また、目次や索引などが複数のHTML文書に渡って記述されている場合には、論理的に前を表す“previous”や、論理的に後ろを表す“next”を与えることもできる。属性bibliography15の値としては、本外部の情報に対する参照のリンクの場合に、“refer”を与える。また、参照文献目録などが複数のHTML文書に渡って記述されている場合には、論理的に前を表す“previous”や、論理的に後ろを表す“next”を与えることもできる。
【0029】
本発明の第一の実施形態例における論理的構造を表す上記の属性をリンクに記述した例を以下に示す。
【0030】
book.html〜16
<head>
<link book=“made”href=“mailto:kenya@ntt.jp”>
</head>
<body>
<A book=“index”href=“mokuji.html”>目次</A><p>
<A book=“section”href=“chapl.html”>第一章</A><p>
<A book=“bibliography”href=“bib.html”>参考文献</A><p>
</body>
mokuji.html〜17
<body>
<h1>目次<h1><p>
<A index=“refer”href=“chap1.html”>第一章</A><BR>
<A index=“refer”href=“sec1.html”>第一節</A><BR>
<A index=“refer”href=“sec2.html”>第二節</A>
<p>
<A index=“refer”href=“chap2.html”>第二章</A>
</body>
chap1.html〜18
<body>
<h1>第一章<h1><p>
<A section=“section”href=“sec1.html”>第一節</A><p>
<A section=“section”href=“sec2.html”>第二節</A><p>
</body>
sec1.html〜19
<body>
<h2>第一節</h2><p>
これは本型表示のテストページです。<p>
<A section=“next”href=“sec2.html”>次節</A><p>
</body>
sec2.html〜20
<body>
<h2>第二節</h2><p>
これは本型表示のテストページの第二節です。<p>
<A section=“previous”href=“sec1.html”>前節</A><p>
</body>
bib.html〜21
<body>
<h1>参考文献目録</h1><p>
〔1〕
<A bibliography=“refer”href=“http://www.ntt.jp/”>NTT Home Page</A><BR>
〔2〕
<A bibliography=“refer”href=“http://hil.ntt.jp/”>NTT Humam Interface lab</A><BR>
</body>
上記に示すbook.html16は、図1における本1に相当するHTML文書で本全体を表している。<head>タグと</head>タグで囲まれたヘッダに、属性book=“made”をもつ<link>タグによってこの本の作者を表すリンクが記述されている。ここで、href=“文字列”は、その文字列をリンクの識別子とすることを示し、その文字列のことをUniformResource Identifier略してURIと呼ぶ。また、<a>タグによって目次や第一章、参考文献目録へのリンクが記述されている。mokuji.html17は、図1における目次3に相当するHTML文書で、book.html16から属性book=“index”のリンクで参照されている。この文書17には、本全体の構成を表す目次で属性index=“refer”をもつ<a>タグによって第一章、第一章第一節、第一章第二節、第二章への本内部参照を表すリンクが記述されている。このmokuji.html17は、その他のHTML文書の内容から自動的に生成することができる。chap1.html18は、図1における章8に相当するHTML文書で、book.html16から属性book=“section”を持つリンクで参照されている。この文書18には、属性section=“section”をもつ<a>タグによって第一章を構成する第一節、第二節へのリンクが記述されている。sec1.html19やsec2.html20は、は図1における節9に相当するHTML文書で、chap1.html18から属性section=“section”を持つリンクで参照されている。これらの文書19,20には、第一章を構成する第一節と第二節の内容と、それらの論理的前後関係を示すリンクが属性section=“next”や属性section=“previous”をもつ<a>タグによって記述されている。bib.html21は、図1における参考文献目録5に相当するHTML文書で、book.html16から属性book=“bibliography”を持つリンクで参照されている。この文書21には、この本の参考文献のリストを属性bibliography=“href”をもつ<a>タグによって記述している。
【0031】
図3は、上記に示したHTML文書間の関係を図に表したものである。角丸四角形はHTML文書内でリンクの記述されている部分を示し、矢印がリンクの参照先を示している。ここで、網掛けした角丸四角形は本の外部への参照を表し、矢印に付加された文字はリンクのbook属性やsection属性、index属性の値を表している。
【0032】
図4は、上記に示したHTML文書を本発明の第一の実施形態例によって本型に整形した例を示した図である。それぞれのHTML文書は記述された本型の論理的構造に沿って、図1で示したモデルの本1、目次3、本文4、参考文献目録5の順に並べ替えがなされている。本実施形態例では、一つのHTML文書が一ページに収まりきらない場合は、二ページ以上に分割する。図4に示した各四角形は本型整形後の一ページを表しており、下部にハイフン(−)で囲んだ数字はそのページのページ番号を表している。
【0033】
図5は、本発明の第一の実施形態例に係るHTML文書本型整形装置の構成を表すブロック図である。同図に示すHTML文書取得部22は、WWW等のHTML文書を蓄積しているデータベースよりHTML文書を取得しHTML構文解析部23に渡す役割をもつ。HTML構文解析部23では、HTML文書取得部22より渡されたHTML文書の構文を解析し、処理中のHTML文書のURIと本実施形態例で定めた属性をもつリンクを本型構造解析部24へ渡し、処理中のHTML文書を部品記憶部25へと格納する。本型構造解析部24は、本発明の最も主要な部分であり、本型の論理的構造を解析しHTML文書の並べ替えを行う。本型構造解析部24で処理を行う際、処理中のHTML文書のURIを構造記憶部26に登録する。また、HTML構文解析部23により渡されたリンクに構造記憶部26に存在しないURIが記述されていた場合には、HTML文書取得部22にそれらのURIを渡してHTML文書を取得することを再帰的に行う。取得していないHTML文書がなくなったら、本実施形態例で定めた属性に従ってHTML文書の並べ替えを行い、HTML文書の並び方の順番を構造記憶部26に登録し、本型整形部27の処理を開始する。本型整形部27は、構造記憶部26に登録されたHTML文書の並び方の順番で、部品記憶部25に格納されたHTML文書をページに収まるように分割する処理を行う。本型整形部27で処理を行う際、そのHTML文書のURIとページ番号の対応を記述したURI⇔ページ番号対応表28を作成する。本型整形部27の処理が終了したら、その結果を表示データ生成部29に渡す。表示データ生成部29では、本型整形部27で分割されたHTML文書を一ページ毎に情報表示部30で表示できる形式に変換する。表示データ生成部29で処理を行う際、URI⇔ページ番号対応表28に存在しないURIは本外部への参照としてそのまま残し、URI⇔ページ番号対応表28に存在するURIは本内部への参照としてページ番号に変換する処理を行う。情報表示部30では、表示データ生成部29で変換されたHTML文書を本の形で表示する。
【0034】
以上のようにして、HTML文書にそれらの間の論理的構造を記述し、その情報を使ってHTML文書を並べ替えることが可能となり、HTML文書を効率的に本の形に整形し表示することができるようになる。
【0035】
次に、図6のフローチャートを参照し、上記実施形態例において本型構造解析部24で本型の論理的構造に基づいたHTML文書の並べ替えを行う動作について詳細に説明する。まず、本型に整形するための出発点となるHTML文書をルート文書と呼ぶ。ルート文書は図1に示した本1に対応し、論理的構造を記述するリンクは本実施形態例で定めた属性bookをもつ。本実施形態例では、最初にルート文書を入力することで処理が開始される。本型構造解析部24では、ステップS1としてHTML構文解析部23より渡されたルート文書のURIを構造記憶部26に格納し、同時に渡されたルート文書内のbook属性をもつリンクに格納されたURIをルート文書に出現する順を並べ、図7に示すような木を作成する。図7の楕円はURIを表しノードと呼ぶ。同図の矢印はbook属性をもつリンクとその属性値である“index”,“section”などを表している。図7のような木を作成するとき、book属性として適さない値をもつリンクは木に含めないこととする。次に、現在、葉となっているURIをHTML文書取得部22に渡し、ステップS2に進む。
【0036】
ステップS2では、まず、HTML構文解析部23より渡された本実施形態例で定めた属性をもつリンクのうち属性値が“section”,“next”,“previous”であるものを、処理中のHTML文書に出現する順で木に追加する。追加先のノードはHTML構文解析部23より渡されたURIと同じURIをもつノードとする。book属性やsection属性の値が“section”であるリンクをsectionリンクと呼ぶが、追加したリンクがsectionリンクだった場合には、その参照先のURIをHTML文書取得部22に渡す。木の中に処理していないsectionリンクが無くなったらステップS3に進む。ステップS2の結果は図8のようになる。同図に示すレベルは、ルート文書から何回のsectionリンク参照で到達できる文書かで定義し、小さい方をより上位のレベルとする。レベル1は図1における章8、レベル2は節9というような対応関係がある。ここで、木へリンクを追加する場合には、それぞれの属性として適さない値をもつリンクや同一もしくはそれ以上のレベルに対するsectionリンクを無視する。
【0037】
ステップS3では、木に存在するnextリンク、previousリンクの参照先URIで木の中に存在しないものをHTML文書取得部22に渡し、HTML構文解析部23により渡された本実施形態例で定めた属性をもつリンクのうち属性値“section”,“next”,“previous”であるものを、処理中のHTML文書に出現する順で木に追加する。ここで、nextリンクとは本実施形態例で定めた属性の値が“next”であるリンクのことであり、previousリンクとは本実施形態例で定めた属性の値が“previous”であるリンクのことである。追加先のノードはHTML構文解析部23より渡されたURIと同じURIをもつノードとする。木の中に処理していないnextリンクやpreviousリンクが無くなったらステップS4に進む。
【0038】
ステップS4では、木の中に未解決のリンクが含まれているかどうか判定する。未解決のリンクとは、sectionリンク、nextリンク、previousリンクで、その参照先のURIがHTML文書取得部22に渡されていないリンクのことである。未解決のリンクが存在する場合にはステップS2に戻り、未解決のリンクが存在しない場合にはステップS5に進む。
【0039】
ステップS5では、同一レベルにあるノードのnextリンク優先の並べ替えを行う。並べ替えは、同一レベルにあるノードをpreviousリンクにできるだけ矛盾がないように並べ替えた後、nextリンクにできるだけ矛盾がないように並べ替えることで行う。ここで、矛盾がないように並べ替えるには、previousリンクやnextリンクによる関係を値の大小関係と考えソートを実行すればよい。
【0040】
ステップS5の動作例を、図9を参照しながら説明する。ステップS5の初期状態では図9(a)に示すように、ノードは1番,2番,3番,4番,5番の順で並び、1番から2番にnextリンク、2番から3番にpreviousリンク、3番から4番にnextリンク、4番から5番にnextリンクとpreviousリンクが設定されていたとする。previousリンクにできるだけ矛盾がないように並べ替えるには、2番と3番を入れ替え、4番と5番も入れ替えれば良い。すると図10(b)に示すように、1番,3番,2番,5番,4番の順でノードが並ぶことになる。次に、nextリンクにできるだけ矛盾がないように並べ替えるには、4番と5番を入れ替えれば良い。結果、図9(c)に示すように、1番,3番,2番,4番,5番の順でノードが並ぶ。このとき、previousリンクに矛盾が生ずるが、nextリンクが優先であるので無視する。このような並べ替えを木に存在する全てのノードに対して行い、ステップS6に進む。
【0041】
ステップS6では、作成された木に従って各ノードに対応するURIを順序づけする。図10は、ステップS6の実行結果の例を示した図である。ステップS5までで、図10(a)のように作成された木を深さ優先で一次元化することで、図10(b)に示したように本型の順序づけができる。また、同図に示したように、木に同一のURIをもつノードが複数存在した場合には、本型に整形されたときに後ろに来るノードを削除する。
【0042】
以上で、本発明の第一の実施形態例における本型構造解析部24で本型の論理的構造に基づいたHTML文書の並べ替えを行う動作が完了する。
【0043】
〔実施形態例2〕
次に、本発明の第二の実施形態例について図面を用いて詳細に説明する。本実施形態例は、図6に示した本発明の第一の実施形態例に係るHTML文書本型整形装置の構成を表すブロック図における本型構造解析部24を、第一の実施形態例のように本型の論理的構造の記述を全てのHTML文書から引き出すのではなく、本型の論理的構造を記述した目次文書から、その記述を用いて表現されたHTML文書間の論理的構造を本構造に変換するように変更した本発明の一実施形態例である。
【0044】
図11は、第二の実施形態例におけるHTML文書間の関係を表した図である。角丸四角形はHTML文書内でリンクの記述されている部分を示し、矢印がリンクの参照先を示している。ここで、網掛けした角丸四角形は本の外部への参照を表し、矢印に付加された文字はリンクのbook属性やsection属性、index属性の値を表している。同図に示したmokuji.html31は、book.html32から、属性book=“index”をもつリンクで参照されており、本実施形態例ではここにHTML文書の並び順などの論理的構造が記述される。記述の方法としては、属性index=“refer”をもつリンクを本に整形したときの順で記述することが挙げられる。このリンクに、HTML文書内の構造を記述するためのタグである<Hn>タグを組み合わせることで、例えば<H1>と</H1>で囲まれたリンクは章を表し、<H2>と</H2>で囲まれたリンクは節を表すといったように、HTML文書間の階層関係も表現することができる。
【0045】
以下に上記した目次文書であるmokuji.html31の例を示す。
【0046】
mokuji.html〜33
<body>
<h1>目次<h1><p>
<h1><A index=“refer”href=“chap1.html”>第一章</A></h1>
<h2><A index=“refer”href=“sec1.html”>第一節</A><h2>
<h2><A index=“refer”href=“sec2.html”>第二節</A><h2>
<p>
<A index=“refer”href=“chap2.html”>第二章</A>
</body>
図12は、図11に示したHTML文書間の関係を用いて本発明の第二の実施形態例によって本型に整形した例を示した図である。それぞれのHTML文書はmokuji.html33に記述された本型の論理的構造に沿って、図1で示したモデルの本1、目次3、本文4の順に並べられている。本実施形態例でも、一つのHTML文書が一ページに収まりきらない場合は、二ページ以上に分割する。図12に示した各四角形は本型整形後の一ページを表しており、下部にハイフン(−)で囲んだ数字はそのページのページ番号を表している。また、同図の矢印は上記に示した属性index=“refer”をもつリンクを表し、点線はHTML文書に記述されているnextリンク、previousリンクによって結びつけられているグループを表している。
【0047】
次に、本発明の第二の実施形態例に係るHTML文書本型整形装置の構成を表すブロック図であるが、これは図5に示したものと同様で、HTML構文解析部23から本型構造解析部24へ渡されるデータと本型構造解析部24の動作のみが異なる。HTML構文解析部23の変更は、本型構造解析部24へ渡すデータの内、本実施形態例で定めた属性をもつリンクに、見出しの文字サイズを表す<Hn>タグの現在値を付加するように変更することで行う。
【0048】
本型構造解析部24の動作については第二の実施形態例における最も主要な部分であるため、図13のフローチャートを参照しながら詳細に説明する。本実施形態例でも第一の実施形態例と同様に、最初にルート文書を入力することで処理が開始される。本実施形態例の本型構造解析部24では、ステップS7としてHTML構文解析部23より渡されたルート文書のURIを構造記憶部26に格納し、同時に渡されたルート文書内の属性book=“index”をもつリンクに格納されたURIを保持しつつHTML文書取得部22に渡し、該保持したURIと同じURIがHTML構文解析部23により渡されるのを待つ。該URIがHTML構文解析部23より渡されたら、同時に渡された本実施形態例で定めた属性をもつリンクのうち属性index=“refer”であるのを、処理中のHTML文書に出現する順で木に追加する。追加先のノードは、付加された<Hn>タグの値によって決定する。
【0049】
図16は、第二の実施形態例において目次文書から本型の論理的構造を木に追加している様子を示した図である。目次文書33からは、第一章34、第一章第一節35、第一章第二節36、第二章37へと属性index=“refer”をもつリンクが設定されているので、そのリンクが出現する順に木への追加を行う。まず、第一章34へのリンクは<H1>タグと</H1>タグで囲まれているのでリンク先はレベル1のノードとなる。そこで、第一章34へのリンクをルート文書からのリンクとして追加する。次に、第一章第一節35へのリンクは<H2>タグと</H2>タグで囲まれているのでリンク先はレベル2のノードとなる。また、最後に追加したレベル1のノードは第一章34なので、第一章第一節35へのリンクを第一章34からのリンクとして追加する。同様に、第一章第二節36へのリンクも第一章34からのリンクとして追加する。最後に、第二章37へのリンクには<Hn>タグの情報が存在しないため、ルート文書からのリンクとして追加を行う。以上のようにして、目次文書33から本の論理的構造を表す木が作成されたら、木の中の未解決のリンクに対してそのリンク先のURIをHTML文書取得部22に渡し、HTML構文解析部23より渡された本実施形態例で定めた属性をもつリンクのうち属性値が“next”,“previous”であるものを、同時に渡されるURIと同じURIをもつノードに追加する。木の中の未解決のリンクがなくなったら、ステップS8に進む。
【0050】
ステップS8では、ステップS3とほとんど同じ動作を行い、木に存在するnextリンク、previousリンクの参照先URIで木の中に存在しないものをHTML文書取得部22に渡し、HTML構文解析部23より渡された本実施形態例で定めた属性をもつリンクのうち属性値“next”,“previous”であるものを、処理中のHTML文書に出現する順で木に追加する。追加先のノードは同時に渡されたURIと同じURIをもつノードとする。木の中に処理していないnextリンクやpreviousリンクが無くなったらステップS9に進む。
【0051】
ステップS9では、ステップS5と全く同じ動作を行い、同一レベルにあるノードのnextリンク優先の並べ替えを行う。並べ替えを木に存在する全てのノードに対して行ったら、ステップS10に進む。
【0052】
ステップS10では、ステップS6と全く同じ動作を行い、作成された木に従って各ノードに対応するURIを順序づけし、木に同一のURIをもつノードが複数存在した場合には、本型に整形されたときに後ろに来るノードを削除する。
【0053】
以上で、本発明の第二の実施形態例における本型構造解析部24で本型の論理的構造に基づいたHTML文書の並べ替えを行う動作が完了する。
【0054】
〔実施形態例3〕
最後に、本発明の第三の実施形態例について詳細に説明する。本実施形態例では、図6に示した本発明の第一の実施形態例に係るHTML文書本型整形装置の構成を表すブロック図におけるHTML構文解析部23の動作のみが異なる。HTML構文解析部23では、HTML文書取得部22より渡されたHTML文書の構文を解析し、処理中のHTML文書のURIと本実施形態例で定めた属性をもつリンクを本型構造解析部24へ渡し、処理中のHTML文書を部品記憶部25へと格納するが、本実施形態例ではリンクを本型構造解析部24へ渡す前にHTMLのリンクに従来から存在するREL属性、REV属性を本実施形態例で定めた属性に変換して渡すことができる。以下、この変換について詳細に説明する。
【0055】
HTMLのリンクに従来から存在するREL属性は、RELationの略でリンク元からリンク先への順方向の関係を記述する。また、REV属性は、REVerseの略でリンク先からリンク元へという逆方向の関係を記述する。REL属性やREV属性の値としては、“made”,“parent”,“next”,“previous”などが記述できる。そこで、本実施形態例におけるHTML構文解析部23では、属性REV=“parent”をルート文書では属性book=“section”、その他のHTML文書では属性section=“section”に変換する。また、属性値が“next”や“previous”であるREL属性をルート文書ではbook属性、その他のHTML文書ではsection属性に変換する。同様に、ルート文書における属性REV=“made”を属性book=“made”に変換する。このような変換によって、HTMLのリンクの属性に対する拡張を行うことなく、HTML文書間の本型の論理的構造を記述することが可能となる。
【0056】
以上で、本発明の第三の実施形態例におけるHTML構文解析部23でHTMLのリンクに従来から存在するREL属性、REV属性を本実施形態例で定めた属性に変換する動作が完了する。
【0057】
【発明の効果】
以上説明したように、本発明によれば、HTML文書間に本のような目次、章、節などの論理的構造を付与しようとした場合、その論理的構造に対応した属性を付与することで利用者の認識に頼らないリンクを設定することができるようになる。また、上記したようにして記述されたリンクは、他のリンクと属性の点で区別されており、本の形に整形する際にどのリンクを使って順序づけすれば良いかという情報を計算機で抽出することが簡単になるという効果がある。
【0058】
さらに、本発明によれば、HTML文書間の本型でない論理的構造の記述も損なうことなく本の形に整形し表示することができるため、WWWクライアントと呼ばれる装置に代わって、密な関係をもったHTML文書群を本の形で管理することが可能となり、利用者にとってよりわかりやすい利用法を提供できるようになるという利点もある。
【図面の簡単な説明】
【図1】本発明の第一の実施形態例によって整形された結果の本型の論理的構造をモデル化した図である。
【図2】本発明の第一の実施形態例における論理的構造をリンクに記述するために必要となる属性を示した図である。
【図3】本発明の第一の実施形態例におけるHTML文書間の論理的構造を図に表したものである。
【図4】HTML文書を本発明の第一の実施形態例によって本型に整形した例を示した図である。
【図5】本発明の第一の実施形態例に係るHTML文書本型整形装置の構成を表すブロック図である。
【図6】本発明の第一の実施形態例における本型構造解析部で本型の論理的構造に基づいたHTML文書の並べ替えを行う動作を示すフローチャートである。
【図7】図6に示したステップS1を実行した結果、作成される木の例を示した図である。
【図8】図6に示したステップS2を実行した結果、図8の木より作成される木の例を示した図である。
【図9】図7に示したステップS5の動作例を示した図である。
【図10】図7に示したステップS6の実行結果の例を示した図である。
【図11】本発明の第二の実施形態例におけるHTML文書間の関係を表した図である。
【図12】図11に示したHTML文書間の関係を用いて本発明の第二の実施形態例によって本型に整形した例を示した図である。
【図13】本発明の第二の実施形態例における本型構造解析部で本型の論理的構造に基づいたHTML文書の並べ替えを行う動作を示すフローチャートである。
【図14】本発明の第二の実施形態例において目次文書から本型の論理的構造を木に追加している様子を示した図である。
【符号の説明】
1…本型の論理的構造モデルにおける本
2…本型の論理的構造モデルにおけるまえがき
3…本型の論理的構造モデルにおける目次
4…本型の論理的構造モデルにおける本文
5…本型の論理的構造モデルにおける参考文献目録
6…本型の論理的構造モデルにおける索引
7…本型の論理的構造モデルにおけるその他の内容
8…本型の論理的構造モデルにおける本文中の章
9…本型の論理的構造モデルにおける章中の節
10…本型の論理的構造モデルにおける節中のページ
11…本型の論理的構造モデルにおけるページ中の単語
22…HTML文書取得部
23…HTML構文解析部
24…本型構造解析部
25…部品記憶部
26…構造記憶部
27…本型整形部
28…URI⇔ページ番号対応表
29…表示データ生成部
30…情報表示部
31…mokuji.html
32…book.html
33…目次文書mokuji.html
34…第一章
35…第一章第一節
36…第一章第二節
37…第二章[0001]
TECHNICAL FIELD OF THE INVENTION
According to the present invention, when an HTML (Hyper Text Makeup Language) document such as the WWW (World Wide Web) stored in the Internet is formatted and displayed in a book form that is easy for a user to view, the present invention is applied to an HTML link. The present invention relates to a method and an apparatus for adding an attribute for describing a logical structure of a type, and shaping the book into a book shape using a link with the attribute.
[0002]
[Prior art]
In a conventional apparatus for shaping and displaying an HTML document, particularly an apparatus called a WWW client, one HTML document is displayed per display apparatus. The relationship between the HTML document and another HTML document is expressed using a link, and even if the HTML document has a close relationship with another HTML document as represented by one book, each is independent. Will be managed.
[0003]
In order for the user to recognize a logical structure such as a hierarchy or a context between HTML documents, for example, a table of contents, a chapter, a section, etc., using such a link, the following pages, It is necessary to set a link such as "previous page" and have the user make such a transition.
[0004]
[Problems to be solved by the invention]
In the case of using the conventional technology, even if an attempt is made to add a logical structure such as a table of contents, a chapter, or a section between HTML documents, the user is required to recognize the next page or the previous page, depending on the recognition. Had to set up a proper link. Also, even if links such as "next page" and "previous page" are set, since those links are not distinguished from other links at all, when linking them into a book shape, There was not enough information on whether or not to order using, and it was difficult to process this with a computer.
[0005]
An object of the present invention is to describe a logical structure between HTML documents by adding an attribute capable of describing a logical structure such as a table of contents, a chapter, and a section to a link between the HTML documents, An object of the present invention is to provide a method and an apparatus capable of efficiently formatting and displaying a book by rearranging an HTML document using the information.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the present invention according to claim 1 formats an HTML document described using HTML which is a structure description language for describing information such as hypertext information on the Internet on a tag basis. A method for transitioning from arbitrary information to other information, which is provided with an identifier in an HTML document called a link, and has a logical structure such as a book-type hierarchy and context between a plurality of HTML documents. A first step of interpreting an attribute which is a description, a second step of converting the logical structure into a tree structure using the attribute, and a step of converting the tree structure into a plurality of HTML documents represented by the attribute. A third process of rearranging the HTML document so as not to be inconsistent with the context, and a fourth process of linearly arranging the HTML document based on the rearranged tree structure. A law, the most important feature to be able to shape the HTML document to the type.
[0007]
According to the first aspect of the present invention, a logical structure such as a table of contents, a chapter, and a section can be described in a link between HTML documents. You will be able to describe logical structures. By rearranging the HTML document using the information, it is possible to efficiently shape the document into a book.
[0008]
According to a second aspect of the present invention, in the first aspect, the second step prepares a table of contents document describing a logical structure of a book type between a plurality of HTML documents. In the process of converting the logical structure between HTML documents into a tree structure using the description of the HTML document, by giving only a table of contents document describing the logical structure of the book type between the HTML documents, the description of the table of contents And converting the logical structure between the HTML documents into a tree structure by using the HTML document. It is possible to shape the HTML document into the main form without describing the logical structure of the main form in the HTML document itself. The most important feature.
[0009]
According to the second aspect of the present invention, even if the HTML document itself is described by the conventional technology, only the table of contents document describing the logical structure of the book type between the HTML documents is provided. It becomes possible to describe the logical structure between HTML documents that could not be created. By rearranging the HTML document using the information, it is possible to efficiently shape the document into a book.
[0010]
Further, in the present invention according to
[0011]
According to the third aspect of the present invention, even if the attribute of the link of the HTML is not extended, the logical relationship of the book type such as the hierarchy and the context is determined by using the existing REL attribute or REV attribute. By describing, the logical structure between HTML documents can be described. By rearranging the HTML document using the information, it is possible to efficiently shape the document into a book.
[0012]
Next, in order to achieve the above object, the present invention according to
[0013]
By using the present invention described in
[0014]
According to a fifth aspect of the present invention, in the invention of the fourth aspect, the means for converting the logical structure into a tree structure includes a table of contents document describing a logical structure of a book type between a plurality of HTML documents. As a means for preparing and converting a logical structure between HTML documents into a tree structure based on this, by giving only a table-of-contents document describing a book-type logical structure between HTML documents, the HTML document itself can be converted. The most important feature is that an HTML document can be shaped into a book without describing the logical structure of the book.
[0015]
According to the fifth aspect of the present invention, even if the HTML document itself is described by the conventional technique, only the table of contents document describing the logical structure of the book type between the HTML documents is provided. It becomes possible to describe the logical structure between HTML documents that could not be created. By rearranging the HTML document using the information, it is possible to efficiently shape the document into a book.
[0016]
Further, in the present invention according to
[0017]
According to the sixth aspect of the present invention, even if the attribute of the HTML link is not extended, the logical relationship of the book type such as the hierarchy and the context is determined by using the existing REL attribute or REV attribute. By describing, the logical structure between HTML documents can be described. By rearranging the HTML document using the information, it is possible to efficiently shape the document into a book.
[0018]
Hereinafter, the operation of the present invention will be described.
[0019]
In the present invention according to
[0020]
In the present invention according to
[0021]
In the present invention according to
[0022]
In the present invention according to
[0023]
In the present invention according to
[0024]
In the present invention according to
[0025]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0026]
[First Embodiment]
FIG. 1 is a diagram modeling a book-type logical structure as a result of shaping according to the first embodiment of the present invention.
[0027]
FIG. 2 is a diagram showing attributes necessary for describing the above logical structure in a link in the first embodiment of the present invention. The
[0028]
The value of the
[0029]
An example in which the above-mentioned attribute representing the logical structure in the first embodiment of the present invention is described in a link is shown below.
[0030]
book. html-16
<Head>
<Link book = “made” href = “mailto: kenya@ntt.jp”>
</ Head>
<Body>
<A book="index"href="mokuji.html"> Table of contents </A><p>
<A book=“section” href=“chap.html”>
<A book=“bibliography” href=“bib.html”> References </A><p>
</ Body>
mokuji. html-17
<Body>
<H1> Table of Contents <h1><p>
<A index="refer"href="chap1.html">
<A index=“refer” href=“sec1.html”> First section </A><BR>
<A index="refer"href="sec2.html"> Second section </A>
<P>
<A index="reference"href="chap2.html"> Second chapter </A>
</ Body>
chap1. html-18
<Body>
<H1>
<A section="section"href="sec1.html"> First section </A><p>
<A section="section"href="sec2.html"> Second section </A><p>
</ Body>
sec1. html-19
<Body>
<H2> first section </ h2><p>
This is a test page for book type display. <P>
<A section=“next” href=“sec2.html”> Next section </A><p>
</ Body>
sec2. html-20
<Body>
<H2> Second section </ h2><p>
This is the second section of the book type test page. <P>
<A section=“previous” href=“sec1.html”> previous section </A><p>
</ Body>
bib. html-21
<Body>
<H1> Reference bibliography </ h1><p>
[1]
<A bibliography=“refer” href=“http://www.ntt.jp/”> NTT Home Page <// A><BR>
[2]
<A bibliography=“reference” href=“http://hil.ntt.jp/”> NTT Hammam Interface lab <// A><BR>
</ Body>
The book. The html 16 is an HTML document corresponding to the
[0031]
FIG. 3 illustrates the relationship between the HTML documents described above. A rounded rectangle indicates a portion where a link is described in the HTML document, and an arrow indicates a reference destination of the link. Here, the shaded rounded squares represent references to the outside of the book, and the characters added to the arrows represent the values of the book attribute, section attribute, and index attribute of the link.
[0032]
FIG. 4 is a diagram showing an example in which the above-described HTML document is shaped into a book according to the first embodiment of the present invention. Each HTML document is rearranged in the order of
[0033]
FIG. 5 is a block diagram illustrating a configuration of the HTML document book shaping apparatus according to the first embodiment of the present invention. The HTML
[0034]
As described above, the logical structure between them is described in the HTML document, and the HTML document can be rearranged using the information, and the HTML document can be efficiently shaped into a book form and displayed. Will be able to
[0035]
Next, with reference to the flowchart of FIG. 6, the operation of rearranging the HTML documents based on the logical structure of the book in the book
[0036]
In step S2, among the links having the attributes defined in the present embodiment passed from the HTML
[0037]
In step S3, the reference URIs of the next link and the previous link existing in the tree that are not present in the tree are passed to the HTML
[0038]
In step S4, it is determined whether an unresolved link is included in the tree. The unresolved link is a section link, a next link, or a previous link, and is a link whose reference destination URI is not passed to the HTML
[0039]
In step S5, the nodes at the same level are rearranged with the priority of the next link. The rearrangement is performed by rearranging the nodes at the same level so that the previous link has as little inconsistency as possible, and then rearranging the next link so as to have as little inconsistency as possible. Here, in order to perform the sorting so that there is no inconsistency, it is sufficient to execute the sorting by regarding the relationship by the previous link or the next link as the magnitude relationship of the values.
[0040]
An operation example of step S5 will be described with reference to FIG. In the initial state of step S5, as shown in FIG. 9A, the nodes are arranged in the order of No. 1, No. 2, No. 3, No. 4, No. 5, next link from No. 1 to No. 2, No. 3 from No. 2, It is assumed that the previous link is set to the next link, the next link is set to the third to fourth, and the next link and the previous link are set to the fourth to fifth. In order to rearrange the previous links as much as possible without inconsistency, the
[0041]
In step S6, URIs corresponding to each node are ordered according to the created tree. FIG. 10 is a diagram illustrating an example of the execution result of step S6. By step S5, the tree created as shown in FIG. 10A is made one-dimensional with depth priority, so that the book type can be ordered as shown in FIG. 10B. Also, as shown in the figure, if there are a plurality of nodes having the same URI in the tree, the node that comes after when the tree is shaped into a book is deleted.
[0042]
Thus, the operation of rearranging the HTML documents based on the logical structure of the book in the book
[0043]
[Embodiment 2]
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, the book
[0044]
FIG. 11 is a diagram illustrating a relationship between HTML documents according to the second embodiment. A rounded rectangle indicates a portion where a link is described in the HTML document, and an arrow indicates a reference destination of the link. Here, the shaded rounded squares represent references to the outside of the book, and the characters added to the arrows represent the values of the book attribute, section attribute, and index attribute of the link. The mokuji. html31 is available from book. The logical structure such as the arrangement order of the HTML documents is described here from the
[0045]
The table of contents document mokuji. html31 is shown.
[0046]
mokuji. html ~ 33
<Body>
<H1> Table of Contents <h1><p>
<H1><Aindex="reference"href="chap1.html">
<H2><A index=“reference” href=“sec1.html”> First section </A><h2>
<H2><A index=“refer” href=“sec2.html”> Second section </A><h2>
<P>
<A index="reference"href="chap2.html"> Second chapter </A>
</ Body>
FIG. 12 is a diagram showing an example in which the relationship between the HTML documents shown in FIG. 11 is used to form a book according to the second embodiment of the present invention. Each HTML document is available as mokuji. According to the book-type logical structure described in html33, the model shown in FIG. 1 is arranged in the order of
[0047]
Next, a block diagram showing a configuration of an HTML document book shaping apparatus according to a second embodiment of the present invention is the same as that shown in FIG. Only the data passed to the
[0048]
The operation of the main
[0049]
FIG. 16 is a diagram illustrating a state in which a book-type logical structure is added to a tree from a table of contents document in the second embodiment. From the table of contents document 33, links having the attribute “index =“ refer ”” are set to the
[0050]
In step S8, almost the same operation as in step S3 is performed, and the reference destination URI of the next link and the previous link existing in the tree and not present in the tree are passed to the HTML
[0051]
In step S9, exactly the same operation as in step S5 is performed, and the nodes of the same level are rearranged with the priority of the next link. When the rearrangement has been performed for all nodes existing in the tree, the process proceeds to step S10.
[0052]
In step S10, exactly the same operation as in step S6 is performed, the URIs corresponding to the respective nodes are ordered according to the created tree, and when there are a plurality of nodes having the same URI in the tree, the tree is shaped into a book. When deleting nodes that come behind.
[0053]
Thus, the operation of rearranging the HTML documents based on the logical structure of the book in the book
[0054]
[Embodiment 3]
Finally, a third embodiment of the present invention will be described in detail. In the present embodiment, only the operation of the
[0055]
The REL attribute conventionally existing in HTML links is an abbreviation of RElation, and describes a forward relationship from a link source to a link destination. The REV attribute is an abbreviation of REVerse and describes a reverse relationship from a link destination to a link source. As a value of the REL attribute or the REV attribute, "made", "parent", "next", "previous", and the like can be described. Therefore, the HTML
[0056]
With the above, the operation of converting the REL attribute and the REV attribute conventionally existing in the HTML link into the attributes defined in the present embodiment by the HTML
[0057]
【The invention's effect】
As described above, according to the present invention, when a logical structure such as a table of contents, a chapter, or a section is to be provided between HTML documents, an attribute corresponding to the logical structure is provided. It is possible to set links that do not rely on user recognition. Also, the links described as above are distinguished from other links in terms of attributes, and the computer extracts information on which link to use and order when shaping it into a book shape This has the effect of simplifying the process.
[0058]
Further, according to the present invention, the description of a non-book type logical structure between HTML documents can be formed and displayed in the form of a book without losing any information. Therefore, a close relationship is established instead of a device called a WWW client. This makes it possible to manage a group of HTML documents in the form of a book, thereby providing an advantage that a user can use the method more easily.
[Brief description of the drawings]
FIG. 1 is a diagram modeling a book-like logical structure as a result of shaping according to a first embodiment of the present invention.
FIG. 2 is a diagram showing attributes necessary for describing a logical structure in a link according to the first embodiment of the present invention.
FIG. 3 is a diagram illustrating a logical structure between HTML documents according to the first embodiment of the present invention.
FIG. 4 is a diagram showing an example in which an HTML document is shaped into a book according to the first embodiment of the present invention.
FIG. 5 is a block diagram illustrating a configuration of an HTML document book type shaping apparatus according to the first embodiment of the present invention.
FIG. 6 is a flowchart showing an operation of reordering an HTML document based on a logical structure of a book in a book structure analyzer in the first embodiment of the present invention.
FIG. 7 is a diagram showing an example of a tree created as a result of executing step S1 shown in FIG. 6;
FIG. 8 is a diagram showing an example of a tree created from the tree of FIG. 8 as a result of executing step S2 shown in FIG. 6;
FIG. 9 is a diagram illustrating an operation example of step S5 illustrated in FIG. 7;
FIG. 10 is a diagram illustrating an example of an execution result of step S6 illustrated in FIG. 7;
FIG. 11 is a diagram illustrating a relationship between HTML documents according to the second embodiment of the present invention.
FIG. 12 is a diagram showing an example in which the relationship between the HTML documents shown in FIG. 11 is used to shape the book according to the second embodiment of the present invention.
FIG. 13 is a flowchart illustrating an operation of rearranging an HTML document based on a logical structure of a book in a book structure analyzer according to the second embodiment of the present invention.
FIG. 14 is a diagram showing a state in which a book-type logical structure is added to a tree from a table of contents document in the second embodiment of the present invention.
[Explanation of symbols]
1… Book in book type logical structure model
2. Introduction to this type of logical structure model
3. Table of contents in this type of logical structure model
4. The text in the book-type logical structure model
5 Reference bibliography in this type of logical structure model
6 Index in book type logical structure model
7: Other contents in this type of logical structure model
8 ... Chapters in the main text of this type of logical structure model
9: Sections in chapters in this type of logical structure model
10 ... Pages in the clauses of this type of logical structure model
11 ... Words in a page in this type of logical structure model
22 HTML document acquisition unit
23 HTML parsing unit
24… Structural analysis unit
25: Parts storage unit
26 ... Structure storage unit
27… Book type shaping part
28 ... URI page number correspondence table
29: Display data generator
30 ... Information display section
31. mokuji. html
32 ... book. html
33 ... table of contents document mokuji. html
34 ...
35 ...
36 ...
37.
Claims (6)
任意の情報から他の情報に遷移するための、リンクと呼ばれるHTML文書内にある識別子に与えられた、複数のHTML文書間の本型の階層や前後関係といった論理的構造の記述である属性を解釈する第一の過程と、
該属性を用いて該論理的構造を木構造に変換する第二の過程と、
該木構造を該属性で表現された複数のHTML文書間の前後関係と矛盾の無いように並べ替える第三の過程と、
該並べ替えられた木構造を基にHTML文書を線形に並べる第四の過程と、
から成ることを特徴とするHTML文書本型整形方法。A method of formatting an HTML document described using HTML, which is a structure description language for describing information such as hypertext information on the Internet on a tag basis,
An attribute, which is a description of a logical structure such as a book-type hierarchy and a context between a plurality of HTML documents, given to an identifier in a HTML document called a link for transition from arbitrary information to other information. The first process of interpreting,
A second step of converting the logical structure into a tree structure using the attribute;
A third process of rearranging the tree structure so as not to be inconsistent with the context between a plurality of HTML documents represented by the attribute;
A fourth process of linearly arranging the HTML documents based on the rearranged tree structure;
An HTML document book type shaping method characterized by comprising:
ことを特徴とする請求項1に記載のHTML文書本型整形方法。The second step is a step of preparing a table of contents document describing a book-type logical structure between a plurality of HTML documents, and converting the logical structure between the HTML documents into a tree structure using the description of the table of contents document. Is,
2. The HTML document book type shaping method according to claim 1, wherein:
ことを特徴とする請求項1または請求項2に記載のHTML文書本型整形方法。If the logical structure between a plurality of HTML documents is described by a REL attribute that expresses a forward relationship where the link exists and a REV attribute that expresses a reverse relationship, this logical structure is used as a main type. Having a step of converting to a description of the logical structure of the first step before the first step,
The HTML document book type shaping method according to claim 1 or 2, wherein:
HTMLを用いて記述されたHTML文書を本型の構造に整形する手段と、本型の構造を画面上に本の形で表示する手段とを備えた装置において、
HTML文書間の本型の階層や前後関係といった論理的構造の記述である属性を解釈する手段と、
該属性を用いて該論理的構造を木構造に変換する手段と、
該木構造を該属性で表現された複数のHTML文書間の前後関係と矛盾の無いように並べ替える手段と、
該並べ替えられた木構造を基にHTML文書を線形に並べる手段と、
を備えることを特徴とするHTML文書本型整形装置。An apparatus for formatting an HTML document described using HTML which is a structure description language for describing information such as hypertext information on the Internet on a tag basis,
An apparatus comprising: means for shaping an HTML document described using HTML into a book-type structure; and means for displaying the book-type structure in a book form on a screen.
Means for interpreting an attribute which is a description of a logical structure such as a book hierarchy or a context between HTML documents;
Means for converting the logical structure into a tree structure using the attribute;
Means for rearranging the tree structure so as not to be inconsistent with the context between a plurality of HTML documents represented by the attribute;
Means for linearly arranging HTML documents based on the rearranged tree structure;
An HTML document book-type shaping device comprising:
ことを特徴とする請求項4に記載のHTML文書本型整形装置。The means for converting the logical structure into a tree structure includes preparing a table of contents document describing a book-type logical structure between a plurality of HTML documents, and converting the logical structure between the HTML documents into a tree structure based on the table. Means to
The HTML document book-type shaping apparatus according to claim 4, wherein:
請求項4、請求項5に記載のHTML文書本型整形装置。When a logical structure between a plurality of HTML documents is described by a REL attribute that expresses a forward relationship existing in a link and a REV attribute that expresses a reverse relationship, this logical structure is defined as a main type. Characterized by newly providing means for converting to a description of a logical structure,
The HTML document book shaping device according to claim 4 or claim 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8698996A JP3597940B2 (en) | 1996-04-10 | 1996-04-10 | HTML document book type shaping method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8698996A JP3597940B2 (en) | 1996-04-10 | 1996-04-10 | HTML document book type shaping method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH09282218A JPH09282218A (en) | 1997-10-31 |
JP3597940B2 true JP3597940B2 (en) | 2004-12-08 |
Family
ID=13902286
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8698996A Expired - Fee Related JP3597940B2 (en) | 1996-04-10 | 1996-04-10 | HTML document book type shaping method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3597940B2 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8073695B1 (en) | 1992-12-09 | 2011-12-06 | Adrea, LLC | Electronic book with voice emulation features |
US7401286B1 (en) * | 1993-12-02 | 2008-07-15 | Discovery Communications, Inc. | Electronic book electronic links |
JP3370507B2 (en) * | 1996-03-29 | 2003-01-27 | 日本電信電話株式会社 | Client in structured information display system |
JP2000067069A (en) * | 1998-08-21 | 2000-03-03 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for managing link and record medium recorded with link managing program |
JP3674327B2 (en) * | 1998-09-02 | 2005-07-20 | 日本電信電話株式会社 | Multimedia information conversion method, multimedia information conversion server, multimedia information conversion system, and storage medium storing multimedia information conversion program |
JP2006091994A (en) * | 2004-09-21 | 2006-04-06 | Toshiba Corp | Device, method and program for processing document information |
JP5713855B2 (en) | 2011-09-22 | 2015-05-07 | 株式会社ソニー・コンピュータエンタテインメント | Information processing apparatus, information processing method, and data structure of content file |
JP5674704B2 (en) * | 2012-04-03 | 2015-02-25 | ヤフー株式会社 | Information processing apparatus, method, computer program, and system |
-
1996
- 1996-04-10 JP JP8698996A patent/JP3597940B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH09282218A (en) | 1997-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7707139B2 (en) | Method and apparatus for searching and displaying structured document | |
US20030018646A1 (en) | Production and preprocessing system for data mining | |
WO2006046523A1 (en) | Document analysis system and document adaptation system | |
JPH07319917A (en) | Document data base managing device and document data base system | |
JP3597940B2 (en) | HTML document book type shaping method and apparatus | |
US7325189B2 (en) | Web screen creation method, program and server | |
JP3832693B2 (en) | Structured document search and display method and apparatus | |
JPH10124518A (en) | Preferential access web blousing processor | |
JP2007115276A (en) | Content data generation processing program and content data generation processing program recording medium | |
CN112182310B (en) | Method for realizing built-in real-time search general tree-shaped component | |
CN113343140B (en) | Method for automatically extracting webpage text content based on neo4j graphic database | |
JP3842576B2 (en) | Structured document editing method and structured document editing system | |
JP2002169836A (en) | Support system for integration and rearrangement of information | |
JP3961993B2 (en) | Document conversion apparatus and document conversion method | |
Pazienza et al. | Semi-automatic generation of GUIs for RDF browsing | |
JP2004118543A (en) | Method for retrieving structured document, and method, device and program for supporting retrieval | |
Tunçer et al. | Modeling building project information | |
Czuchra | Oryx-Embedding Business Process Data Into the Web | |
Niccolucci et al. | Managing Full-text Excavation Data with Semantic Tools. | |
JP2004310249A (en) | Retrieval method, retrieval device and program of xml data, and storage medium recording the program | |
Jordal et al. | Was it worth it? Experiences with a CIDOC CRM-based database | |
JPH1145251A (en) | Information analysis support device for using retrieval function and computer readable recording medium for recording program for making computer function as the same device | |
JP2006011549A (en) | Structured document conversion device and program | |
Pavlov | XEDITMAN: A XML Editor for Manuscript Descriptions and its Implementation for Cataloguing of Bulgarian Manuscripts | |
JPH09297760A (en) | Document preparation supporting device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20040907 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040910 |
|
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: 20070917 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080917 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080917 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090917 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |