JP2004038334A - Operation position storage method, structured document display method, structured document display device, program, and operation position storage data - Google Patents
Operation position storage method, structured document display method, structured document display device, program, and operation position storage data Download PDFInfo
- Publication number
- JP2004038334A JP2004038334A JP2002191406A JP2002191406A JP2004038334A JP 2004038334 A JP2004038334 A JP 2004038334A JP 2002191406 A JP2002191406 A JP 2002191406A JP 2002191406 A JP2002191406 A JP 2002191406A JP 2004038334 A JP2004038334 A JP 2004038334A
- Authority
- JP
- Japan
- Prior art keywords
- document
- structured document
- structured
- display
- stored
- 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.)
- Granted
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
【課題】XML文書などの第1の構造化文書を、XSLT文書などの第2の構造化文書を用いてHTML文書などの第3の構造化文書に変換して表示する場合、表示された要素に対しなされた操作内容が、第1の構造化文書や第2の構造化文書を更新した後であっても、再び変換を行って表示する際には、同じ要素に対し再現することができる操作位置記憶方法、構造化文書表示方法、構造化文書表示装置、およびプログラムを提供する。
【解決手段】表示手段で表示された第3の構造化文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた第1の構造化文書の要素と第2の構造化文書の要素のそれぞれが格納されている記憶空間上の位置情報で記憶し、この位置情報をユーザによりなされた操作内容を再現する際に利用する。
【選択図】 図1When a first structured document such as an XML document is converted into a third structured document such as an HTML document using a second structured document such as an XSLT document and displayed, the displayed element is displayed. Even if the content of the operation performed after updating the first structured document or the second structured document, the same element can be reproduced when converted and displayed again. Provided are an operation position storage method, a structured document display method, a structured document display device, and a program.
A position of an operation target element operated by a user among elements of a third structured document displayed on a display unit is determined by a first structured document used when the element is generated. And the second structured document are stored as position information in the storage space in which each of the elements is stored, and this position information is used when reproducing the operation contents performed by the user.
[Selection diagram] Fig. 1
Description
【0001】
【発明の属する技術分野】
本発明は、例えば、XML文書などの構造化文書をXSLT文書などのスタイルシートを用いて変換し表示する場合に、表示された要素に対しなされた操作内容が、XML文書やXSLT文書を更新した後に、再び変換を行って表示する際にも同じ要素に対し再現可能にするための表示方法およびそれを用いた表示装置に関する。
【0002】
【従来の技術】
近年、インターネット技術、とくにWeb技術は普及し、HTMLでかかれた文書はOSやWebブラウザの種類にかかわらず、どこでも閲覧できるようになった。そして、HTML文書では、文章とスタイル情報(フォントサイズ、色、テーブルの幅などの画面への表示の仕方に関係する情報)が混在しており、また、文章中のテキストを囲うタグは画面上での構造に関する情報しかもてないため、HTML文書の内容は計算機で利用する情報としては活用しづらかった。
【0003】
このため、テキストを意味を持たせたタグで囲い構造化する技術である、構造化文書技術のひとつとして、XML(Extensible Markup Language)が標準化され、広く使われるようになった(XMLの規格については例えば http://www.w3.org/TR/REC−xml に詳しい)。
【0004】
一方、XML文書そのものは人間にとって読みづらいため、スタイル情報を追加するなどしたHTML文書に変換し、見やすい形に整形した上でWebブラウザ上で閲覧するスタイル技術の一つとして、XSLT(Extensible Stylesheet Langage Trasformations)が開発され、そして標準化された(XSLTの規格については例えば http://www.w3.org/TR/xslt に詳しい)。
【0005】
XSLTは、XMLでかかれたXML文書を変換するためのプログラム言語であり、XSLTでかかれたXSLT文書を実行し、XML文書を変換するプログラムはXSLTプロセッサと呼ばれ、そして、XSLTプロセッサを内蔵したWebブラウザが現在普及しつつある。
【0006】
また、プログラム言語から表示されたHTML文書を操作する技術である、DHTML(Dynamic HTML)は、マウス操作に応じて変化する動的なWebページを作成するなどに一般的に用いられている。
【0007】
DHTMLでは、HTML文書をツリー構造のデータ構造として表現し、HTML文書のテキスト、要素、属性などをツリーのノードとして、要素の入れ子関係をノードの親子関係として表現し、プログラムからノードを生成する、ノードの値を変更するなどを行える。
【0008】
なお、DHTMLはHTML文書を対象としたものであるが、これをXML文書を対象に汎用化した DOM(Document Object Model)が標準化されている(DOM、DHTMLについては例えば http://www.w3.org/DOM/に詳しい)。
【0009】
DHTMLを用いることで、例えば、HTML文書のある部分の表示/非表示を切替えたり、色を変更したり、あるHTML文書の画面要素周りに選択枠を表示したりなどといったことが可能になる。
【0010】
HTMLだけでは、静的なWebページしか作ることはできないが、DHTMLを用いれば、動的なWebページを作ることができ、例えば、段落はあらかじめ隠し、見出しだけを表示しておき、見出し部分をマウスでクリックされると段落を見出しの下に表示するWebページや、あるいは、マウスポインタがある文字列上に来るとメニューを表示するWebページなどを作ることに用いられている。
【0011】
しかしながら、上記のような従来技術では、XML文書の表示手段としては、以下に述べるような問題点があった。
【0012】
すなわち、XML文書は任意のXSLT文書でHTML文書に変換してから表示するため、XML文書を一部でも変更すると、XSLTで変換を再び行うことにより、HTML文書全体が更新されてしまう。すなわち、この再変換で出力される更新されたHTML文書は最初に変換出力されたHTML文書とは別のHTML文書になってしまうので、再変換前のHTML文書と再変換後のHTML文書との間では、各ノードの対応関係がわからなくなる。このため、例えば、HTML文書上であるノードを選択する機能を用いて、再変換前のHTML文書中にあるノードを選択状態にしておいても、再変換後では、当該ノードに当該選択状態を保持しておくことはできなかった。これは、再変換が行われたときに、再変換前に選択状態であったノードに対応するノードが再変換後のHTML文書に出力されていても、そのノードが選択状態であった元のノードと同じものであることが分からないからである。
【0013】
また、同様の理由で、XML文書を変換することにより出力されたHTML文書の一部分を非表示にする、テーブルの幅を変更するなどのDHTMLを用いた操作を行っても、再変換後には、どのノードに、DHTML操作を適用したのか分からなくなるので、例えば、再変換前に非表示にしたところが再変換後には表示されてしまう、再変換前にテーブルの幅を変更したのに再変換後には元に戻ってしまうなどといった問題が起こる。
【0014】
これに対して、例えば、選択状態にするなどの操作を、HTML文書中のノードではなく、XML文書中のノードに対してなされたものとして記憶する方法が考えられる。同様の方法は、あるデータを画面データに変換して表示するHTMLエディタやアウトラインエディタなどでも用いられている。この場合、変換前のデータのノード位置を記憶する。
【0015】
しかしながら、XSLTでは、XML文書中のノードが複数のHTML文書ノードに変換されることがあるため、HTML文書中で1つのノードを選択状態にした場合に、上記手法を用いて、XML文書中で当該選択状態に操作されたノードを保持したとしても、当該XSLTを用いて再変換した場合には、再変換後のHTML文書中で、複数のノードが選択状態になってしまう場合があり、特定の画面上の表示部分を特定することはできない。
【0016】
なお、HTMLエディタやワードプロセッサなどで、目次を本文と別に同時に表示し、かつ、目次の見出しを折り畳んで表示/非表示を切替えるものもあるが、この場合は、目次と本文の2箇所に見出しを表示していることを前提にプログラムは組まれており、目次に表示されている見出しを折り畳んだと記憶することで本文と区別を可能にしている。しかしながら、XML文書をXSLTで変換して表示する装置においては、変換規則であるXSLT文書は表示プログラムにはあらかじめ与えられておらず、XML文書のノードが何箇所に出力されるかをあらかじめプログラムしておくことはできないため、上述の方法を用いることはできなかった。
【0017】
また、XSLTに埋め込まれたノードや文字列も、例えばテーブルの行頭に同じ文字列を表示するなど、何箇所に出力されるかあらかじめ決めておくことができないため、選択させることができなかった。
【0018】
【発明が解決しようとする課題】
このように、XML文書などの構造化文書を、スタイルシートを用いてHTML文書などの他の構造化文書に変換して表示する場合、表示された要素に対しなされた操作内容が、XML文書やスタイルシートを更新した後に、再び変換を行って表示する際には、同じ要素に対し再現することができないという問題点があった。
【0019】
そこで、本発明は、上記問題点に鑑み、XML文書などの構造化文書を、スタイルシートを用いてHTML文書などの他の構造化文書に変換して表示する場合、表示された要素に対しなされた操作内容が、XML文書やスタイルシートを更新した後であっても、再び変換を行って表示する際には、同じ要素に対し再現することができる操作位置記憶方法、それを用いた構造化文書表示方法、構造化文書表示装置、およびプログラムを提供することを目的とする。
【0020】
【課題を解決するための手段】
本発明は、記憶手段と、複数の要素から構成された文書構造を有する構造化文書としての第1の構造化文書(例えば、XML文書)を、当該第1の構造化文書を表示用の前記構造化文書に変換するための変換規則を記述した第2の構造化文書(例えば、XSLT文書)を用いて変換することにより第3の構造化文書(例えば、HTML文書)を得、この第3の構造化文書に基づき表示を行う表示手段とを具備する構造化文書表示装置において、前記表示手段で表示された前記第3の構造化文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の構造化文書の要素の位置情報と前記第2の構造化文書の要素の位置情報とで前記記憶手段に記憶し、前記第1の構造化文書あるいは前記第2の構造化文書を更新した後に再び前記変換を行って表示する際に、前記操作対象の要素に対しなされた操作内容を再現するために、前記記憶手段に記憶された前記位置情報を利用することを特徴とする。
【0021】
本発明によれば、XML文書などの構造化文書を、スタイルシートを用いてHTML文書などの他の構造化文書に変換して表示する場合、表示された要素に対しなされた操作内容が、XML文書やスタイルシートを更新した後であっても、再び変換を行って表示する際には、同じ要素に対し再現することができる。
【0022】
好ましくは、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の構造化文書の要素と前記第2の構造化文書の要素のそれぞれが格納されている記憶空間上の位置情報で記憶する。
【0023】
また、好ましくは、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の構造化文書の要素と前記第2の構造化文書の要素のそれぞれの前記文書構造上の位置情報で記憶し、前記第1の構造化文書と前記第2の構造化文書のうち少なくとも一方の文書構造が更新されたときには、この更新内容に応じて、前記操作対象の要素の位置として記憶された、前記第1の構造化文書の要素と前記第2の構造化文書の要素の前記文書構造上の位置情報を補正する。
【0024】
【発明の実施形態】
以下、本発明の実施形態について、図面を参照して説明する。
【0025】
図1は、本発明の一実施形態にかかる構造化文書表示装置として、構造化文書としての例えばXML文書を表示するためのXML文書表示装置の構成例を示したものである。図1に示したXML文書は、大きく分けて、データ入力部1、データ更新部2、表示部3、入力部4、制御部5からなり、データ入力部1から入力したXML文書を、同じく、データ入力部1から入力したスタイルシートとしての例えばXSLT文書を用いて表示データに変換し表示するものである。
【0026】
表示部3は、ディスプレイなどの表示装置に表示データを表示するためのものである。例えば、コンピュータのディスプレイには接続インターフェースを介して接続し、制御ソフトウエアを介して表示するが、より典型的な例としては、Webブラウザを介してディスプレイに表示する形態もある。
【0027】
入力部4は、表示部3でディスプレイに表示された画面イメージに対して、選択や操作を行うためのものであり、例えば、テキストを入力するためのキーボードや、データやメニュー、その他の表示物を指定するポインティングデバイスなどの物理的なデバイスの他に、画面上に表示されたソフトウエアキーボードをポインティングデバイスで指定する形態や、ユーザを介さないプログラムだけの形態もある。また、より典型的な例として、Webブラウザのプログラムを介して、キーボードやポインティングデバイスからの情報を受け取る場合もある。
【0028】
なお、これらは同時に備える必要は無い。
【0029】
データ入力部1は、外部のデータ記憶装置からXML文書データとXSLT文書データを読み出して、それらを制御部5内のXML文書記憶部11、XSLT文書記憶部12のそれぞれに送る。
【0030】
外部のデータ記憶装置が、ハードディスクや半導体メモリ等のデバイスの場合、データ入力部1は、これらデバイスの接続インターフェースと制御ソフトウエアの組合せの形態をとる。また、外部のデータ記憶装置がネットワークを介して接続された計算機上に配置される場合、データ入力部1はネットワーク接続装置と通信ソフトウエアの組合せの形態をとる。また、外部のデータ記憶装置のより典型的な例としては、ネットワークで接続された計算機上のWebサーバがある。
【0031】
データ更新部2は、編集機能などを実現するプログラムなどであり、制御部5のXML文書記憶部11、XSLT文書記憶部12に保持しているXML文書とXSLT文書を更新する。XML文書やXSLT文書をDOM(document object model)を用いて更新するプログラムであればなんでもよく、例えば、Webブラウザ上のスクリプトなどでもよい。また、DOMそのものを用いていなくても、DOM操作に相当する操作を取り出すことが可能であればそれでもよい。
【0032】
なお、表示部3と入力部4のみ、あるいは、表示部3と入力部4とデータ更新部2を、Webブラウザを用いて、ネットワークで接続された別の計算機上に配置してもよい。
【0033】
また、データ更新部2のみを、ネットワークで接続された別の計算機上に配置してもよい。
【0034】
なお、ネットワークは、有線ネットワークであっても、無線ネットワークであっても、有線の部分と無線の部分とを含むネットワークであっても良い。また、ネットワークは、インターネットであってもよいし、家庭網や企業ネットワークであってもよいし、通信事業者網であっても良いし、Webサーバがインターネット上にあり、WebブラウザがLAN上にあるようなものであってもよい。
【0035】
また、Webブラウザが配置された計算機は、1台でも、同様の計算機が複数台あってもかまわない。
【0036】
また、図1に示した構成のXML文書表示装置は、計算機(例えば、コンピュータ)上で実現されてもよいが、CPUを内蔵する携帯電話端末やPDA(personal digital assistant)やネットワーク家電であってもかまわない。
【0037】
また、図1に示したXML文書表示装置は、XML文書などの構造化文書をディスプレイなどの表示手段で示するために、当該XML文書をXSLT文書などのスタイルシートを用いて表示用の他の構造化文書しての例えばHTML文書に変換し、この他の構造化文書に基づき表示を行い、表示手段で表示された他の構造化文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられたXML文書の要素とXSLT文書の要素の位置で記憶し、この記憶内容を前記ユーザによる操作を再現するために利用するプログラムをコンピュータ(計算機)に実行させることにより実現することもできる。
【0038】
また、図1に示した構成のXML文書表示装置を複数用意し、1つ目のXML文書表示装置の表示部3は、ディスプレイなどの物理的なデバイスではなく、2つ目のXML文書表示装置のデータ入力部12にXML文書データを出力するソフトウエアであってもよい。
【0039】
さて、制御部5では、データ入力部1から、処理対象のXML文書と、当該XML文書を表示データとしての他の構造化文書(例えばHTML文書)に変換するための変換規則が記述されたXSLT文書を受け取り、当該XML文書を当該XSLT文書を用いて表示データに変換する。
【0040】
表示データとしての他の構造化文書としては、例えば、HTML(HyperText Markup Language)文書が挙げられるが、その他に、各種XML文書、例えば、XHTML(The Extensible Hyper Text Markup Language)文書、SVG(Standard Vector Graphics)文書、MathML(Mathematical Markup Language)文書、他のXML文書(例えば元のXML文書に修飾を加えたもの)や、これらを組み合わせたXML文書などがある。
【0041】
表示データとしての構造化文書として、どのようなものを使用するかについては、表示部3、例えばWebブラウザがどのような構造化文書をサポートしているかに依存する。
【0042】
なお、XHTMLの規格については例えば、 http://www.w3.org/TR/xhtml1に、SVGの規格については例えば http://www.w3.org/TR/SVG に、MathMLの規格については例えば http://www.w3.org/TR/REC−MathML にそれぞれ詳しい。
【0043】
以下では、表示データとしての構造化文書として、HTML文書を用いるものとして説明する。
【0044】
ここで、図5に、以下の説明で用いるXML文書の一例を、図6にXSLT文書の一例を、図7にHTML文書の一例をそれぞれ示し、図8には、図7に示したHTML文書を表示部3で表示した場合(ブラウザ上で閲覧した場合)の画面表示例を示す。
【0045】
DHTMLやDOMは、構造化文書の階層的な文書構造をツリー構造として表し、構造化文書を構成する要素(構成要素名(タグ)や構成要素のもつ値としてのテキストデータや属性など)を当該ツリー構造上のノードとして表したツリー形式のデータ構造で表現し、構造化文書の各要素を当該ツリー状のデータ構造のノードとして、プログラムからアクセス可能にする技術である。以下、HTML文書とXML文書を区別せず、ツリー状のデータ構造として表現された構造化文書を「DOMツリー」と呼び、構造化文書の各要素を「ノード」あるいは「DOMノード」と呼ぶことがある。
【0046】
図9は、図5のXML文書に対応するDOMツリーの一例を、図10に図6のXSLT文書に対応するDOMツリーの一例を、図11に図7のHTML文書に対応するDOMツリーの一例をそれぞれ示す。なお、図9〜図11に示したDOMツリーでは、構成要素名に対応するノードを四角で囲み、構成要素のもつ値としてのテキストデータに対応するノードを長円で囲み表している。属性に対応するノードは、説明の簡単のため、省略している。
【0047】
DOMツリーにおけるノード(要素)は、HTML文書中やXML文書中の、構成要素名や、その値としてのテキストデータ、属性などに対応する。
【0048】
構成要素とは、構造化文書中でタグで囲まれた部分であり、「タグ」には、「開始タグ」と「終了タグ」があり、タグで囲まれた部分とは、開始タグから、それに対応する終了タグまでの部分を指す。開始タグは、例えば、図5中の<book>や図7中の<TABLE>などがあり、終了タグは、タグ名の前にスラッシュ「/」のある、例えば、図5中の</book>や図7中の</TABLE>などがある。構成要素は階層構造をもつことができる。
【0049】
「属性」とは構成要素に付帯した、名前と値の組みで、開始タグ内部に、「名前=値」の形で記述される。例えば図6中の<xsl:template>開始タグに含まれる「select=“book”」などとがある。
【0050】
XML文書では開始タグと終了タグの間になにも含まれない場合(属性はあってもよい)には、例えば、図5中の<xsl:value−of/>などのように、タグ名をスラッシュ「/」で終了させ、終了タグを省略する表記法が許されている。
【0051】
なお、以上の表記法は、XMLの規格書で定められていることである。
【0052】
ここでは、図9〜図11に示したDOMツリーにおいて、各ノードは、各DOMツリーの階層構造に従って、当該ノードのツリー構造上の位置情報で識別する。
【0053】
例えば、図9に示したXML文書のDOMツリーにおいて、第4階層にあるノードX7の位置情報は「1−1−2−1」であり、これは、第1階層のノードX1から、当該ノードX7に至る各階層毎のノード位置(番号)をハイフン「−」で繋げて表したものである。
【0054】
ノードX7の位置情報「1−1−2−1」は、第1階層の1番目のノード(<booklist>)X1の、1番目の子ノード(<book>)X2の、2番目の子ノード(<author>)X6の、1番目のテキストノード(「紫式部」)X7を指すことを意味する。
【0055】
なお、DOMノードは、主記憶のメモリ空間上、ツリー構造としてデータが配置されている必要は無く、仮想的にツリー形式のデータとしてアクセスできればよい。
【0056】
実際には、DOMノードは、計算機の主記憶上に格納され、この場合、主記憶のメモリ空間上のアドレスで各DOMノードを識別、参照することが可能である。
【0057】
後述するように、データ入力部1から入力されたXML文書のDOMツリーは、図1のXML文書記憶部11に格納され、データ入力部1から入力されたXSLT文書のDOMツリーは、図1のXSLT文書記憶部12に格納される。従って、XML文書記憶部11に格納されているXML文書の各DOMノードは、XML文書記憶部11に割り当てられたメモリ空間上のアドレスにて識別(特定)される。同様に、XSLT文書記憶部12に格納されているXSLT文書の各DOMノードは、XSLT文書記憶部12に割り当てられたメモリ空間上のアドレスにて識別(特定)される。
【0058】
また、同様にして、表示データ記憶部15に格納される表示データとしての例えば、HTML文書の各DOMノードも、表示データ記憶部15に割り当てられたメモリ空間上のアドレスにて識別(特定)することができる。
【0059】
次に、図1の制御部5について説明する。
【0060】
制御部5は、XML文書記憶部11、XSLT文書記憶部12、XSLT変換処理部13、対応関係記憶部14、表示データ記憶部15、表示データ操作部16、表示データ操作ログ記憶部17,表示ログ再適用部18から構成されている。
【0061】
以下、図3、図4に示すフローチャートを参照しながら、制御部5の構成とその動作について説明する。
【0062】
XML文書記憶部11は、データ入力部1から入力されたXML文書を取得し、DOMツリーとして保持する(ステップS1、ステップS2)。例えば、図5に示したXML文書は、図9に示したようなDOMツリーとして保持される。XML文書記憶部11に記憶されたXML文書は、データ更新部2から、例えば、ノードの追加や削除、(ノードの削除、移動を連続して行う操作である)ノードの移動、ノードの属性値を変更したり、テキストデータを変更したりなどといった操作で更新され得る。
【0063】
同様に、XSLT文書記憶部12は、データ入力部1から入力されたXSLT文書を取得し、DOMツリーとして保持する(ステップS1、ステップS2)。例えば、図6に示したXSLT文書は、図10に示したようなDOMツリーとして保持される。XML文書と同様に、XSLT文書記憶部12に記憶されたXSLT文書は、データ更新部2から、例えば、ノードの追加や削除、(ノードの削除、移動を連続して行う操作である)ノードの移動、ノードの属性値を変更したり、テキストデータを変更したりなどといった操作で更新され得る。
【0064】
図12は、XML文書記憶部11におけるXML文書の記憶例を模式的に示したもので、ここでは、図5に示したXML文書の記憶例を示している。
【0065】
図12に示したように、XML文書を構成する(DOMツリーの各ノードに対応する)各要素は、XML文書記憶部11に割り当てられた記憶空間(例えばここではメモリ空間)内に格納される。各要素は、当該メモリ空間内に(例えば入力される)順番に格納されて、その格納領域のアドレスにより、各要素を識別することができる。なお、図12では、説明の簡単のため、各ノードに付した符号をアドレスとして表している。
【0066】
DOMツリーにおけるノードとノードを結ぶ矢印に対応する、要素と要素との間の関係付けは、ポインタにより表されている。図12では、各要素の格納領域には、それぞれに対応するポインタ情報の格納領域が設けられており、ここには、当該要素に、当該要素に結びつけるべき(例えば、子要素としての)他の要素があるときには、その他の要素の格納されているメモリ空間上の領域のアドレスがポインタ情報として格納される。
【0067】
例えば、図9に示したDOMツリーにおいて、第1階層の要素X1(「booklist」)には、2つの子要素(子ノード)X2、X3が存在するが、この場合、図12に示したように、XML文書格納部11では、要素「booklist」の格納位置に対応するポインタ情報の格納領域には、ノードX2、X3の格納されている格納領域のアドレス「X2」、「X3」が格納されている。
【0068】
図13は、XSLT文書記憶部12におけるXSLT文書の記憶例を模式的に示したもので、ここでは、図6に示したXSLT文書の記憶例を示している。
【0069】
XML文書記憶部11と同様に、図13に示したように、XSLT文書を構成する(DOMツリーの各ノードに対応する)各要素は、XSLT文書記憶部11に割り当てられたメモリ空間内に格納され、各要素は、当該メモリ空間内に(例えば入力される)順番に格納されて、その格納領域のアドレスにより、各要素を識別することができる。なお、図13では、説明の簡単のため、各ノードに付した符号をアドレスとして表している。
【0070】
DOMツリーにおけるノードとノードを結ぶ矢印に対応する、要素と要素との間の関係付けは、ポインタにより表されている。図13では、各要素の格納領域には、それぞれに対応するポインタ情報の格納領域が設けられており、ここには、当該要素に、当該要素に結びつけるべき(例えば、子要素としての)他の要素があるときには、その他の要素の格納されているメモリ空間上の領域のアドレスがポインタ情報として格納される。
【0071】
XSLT変換処理部13は、XML文書記憶部11に記憶されているXML文書を、XSLT文書記憶部12に記憶されているXSLT文書に従って、別の構造化文書、例えばHTML文書に変換し、表示データ記憶部15に格納する(ステップS3)。この変換処理の際には、処理対象のXML文書とXSLT文書とHTML文書について、互いに対応関係にあるノードの位置情報を、対応関係記憶データとして対応関係記憶部14に格納する(ステップS4)。
【0072】
例えば、図5に示したXML文書(そのDOMツリーについては図9参照)を図6に示したXSLT文書(そのDOMツリーについては図10参照)を用いて変換した結果得られるHTML文書を図7に示す。図7に示したHTML文書のDOMツリーを図11に示す。
【0073】
図11に示したような文書構造の図7に示したHTML文書は、表示データ記憶部15に、図14に示したように記憶される。
【0074】
図14は、表示データ記憶部15における図11に示したような文書構造の図7に示したHTML文書の記憶例を模式的に示したものである。XML文書記憶部11やXSLT文書記憶部12と同様に、図14に示したように、HTML文書を構成する(DOMツリーの各ノードに対応する)各要素は、表示データ記憶部15に割り当てられたメモリ空間内に格納され、各要素は、当該メモリ空間内に(例えば入力される)順番に格納されて、その格納領域のアドレスにより、各要素を識別することができる。なお、図14では、説明の簡単のため、各ノードに付した符号をアドレスとして表している。
【0075】
DOMツリーにおけるノードとノードを結ぶ矢印に対応する、要素と要素との間の関係付けは、ポインタにより表されている。図14では、各要素の格納領域には、それぞれに対応するポインタ情報の格納領域が設けられており、ここには、当該要素に、当該要素に結びつけるべき(例えば、子要素としての)他の要素があるときには、その他の要素の格納されているメモリ空間上の領域のアドレスがポインタ情報として格納される。
【0076】
XSLT変換処理部13は、表示データとしての構造化文書を出力するXSLTプロセッサ13aと、上記対応関係記憶データを出力する対応関係生成部13bからなる。XSLTプロセッサ13aの仕様は、例えば、XSLTの規格書にしたがったものでもよい。対応関係生成部13bは、XSLTプロセッサ13aが表示データとしてのHTML文書のノードを出力するごとに、当該出力ノードの位置情報と、XML文書とXSLT文書のノートの位置情報との対応関係を示した対応関係記憶データを出力して、対応関係記憶部14に登録するものである。
【0077】
このような対応関係生成部13bの動作は、例えば、XSLTプロセッサ13aでの処理プログラムのうち出力処理を行う部分に組み込まれていて、当該出力処理のプログラムを実行することにより実現可能である。また、XSLT文書に記載されている命令にしたがってXSLTプロセッサ13aと同等の処理を行い、出力命令のみを対応関係記憶データを出力するプログラムに置き換えたものでもよい。さらに、XSLT文書を別のXSLT文書に変換して、XSLTプロセッサ13aの出力する構造化文書(HTML文書)の属性値として対応関係記憶データを出力する命令を追加し、XSLTプロセッサ13aに元のXSLT文書の代わりに渡し、HTML文書の属性値として対応関係記憶部データを生成するようにしてもよい。
【0078】
対応関係記憶部14における対応関係記憶データの記憶例を図15、図16、図17に示す。
【0079】
対応関係記憶データは、XSLTプロセッサ13aがXML文書をXSLT文書を用いて変換することにより生成されたHTML文書の各要素と、当該要素を生成する際に用いたXML文書の要素とXSLT文書の要素との対応関係を示したもので、例えば、互いに対応関係のあるHTML文書の要素の位置情報と、当該要素を生成する際に用いたXML文書の要素の位置情報とXSLT文書の要素の位置情報を1組としたデータである。
【0080】
図15は、XML文書(図9)とXSLT文書(図10)とHTML文書(図11)について、互いに対応関係にあるノード(要素)の位置情報(図15では、各ノードの位置情報をメモリ空間上のアドレスで示している)を、例えば、図11に示したようなHTML文書中の各ノードの位置情報に対応させて、当該ノードと対応関係にあるXML文書とXSLT文書中のノードの位置情報(図15では、各ノードの位置情報をメモリ空間上のアドレスで示している)を記憶する場合を示している。
【0081】
図16は、XML文書(図9)とXSLT文書(図10)とHTML文書(図11)について、互いに対応関係にあるノード(要素)の位置情報(図16では、各ノードの位置情報をツリー構造上の位置情報で示している)を、例えば、図11に示したようなHTML文書中の各ノードに、当該ノードと対応関係にあるXML文書とXSLT文書中のノードの位置情報を埋め込む形式で記憶する場合を示している。
【0082】
例えば、HTML文書中のノードZ6には、XML文書中のノードの位置情報「1」と、XSLT文書中のノードの位置情報「1−2−1−1−1−1」とが対応付けられている。
【0083】
図17は、XML文書(図9)とXSLT文書(図10)とHTML文書(図11)について、互いに対応関係にあるノード(要素)の位置情報(図17では、各ノードの位置情報をツリー構造上の位置情報で示している)を、例えば、テーブル形式で記憶する場合を示している。
【0084】
表示データ記憶部15は、表示部3上で表示する表示データを保持する。例えば、HTML文書をDOMツリーとして保持する。また、別の機能ブロック、例えば、表示データ操作部16から例えばノードが変更された場合には自動的に表示部3に変更を渡すものである。
【0085】
さて、図5に示したXML文書を図6に示したXSLT文書を用いて変換した結果得られた、図7に示したようなHTML文書は、表示データ記憶部15に、図14に示したように記憶されるとともに、図8に示すように、表示部3に表示される(図3のステップS5)。
【0086】
表示部3に図8に示したようにHTML文書が表示されたとき、この表示画面上の表示データに対し、ユーザが入力部4から何らかの操作を行ったとする。
【0087】
例えば、ユーザにより、ポインティングデバイスで図8に示したテーブル中のセル101に対応する位置がクリックされて、当該セル101を選択する操作指示がなされたとする(図3のステップS6)。すると、この指示を受けて、表示データ操作部16は、当該クリックされたセル101(の位置)に対応するHTML文書中の要素、すなわちノードZ19(図11参照)の位置情報を取得する。この取得は、例えば、画面の位置と、HTML文書中の各要素(の位置情報)との対応関係を保持するなど、公知・公用技術を用いればよい。ここでは、表示データ操作部16は、例えば、ノードZ19が格納されている表示データ記憶部15のメモリ空間上のアドレス「Z19」を取得するものとする。
【0088】
表示データ操作部16は、対応関係記憶部14を検索して、例えば、図15に示した対応関係記憶データから、例えば上記例の場合、ノードZ19と対応関係にあるXML文書中の要素とXSLT文書中の要素の位置情報を求めて、それを操作履歴(操作ログ)として表示データ操作ログ記憶部17に記録する(ステップS7)。その際、ノードZ19と対応関係にあるXML文書中の要素とXSLT文書中の要素の位置情報の他に、さらに、当該操作対象のノードZ19に対しなされた操作の内容(例えば、操作の種類など)や、日時あるいは相対時刻などを操作履歴として、表示データ操作ログ記憶部17に記録するようにしてもよい。
【0089】
操作ログとして記録される内容のうち、表示データであるHTML文書中の操作対象のノードと対応関係のある、XML文書中のノードの位置情報とXSLT文書中のノードの位置情報とを1組としたデータをここでは、表示ノード指示データと呼ぶ。
【0090】
例えば、上記のように、HTML文書中のノードZ19が操作対象であるとき、当該ノードZ19と対応関係のある、XML文書中のノードの位置情報とXSLT文書中のノードの位置情報は、図16、図17に示したような対応関係記憶データから、「1−2」、「1−1−1−3」と求めることができる。また、図15に示した対応関係記憶データから、「X3」、「Y9」と求めることができる。
【0091】
前者の場合、表示データ指示データは、図18(a)に示すように、XML文書中の位置情報「1−2」と、XSLT文書中の位置情報「1−1−1−3」からなり、後者の場合、図18(b)に示すように、XML文書中の位置情報「X3」と、XSLT文書中の位置情報「Y9」からなる。
【0092】
表示データ操作部16は、図18(a)あるいは(b)に示したような表示データ指示データや、表示データ中の操作対象の要素に対する操作の種類などが操作ログとして、表示データ操作ログ記憶部17に記憶するとともに、HTML文書中の例えば、選択操作のなされたノードのスタイルを変更するなどして、当該選択された位置を表示部3を介して表示画面上に表示する(図3のステップS8)。選択位置の表示方法としては、例えば、ノードの背景色を変更する、ノードの外枠を描くなどの方法がある。図19に表示画面の一例を示す。
【0093】
なお、表示画面上での選択位置の表示は、上記のように、表示データ操作ログ記憶部17が更新されたときと、後述する、対応関係記憶部14が更新されたとき、すなわち、表示データが再変換されて、生成しなおされたときに行う。
【0094】
ユーによる表示データに対する操作が終了するまで、ステップS6〜ステップS8を繰り返すようにしてもよい(ステップS9)。この場合、例えば、ユーザが表示データに対し1つ操作指示を行う度に(ステップS6)、当該操作の操作履歴(ログ)が表示データ操作ログ記憶部17に格納され(ステップS7)、表示データ(すなわち、HTML文書)上に、当該操作内容に対応する表示がなされる(ステップS8)。
【0095】
ここで、XSLT文書のデータ構造と、XSLTプロセッサの動作について説明する。なお、これらは、基本的には、XSLTの規格書に従うものである。
【0096】
図20に、XSLT文書のデータ構造の構成例を示す。XSLT文書は、少なくとも1つのXSLTテンプレート201で構成され、XSLTテンプレート201は、条件部202と実行部203で構成される。実行部203は、0個以上の命令で構成され、命令には、出力命令やテンプレート呼出命令(Xsl:apply−templates)、繰り返し命令(Xsl:for−each)などの種類がある。
【0097】
出力命令は、出力のXML文書や、XSLT文書にノードを出力する命令で、決まった要素、テキスト、属性を出力する命令などがある他、与えられた評価式を評価した結果をテキストノードなどで出力する命令などがある。
【0098】
テンプレート呼出命令は、XPathと呼ばれる条件式に適合したノード集合の各ノードにテンプレートを適用して出力を得る命令である。
【0099】
繰り返し命令には、XPathによる条件式を属性として、少なくとも1回以上の繰り返す命令を子ノードとして与える。
【0100】
XSLTプロセッサの動作中には、カレントノードという、テンプレートの条件部202をチェックした際のノードを保持する。XPathでは、カレントノードからの相対パスでノードを指定できる。
【0101】
XSLTプロセッサは、入力されたXML文書中のルートノードと呼ばれる最上階層のノードをまず、カレントノードに設定し、カレントノードが適合するXSLTテンプレートの条件部202を探す。適合したXSLTテンプレート201が見付かった場合には、実行部203の命令が順に実行される。
【0102】
命令が出力命令であれば、対応するHTML文書ノードやXML文書ノードを出力する。また、命令がテンプレート呼出しであれば、引数で与えられたXPathで与えられた条件式に適合するノードの集合を探し、見付かったノードを順に、カレントノードに設定し、適合するXSLTテンプレートを探して適用する。以下同じ要領でテンプレートの適用が終るまで繰り返す。また、繰り返し命令は、XPathで与えられた条件式に適合するノード集合を取り出し、見付かったノードを順に、カレントノードに設定し、子ノードの命令を実行していく。
【0103】
ここで、XSLT文書中の1つの命令が複数回繰り返される場合、繰り返し命令にしても、テンプレート呼出にしても、ある条件に適合したノード集合の個数だけ繰り返されることが特徴であり、ノード集合には、XML文書のノードが重複して含まれることはない。このため、出力されるHTML文書のノードを、XSLT文書の出力命令のノードと、そのときのXML文書のカレントノードの組みで表すことができる。
【0104】
表示ノード指示データは、表示データであるHTML文書のノードを指し示すのに用いられ、XML文書中のノードの位置情報とXSLT文書中のノードの位置情報で構成される。
【0105】
XSLTプロセッサの処理の性質を用いて、表示データのノードを生成した際、(対応関係記憶部14に対応関係記憶データとして記憶された)XSLT文書中の出力命令のノードの位置情報と、そのときのXML文書中のカレントノードの位置情報とを、表示データ中の操作対象ノードを指し示す目的で用いるので、表示データ指示データと呼ぶ。
【0106】
XML文書記憶部11,XSLT文書記憶部12に記憶されているXML文書やXSLT文書に対し、例えばノードを追加する更新を行うと、当該追加されたノードは、メモリ空間上の新たな格納領域に格納されるとともに、ツリー構造上の追加位置に対応して、ポインタ情報は更新されるが、更新前の各ノードのメモリ空間上のアドレス(格納領域)には全く変更がない。また、同様に、XML文書記憶部11,XSLT文書記憶部12に記憶されているXML文書やXSLT文書に対し、例えばノードを削除する更新を行うと、当該削除されたノードは、メモリ空間上の格納領域から削除されるとともに、ツリー構造上の当該ノードの位置に対応して、ポインタ情報は更新されるが、更新前の各ノードのメモリ空間上のアドレス(格納領域)には全く変更がない。ノードを移動する更新の場合も上記同様にして、更新前の各ノードのメモリ空間上のアドレスには全く変更がない。すなわち、XML文書記憶部11,XSLT文書記憶部12に記憶されているXML文書やXSLT文書に対しノードの追加や削除、移動、テキストデータや属性の変更などといった更新がなされても、更新前の各記憶部11,12における元の文書中の各ノードのメモリ空間上の格納領域(アドレス)は変更することがない。
【0107】
このように、XML文書とXSLT文書中のノードの位置情報で表された表示データ指示データにて指し示す表示データ(HTML文書)中のノードは、たとえ、当該XML文書とXSLT文書が更新されても、更新前と同じノードを指し示しているのである。
【0108】
この点に着目し、本実施形態明では、表示データ上での操作位置を、当該表示データを生成する際に用いられたXML文書とXSLT文書における、当該操作位置に対応するノードの位置情報(メモリ空間上のアドレス)で(表示データ指示データとして)記録するようにしている。
【0109】
次に、対応関係記憶データについて説明する。
【0110】
ここでは、XML文書中のノードと、XSLT文書中のノードと、HTML文書中のノードとの対応関係を分かり易く表記した、図16を参照して説明する。
【0111】
図16は、HTML文書中の各ノードに、当該ノードと対応関係のあるXML文書中のノードと、XSLT文書中のノードのツリー構造上の位置情報を埋め込む形式で対応関係記憶データを表現している。
【0112】
図16に示したHTML文書の画面表示例を示したものが図8である。図8に示すテーブルには、著者名の列が2つあり、例えば、「吉田 兼好」という同一のデータが2箇所に表示されている。テーブル中のセル102の「吉田 兼好」に対応するテキストノードZ20は、図9のXML文書中のノードX3(ツリー構造上の位置情報で示すと「1−2」)がカレントノードのときに、図10のXSLT文書中の出力命令(ノードY6)(ツリー構造上の位置情報で示すと「1−1−1−1−1」)で出力されている。
【0113】
このため、図8のテーブル中のセル102に対応する図16のHTML文書中のテキストノードZ20には、表示ノード指示データとして、「1−2,1−1−1−1−1」が対応付けられている。
【0114】
一方、図8のテーブル中のセル101の「吉田 兼好」に対応するHTML文書中のテキストノードZ22(図16参照)は、同じXML文書中のノードX3(ツリー構造上の位置情報で示すと「1−2」)がカレントノードの時に生成されているが、図10のXSLT文書中の出力命令(ノードY10)(ツリー構造上の位置情報で示すと「1−1−1−3−1」)で生成されているため、図16に示すように、当該ノードZ22には、表示ノード指示データとして、「1−2,1−1−1−3−1」が対応付けられている。上記の場合と区別ができる。
【0115】
これにより、図8のテーブル中のセル101とセル102を区別することができ、従って、セル101の「吉田 兼好」だけを選択することができる。
【0116】
ただし、実際にはテンプレート呼出が複数回同じノード集合で呼ばれる場合があるので、この表示ノード指示データは、ただひとつの表示データのノードを示すとはかぎらない。しかし、実用上はこのようにユニークでない場合には、用途に応じて、複数選択する、文書の先頭に近いだけを選択する、両方とも選択するなどすればよい。
【0117】
図3に示したフローチャートによれば、データ入力部1からXML文書とXSLT文書が読み込まれ、それぞれ、XML文書記憶部11と、XSLT文書記憶部12とに、DOMノードとして記憶される。
【0118】
次に、XSLT変換処理部13のXSLTプロセッサ13aは、それぞれのDOMノードを読み込み、XSLTの規格書に定められた手順で、XSLT文書の命令に従って、XML文書を他の構造化文書である表示データ(例えば、HTML文書)に変換する。これと同時に、XSLT変換処理部13の対応関係生成部13bは、例えばXSLTプロセッサと同様の手順だが、ノードを出力する際に、XML文書中のカレントノードと、その出力を行うXSLTの出力命令ノードとの位置情報を求め、さらに出力する表示データのノードの位置情報を求め、これらの位置情報を1組とした対応関係記憶データを対応関係記憶部14に記録する。
【0119】
上記において、対応関係記憶部14に記憶される対応関係記憶データは、例えば、図15に示したように、HTML文書中の各ノードの表示データ記憶部15におけるメモリ空間上のアドレスと、当該ノートと対応関係のあるXML文書中のノードのXML文書記憶部11におけるメモリ空間上のアドレスと、XSLT文書中のノードのXSLT文書記憶部12におけるメモリ空間上のアドレスである。
【0120】
図8に示したように、表示画面上に表示されたテーブル中のセル101を、ポインティングデバイスでクリックして、当該セル101を選択する操作を行うと、表示データ操作部16は、当該セル101に対応するHTML文書上のノードZ22の位置情報、例えば、ここでは、当該ノードZ22が格納されている表示データ記憶部15の格納領域のアドレス(メモリ空間上のアドレス「Z22」)を取得する。表示データ操作部16は、対応関係記憶部14に記憶されている対応関係記憶データから、メモリ空間上のアドレス「Z22」に対応する表示データ指示データ、すなわち、この場合、「X3、Y9」を求め、少なくとも当該表示データ指示データを表示データ操作ログ記憶部17に操作履歴として記録する。
【0121】
表示データ操作部16は、表示データ操作ログ記憶部17のデータが更新されたので、もし、このとき、以前に記憶された、選択などの操作がなされていたHTML文書中のノードについての操作履歴があれば、当該操作履歴を基に、当該ノードを選択されていない元の表示に戻す。そして、今回の操作履歴を読み込み、今回の操作履歴にある表示データ指示データ(例えば、「X3,Y9」)に対応するHTML文書中のノードの位置情報を対応関係記憶データから読みとり(この場合、例えば、「Z22」)、当該位置情報のHTML文書中のノードのスタイルを変更するなどして、当該選択位置を表示画面上に表示する。例えば、図19に示したように、ノードの外枠を描くなどの当該選択操作を反映した表示を行う。
【0122】
次に、この状態において、データ更新部2から、XML文書記憶部11に記憶されているXML文書を更新する場合について説明する。
【0123】
図4において、データ更新部2から、XML文書記憶部11に記憶されているXML文書が更新されたとする(図4のステップS11)。
【0124】
更新操作としては、例えば、ノードの削除や追加、ノードの削除・追加を続けて行うことによりなるノードの移動、構成要素の値としてのテキストの変更や、構成要素の属性の変更などがある。
【0125】
ここでは、例えば、図21に示したように、点線で囲まれたノードX12〜X16がノードX1の下位階層に追加されたとする。この場合、XML文書記憶部11は、図22に示したように更新される。図22では、更新された部分を実線で囲み示している。すなわち、XML文書記憶部11の空の記憶領域(アドレス「X12」〜「X16」)に新たに追加されたノード(要素)が例えば入力された順番に格納され、この追加したノードのツリー構造上の位置に対応して、ポインタ情報も更新されている。なお、更新前のXML文書を示した図9と、更新後のXML文書である図22とから明らかように、更新前のXML文書中の各ノードの格納領域(アドレス「X1」〜「X11」)には全く変更はない。
【0126】
図21、図22に示したように、XML文書記憶部11に格納されたXML文書が更新された後、XSLT変換処理部13において、XSLT文書記憶部12に格納されているXSLT文書を用いて、当該XML文書が、図3のステップS3と同様にして、再びHTML文書に変換される(再変換される)。その際、図3のステップS4と同様にして、対応関係記憶部14には、XML文書とXSLT文書とHTML文書の互いに対応関係のある要素について、それらが格納されている、XML文書記憶部11,XSLT文書記憶部12,表示データ記憶部15のそれぞれに割り当てられたメモリ空間上のアドレスが、対応関係記憶データとして、対応関係記憶部14に記憶される(ステップS12〜ステップS13)。
【0127】
図21に示したように更新されたXML文書を再変換することにより得られたHTML文書をブラウザ上で表示する(ステップS14)。その表示例を図23(a)に示す。図23(a)に示すテーブル中には、セル111〜113を含む行が追加されている。この時点では、まだ、操作履歴は適用されていない。
【0128】
次に、表示ログ再適用部18は、対応関係記憶部14が更新されたのを受け、再変換が行われたと判断し、以下に示すように、操作履歴に基づく操作の再現のための処理動作を開始する。まず、表示データ操作ログ記憶部17から操作履歴を読み出す(ステップS15)。そして、当該操作履歴にある表示データ指示データ中のXML文書中の要素とXSLT文書中の要素の位置情報(メモリ空間上のアドレス)に対応するHTML文書中の要素の位置情報(メモリ空間上のアドレス)を対応関係記憶部14に記憶されている対応関係記憶データを検索することにより求める(ステップS16)。例えば、この場合、操作履歴の表示データ指示データは、「X3、Y9」であるので、図15に示したような内容の対応関係記憶部14から、XML文書の要素のアドレスとXSLT文書の要素のアドレスがそれぞれ「X3」、「Y9」であるHTML文書の要素のアドレス、すなわち、「Z22」を求めることができる。
【0129】
表示ログ再適用部18は、表示データ記憶部15のメモリ空間上のアドレス「Z22」に格納されている要素、すなわち図23(a)に示したテーブル中のセル101を、選択状態の表示にすべく、図23(b)に示すように、例えば、枠線を太くしたり、背景色を変更したりする(ステップS17)。このとき、操作履歴として操作の種類が記録されているときには、当該操作の内容を当該要素に再現して表示する(ステップS17)。
【0130】
以上の手順の結果、図23(b)に示すように、XML文書を更新する前に選択したセル101が、XML文書更新後にも再び選択状態の表示になる。
【0131】
このとき、表示ノード指示データの指し示す表示データ中の要素が無効である場合、すなわち、対応関係記憶部14に当該表示データ指示データに対応する表示データ中の要素のアドレスが存在しないなどの場合には、その操作履歴(ログ)は適用せずに、表示データ操作ログ記憶部17からも削除する。
【0132】
なお、上記ステップS17において、更新されたXML文書が、例えば図23(b)に示すように表示された後、この状態から再び、図3のステップS6へ進み、前述同様にして、表示データに対する操作を行うこともできる。そして、図3のステップS6〜ステップS9の表示データへの操作から、図4のステップS11〜ステップS17の操作内容の再現に至る処理は、何度でも繰り返し行うことができる。
【0133】
上記例では、表示データ中のノードに対する操作は、選択操作のように、ユーザにより選択された位置を表示するものであるから、表示データ操作ログ記憶部17に記憶される操作履歴(操作ログあるいはログ)は、1つのみであった。
【0134】
表示データ中のノードに対する操作は、このような選択操作のみに限らないし、表示データ中の複数のノードに対し、異なる複数の操作がなされる場合もある。そこで、このような場合には、表示データ操作ログ記憶部17に操作履歴として、表示データ指示データの他に、さらに、当該表示データ指示データにより特定される表示データ中のノードに対してなされた操作内容(操作の種類)、操作の順序が明らかになるような情報として、例えば、操作日時や相対時刻、単純に操作の順序を表す番号などが含まれていることが望ましい。
【0135】
このような操作履歴を用いることにより、図4に示したフローチャートに従って、XML文書記憶部11に記憶されたXML文書の更新後においても、更新前に表示データ中の複数のノードになされた複数の操作、あるいは表示データ中のある1つのノードになされた複数の操作を、当該表示データ中のノードに対し再現することができる。
【0136】
図24は、上記のような操作履歴の一例を示したもので、各操作履歴データは、「操作順序」と「表示データ指示データ」と「操作内容」から構成されている。
【0137】
操作内容は、スクリプト言語で保持しても良いし、DOM操作を表すデータ、例えば、メソッドとその引数などで表しておいてもよい。図24では、説明の簡単のため、自然言語で操作内容を記述したが、例えば、「表示データのStyle属性のbackground−colorに‘red’を代入」は、例えばスクリプト言語で「this.style.backgroundColor =‘red’」と表しても良いし、「Set, @style/backgroundColor, ‘red’」と、メソッドとその引数というデータで表してもよい。
【0138】
例えば、図3のステップS5で表示された図8に示した表示データ(そのツリー構造は図11参照)に対し、図24に示した操作履歴中の操作がなされると、ステップS8では、図25に示したように表示される。
【0139】
すなわち、表示データ操作部16は、入力部4から伝えられるユーザの指示に基づいて、表示データに対するDOM操作を行い、そのログを表示データ操作ログ記憶部17に記録する。例えば、ユーザがポインティングデバイスで表示装置の画面上に表示されているHTML文書のノードをダブルクリックすると、HTML文書のノードの位置情報を求め、そのノードのstyle属性のvisiblity値を「‘false’」に設定する。そして、対応関係記憶部14の対応関係記憶データから、当該HTML文書中のノードの位置情報に対応する表示ノード指示データを求め、これと、操作内容(操作の種類)を操作履歴(ログ)として追加記録する。操作内容としては、例えば、「this.style.visiblity=‘false’」というスクリプトで表す。
【0140】
なお、図24に示した表示データ指示データ中のノードの位置情報は、説明上分かり易いように、メモリ空間上のアドレスとともに、その横の括弧内にツリー構造上の位置情報を示している。
【0141】
図24に示した操作履歴によれば、操作順序1の操作履歴に対応する操作として、まず、図11に示した表示データ中のノードZ22(表示データ指示データ「X3、Y9」(ツリー構造上の位置情報で示すと「1−2、1−1−1−3」)で示される<TD>ノード)で表されるテーブル中のセル101の背景を赤に設定する(なお、図25では網掛けで背景色の「赤」を示している)。次に、操作順序2の操作履歴に対応する操作として、図11に示した表示データ中のノードZ1(表示データ指示データ「X1、Y11」(ツリー構造上の位置情報で示すと「1、1−2−1」)で示される<TABLE>ノード)で表されるテーブル自体を100ポイント下に下げる。そして、操作順序3の操作履歴に対応する操作として、図11に示した表示データ中のノードZ9(表示データ指示データ「X1、Y13」(ツリー構造上の位置情報で示すと「1−1、1−1−1」)で示される<TR>ノード)で表されるテーブル中の行(図8の行121)を非表示にする。
【0142】
以上の操作を図8に示した表示データ(そのツリー構造は図11参照)に対し、行った結果が図25に示した表示例である。
【0143】
表示ログ再適用部18は、対応関係記憶部14のデータが更新されたとき、すなわち、XML文書記憶部11に記憶されているXML文書が更新された後再変換により表示データが生成しなおされたとき、表示データ操作ログ記憶部17のログを古い順に表示データに対して適用していく。
【0144】
このとき、表示データ指示データの指し示すHTML文書中のノードが無効である場合、すなわち、対応関係記憶部14に当該ノードが格納されていない、含まれていない場合には、そのログは適用せずに、表示データ操作ログ記憶部17からも削除する。
【0145】
図9に示したXML文書から生成されたHTML文書(図8に示したように表示されたHTML文書)に対し、図24に示したような操作がなされて、図25に示したように表示された後、図9に示したXML文書が図21に示すように更新されたとする。
【0146】
この更新後のXML文書に対し、図24に示した操作履歴を適用する手順を図4を参照して説明する。
【0147】
すなわち、当該更新後のXML文書は、XSLT変換処理部13でHTML文書に変換して、表示データ記憶部15に格納するとともに、その際、XSLT変換処理部13から出力される対応関係記憶データが対応関係記憶部14に記憶される(ステップS11〜ステップS13)。
【0148】
ステップS3で得られたHTML文書をブラウザ上で表示すると、図23(a)に示したように、図8に示したテーブル中に、セル111〜113が追加されたものが表示される(ステップS14)。
【0149】
次に、表示ログ再適用部18は、対応関係記憶部14が更新されたのを受けて、表示データ操作ログ記憶部17に記憶された図24に示したような操作ログを古い順に、表示データ記憶部15に記憶されている表示データに対し適用していく(ステップS15〜ステップS17)。
【0150】
前述したように、XML文書記憶部11,XSLT文書記憶部12に記憶されているXML文書やXSLT文書に対しノードの追加や削除、移動、テキストデータや属性の変更などといった更新がなされても、更新前の各記憶部11,12における元の文書中の各ノードのメモリ空間上の格納位置(アドレス)は変更することはない。従って、XML文書とXSLT文書中のノードの位置情報で表された表示データ指示データにて指し示す表示データ(HTML文書)中のノードは、たとえ、当該XML文書とXSLT文書が更新されても、更新前と同じノードを指し示している。
【0151】
すなわち、表示データ記憶部15に記憶されている表示データ(HTML文書)に対し、図24に示した操作ログを適用すると、操作順序1の操作履歴に対応する操作は、当該HTML文書中のノードZ22であり、操作順序1の操作履歴に対応する操作は、当該HTML文書中のノードZ51であり、操作順序1の操作履歴に対応する操作は、当該HTML文書中のノードZ9である。当該操作ログが適用される(XML文書更新後の再変換された)HTML文書中のノードは、やはり、XML文書を更新する前のHTML文書中のノードZ22、Z1、Z9と同じである。すなわち、XML文書更新後の再変換されたHTML文書中において、各操作ログ中の表示データ指示データにより特定されるHTML文書中のノードは、ノードZ22、Z1、Z9である。
【0152】
従って、操作ログ適用前に表示された、図23(a)に示したようなテーブルは、図24に示した操作ログが適用されて、図26に示したように表示される。すなわち、図26において、テーブル中のセル101の背景は赤に設定され、テーブル自体は100ポイント下に下がり、テーブル中の行(図23(a)の行121)が非表示になっている。なお、XML文書を更新することにより追加されたテーブル中のセル111〜113は表示されている。
【0153】
上記説明では、表示データに対する操作を行った後に、XML文書記憶部11に記憶されたXML文書を更新する場合について説明したが、XSLT文書記憶部12に記憶されたXSLT文書を更新した場合も上記同様である。すなわち、XSLT文書が更新されたときは、当該更新されたXSLT文書を用いてXML文書を変換することにより生成されたHTML文書の各要素と、当該要素を生成する際に用いられたXML文書の要素と更新されたXSLT文書の要素との対応関係記憶データを対応関係記憶部14に格納する。そして、当該HTML文書の要素の中から、操作履歴として記憶された表示データ指示データに対応する操作対象の要素を求めて、当該HTML文書を表示する際には、当該HTML文書中の当該操作対象の要素に対し、ユーザによる操作の内容を再現する。
【0154】
また、上記説明では、対応関係記憶部14に記憶される対応関係記憶データは、図15に示したように、HTML文書中の各ノードの表示データ記憶部15におけるメモリ空間上のアドレスと、当該ノートと対応関係のあるXML文書中のノードのXML文書記憶部11におけるメモリ空間上のアドレスと、XSLT文書中のノードのXSLT文書記憶部12におけるメモリ空間上のアドレスであった。従って、表示データ指示データも、XML文書中のノードのXML文書記憶部11におけるメモリ空間上のアドレスと、XSLT文書中のノードのXSLT文書記憶部12におけるメモリ空間上のアドレスにて表されていた。しかし、この場合に限らず、前述したように、XML文書、XSLT文書、HTML文書中の各ノードは、それぞれの文書のツリー構造上の位置情報にて識別(特定)するようにしてもよい。
【0155】
すなわち、対応関係記憶部14に記憶される対応関係記憶データは、図16や図17に示すように、XML文書とXSLT文書とHTML文書の互いに対応関係にあるノード(要素)を、これら文書のツリー構造上の位置情報で表すようになっていてもよい。また、表示データ操作ログ記憶部17に操作履歴として記憶される表示データ指示データは、XML文書とXSLT文書のノードを、図18(a)に示したように、これら文書のツリー構造上の位置情報で表すようになっていてもよい。
【0156】
XML文書記憶部11に記憶されているXML文書に対し、ノードの追加、削除、移動などの更新を行った場合、当該XML文書の文書構造、すなわち、ツリー構造(DOMツリー)も変更することとなるので、XML文書が更新されると、それに伴い、表示データ指示データも更新あるいは調節する必要がある。さらに、XML文書のツリー構造がどのように変更されたかを認識する必要がある。そこで、この場合、XML文書表示装置は、例えば、図2に示すような構成であることが望ましい。なお、図2において、図1と同一部分には同一符号を付し、異なる部分についてのみ説明する。すなわち、図2では、ノード位置更新部19が新たに追加されている。
【0157】
また、データ更新部2は、XML文書記憶部11に記憶されているXML文書かXSLT文書記憶部12に記憶されているXSLT文書に対し、ノードを挿入(追加)したり、他のノードを削除したり、あるいは、テキストノードの値を変更するなどのDOM操作が行われることにより、新たなノードが挿入(追加)された場合には、挿入(追加)されたノードがどれであり、また、どの位置に挿入(追加)されたのかなどを表した情報、既存のノードが削除された場合に、どの位置にあるノードが削除されたのかなどを表した情報、テキストノードの値が変更された場合には、そのノードはどれであり、どのような値に変更されたかなどを表した情報などを、ノード位置更新情報として、ノード位置更新部19に出力するようになっている。また、ノードの移動の場合には、上記ノードの削除と挿入(追加)を連続して行う場合であるので、この場合に出力されるノード位置更新情報は、ノードの削除時とノードの挿入時に出力されるノード位置更新情報の内容と同様である。
【0158】
ノード位置更新部19は、データ更新部2から出力された、上記ノード位置更新情報を基に、表示ノード指示データに含まれる、XML文書中のノードの位置情報とXSLT文書中のノードの位置情報を更新する。すなわち、ここでのノードの位置情報は、ツリー構造上の位置情報であるので、階層を表す番号や、各階層におけるノード位置を表す番号を増減することで、XML文書やXSLT文書を更新することにより生じるずれを調節するのである。
【0159】
次に、図24に示した操作履歴を例にとり、ノード位置更新部19が表示データ指示データに含まれるノードの位置情報を更新して、再変換されたHTML文書に当該操作ログを適用する場合について説明する。
【0160】
すなわち、図8に示した表示画面上のテーブルに対し、図24に示したような操作が行われた後、XML文書記憶部11に記憶されている図9に示したXML文書が、図21に示したように更新されたとする。すなわち、ノードX12〜X16がノードX1以下に、追加されたとする。
【0161】
図24に示したように、XML文書を更新する前は、ノードX3の位置情報は、「1−2」であったが、XML文書を更新することにより、第2階層の位置が1つずれて(インクリメントされて)「1−3」となる。
【0162】
すなわち、ノード位置更新部19は、図27に示すように表示データ指示データの、ノードX3の位置情報を「1−2」から「1−3」へと更新する。
【0163】
このように、上記例の場合、ノード位置更新部19は、表示データ指示データのXML文書中のノードの位置情報において、第2階層の番号が「2」以上である場合には、当該第2階層の番号を1つインクリメントする。それ以外の場合は、そのままの値とする。すなわち、位置情報が「1−1−2」であるならば、そのままの値であるが、「1−2−2」であるならば、第2階層の番号を1つインクリメントして「1−3−2」とする。
【0164】
従って、図24に示した、ノードX2の位置情報は「1−1」であるので、この位置情報は、図27に示すように更新されない。
【0165】
なお、この例ではXML文書の第2階層に2番目にノードを追加する場合を示したが、第2階層の2番目のノードを削除する場合にも、同様にして、第2階層の番号が「2」より大きければ、その値を1つデクリメントし、第2階層の番号「2」と等しい場合には、当該表示データ指示データを含む操作履歴を削除する。
【0166】
また、上記例では、XLM文書を更新する場合を示したが、XSLT文書にノードを追加/削除した場合には、表示データ指示データにあるXSLT文書中のノードの位置情報を上記同様にして更新すればよい。
【0167】
さて、図4に示したフローチャートに従えば、図21に示したXML文書はHTML文書に変換され、新たな対応関係記憶データが生成されて、対応関係記憶部14に格納される(ステップS12〜ステップS13)。このHTML文書をブラウザ上で表示すると、図23(a)のように1行追加されたテーブルとして表示される(ステップS14)。この時点では、表示データに行ったDOM操作は失われている。また、対応関係記憶データは新たに生成しなおされる。
【0168】
つぎに、表示ログ再適用部18は、対応関係記憶部14のデータが更新されたので、表示データ操作ログ記憶部17に記憶された操作ログを古い順に、表示データに対して順に適用していく(ステップS15〜ステップS17)。
【0169】
このとき、図27に示したように、操作順序1の操作である表示データ指示データにおいて、XML文書中のノードの位置情報が「1−2」だったのが「1−3」に直されているので、XML文書更新前のときと同様に、図26に示したように、テーブル中のセル101に対して、正しく、セルの背景を赤く設定することができる。
【0170】
なお、上記説明における各機能や各処理は、所定のソフトウエアがコンピュータおよび周辺機器を制御することで実現されるものとして、各機能や各処理に対応する仮想的回路ブロックを想定して説明しており、各ブロックに対して、各ハードウエア要素やソフトウエア要素が必ずしも1対1に対応しなくても構わない。また、上記説明における各機能や各処理の全部または一部を(あるいは以下で説明する各機能や各処理を搭載したWebブラウザ自体を)半導体チップなどのハードウェアで構成することも可能である。
【0171】
以上説明したように、上記実施形態によれば、XML文書を所望の表示スタイルで表示するために、当該XML文書をXSLT文書(スタイルシート)を用いて変換することにより生成されたHTML文書に基づき表示する表示装置において、当該表示されたHTML文書中の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該操作対象の要素を生成する際に用いられたXML文書の要素とXSLT文書の要素の位置情報(好ましくは、上記各要素が格納されている記憶空間(例えばメモリ空間)上のアドレス)である表示データ指示データで記憶しておく。XML文書やXSLY文書を更新した後に、再び変換を行っても、再変換後のHTML文書中の当該表示データ指示データにより特定される要素は、再変換前のHTML文書中の操作対象の要素と一致するため、再変換前のHTML文書中の要素(操作対象の要素)に対しなされた操作内容が、再変換後のHTML文書中の同じ操作対象の要素に対し再現することができる。
【0172】
本発明の実施の形態に記載した本発明の手法は、コンピュータに実行させることのできるプログラムとして、磁気ディスク(フロッピーディスク、ハードディスクなど)、光ディスク(CD−ROM、DVDなど)、半導体メモリなどの記録媒体に格納して頒布することもできる。
【0173】
なお、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。さらに、上記実施形態には種々の段階の発明は含まれており、開示される複数の構成用件における適宜な組み合わせにより、種々の発明が抽出され得る。例えば、実施形態に示される全構成要件から幾つかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題(の少なくとも1つ)が解決でき、発明の効果の欄で述べられている効果(のなくとも1つ)が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。
【0174】
【本発明の効果】
以上のように本発明によれば、XML文書などの構造化文書を、スタイルシートを用いてHTML文書などの他の構造化文書に変換して表示する場合、表示された要素に対しなされた操作内容が、XML文書やスタイルシートを更新した後であっても、再び変換を行って表示する際には、同じ要素に対し再現することができる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る構造化文書表示装置の構成例を示した図。
【図2】構造化文書表示装置の他の構成例を示した図。
【図3】構造化文書表示装置の処理動作を説明するためのフローチャート。
【図4】構造化文書表示装置の処理動作を説明するためのフローチャート。
【図5】XML文書の一具体例を示した図。
【図6】XSLT文書の一具体例を示した図。
【図7】HTML文書の一具体例を示した図で、図5のXML文書を図6のXSLT文書を用いて変換した結果生成されたHTML文書を示している。
【図8】図7のHTML文書の表示例を示した図。
【図9】図5のXML文書のツリー構造を示した図。
【図10】図6のXSLT文書のツリー構造を示した図。
【図11】図7のHTML文書のツリー構造を示した図。
【図12】XML文書記憶部における図5のXML文書の記憶例を示した図。
【図13】XSLT文書記憶部における図6のXSLT文書の記憶例を示した図。
【図14】表示データ記憶部における図7のHTML文書の記憶例を示した図。
【図15】対応関係記憶部における対応関係記憶データの記憶例を示した図。
【図16】対応関係記憶部における対応関係記憶データの他の記憶例を示した図。
【図17】対応関係記憶部における対応関係記憶データのさらに他の記憶例を示した図。
【図18】表示データ指示データの具体例を示した図。
【図19】HTML文書の表示例を示した図。
【図20】XSLT文書のデータ構造を説明するための図。
【図21】更新されたXML文書のツリー構造を示した図。
【図22】XML文書記憶部における図21のXML文書の記憶例を示した図。
【図23】(a)図は、図21のXML文書を図6に示したXSLT文書を用いて変換した結果得られたHTML文書の表示例を示した図で、(b)図は、(a)図のHTML文書に操作履歴を適用した場合の表示例を示した図。
【図24】表示データ操作ログ記憶部に記憶された操作履歴(操作ログあるいはログ)の一例を示した図。
【図25】図8に示したHTML文書に対し、図24に示した操作ログを適用した場合の表示例を示した図。
【図26】図23(a)に示したHTML文書に対し、図24に示した操作ログを適用した場合の表示例を示した図。
【図27】図2に示した構造化文書表示装置において、XML文書の更新内容に伴い、ノード位置更新部19が表示データ指示データの位置情報を更新した結果を示した図。
【符号の説明】
1…データ入力部
2…データ更新部
3…表示部
4…入力部
5…制御部
11…XML文書記憶部
12…XSLT文書記憶部
13…XSLT変換処理部
13a…XSLTプロセッサ
13b…対応関係生成部
14…対応関係記憶部
15…表示データ記憶部
16…表示データ操作部
17…表示データ操作ログ記憶部
18…表示ログ再適用部
19…ノード位置更新部
X1〜X11、Y1〜Y19、Z1〜Z22…ノード(要素)[0001]
TECHNICAL FIELD OF THE INVENTION
According to the present invention, for example, when a structured document such as an XML document is converted and displayed using a style sheet such as an XSLT document, the operation content performed on the displayed element updates the XML document or the XSLT document. The present invention relates to a display method for making the same element reproducible later when conversion is performed again and displayed, and a display device using the same.
[0002]
[Prior art]
2. Description of the Related Art In recent years, Internet technology, especially Web technology, has become widespread, and documents written in HTML can be browsed anywhere regardless of the type of OS or Web browser. In an HTML document, text and style information (information related to the display method such as font size, color, table width, etc. on the screen) are mixed, and tags surrounding the text in the text are displayed on the screen. Since there is only information on the structure of the HTML document, it is difficult to use the contents of the HTML document as information used in a computer.
[0003]
For this reason, XML (Extensible Markup Language) has been standardized as one of the structured document technologies, which is a technology for enclosing and structuring a text with a tag having a meaning, and has been widely used (for the XML standard). Is described in, for example, http://www.w3.org/TR/REC-xml).
[0004]
On the other hand, since the XML document itself is difficult to read by humans, it is converted into an HTML document in which style information is added, etc., is formatted into an easy-to-view form, and is used as a style technology for browsing on a Web browser. XSLT (Extensible Stylesheet Language) Trasformations have been developed and standardized (for details of the XSLT standard, see, for example, http://www.w3.org/TR/xslt).
[0005]
XSLT is a program language for converting an XML document written in XML. A program that executes the XSLT document written in XSLT and converts the XML document is called an XSLT processor. Browsers are now becoming popular.
[0006]
DHTML (Dynamic HTML), which is a technique for operating an HTML document displayed from a programming language, is generally used for creating a dynamic Web page that changes according to a mouse operation.
[0007]
In DHTML, an HTML document is expressed as a tree-structured data structure, the text, elements, attributes, and the like of the HTML document are expressed as nodes of the tree, and the nesting relation of the elements is expressed as a parent-child relation of the nodes. You can change the value of the node.
[0008]
Although DHTML is intended for HTML documents, DOM (Document Object Model), which is a generalized version of this for XML documents, is standardized (for example, http: //www.w3 for DOM and DHTML). .Org / DOM /).
[0009]
By using DHTML, for example, it is possible to switch display / non-display of a certain portion of the HTML document, change a color, display a selection frame around a screen element of a certain HTML document, and the like.
[0010]
HTML alone can create only static Web pages, but DHTML can create dynamic Web pages. For example, paragraphs are hidden in advance, only headings are displayed, and headings are displayed. It is used to create a Web page that displays a paragraph below a heading when clicked with a mouse, or a Web page that displays a menu when the mouse pointer is over a character string.
[0011]
However, in the above-described related art, there are the following problems as the display means of the XML document.
[0012]
That is, since an XML document is converted into an HTML document using an arbitrary XSLT document and then displayed, if any part of the XML document is changed, the entire HTML document is updated by performing the conversion again using XSLT. In other words, the updated HTML document output by this reconversion becomes an HTML document different from the HTML document first converted and output, so that the HTML document before the reconversion and the HTML document after the reconversion are different. Between them, the correspondence between the nodes is lost. For this reason, for example, even if a node in the HTML document before re-conversion is set to the selected state by using a function for selecting a node in the HTML document, the selected state is set to the node after re-conversion. I couldn't keep it. This is because when the re-conversion is performed, even if a node corresponding to the node that was in the selected state before the re-conversion is output to the HTML document after the re-conversion, the original This is because it is not known that it is the same as the node.
[0013]
For the same reason, even if an operation using DHTML such as hiding a part of the HTML document output by converting the XML document or changing the width of the table is performed, after re-conversion, Since it is not clear to which node the DHTML operation has been applied, for example, the place that was hidden before re-conversion will be displayed after re-conversion. Problems such as returning to the original state occur.
[0014]
On the other hand, for example, a method is conceivable in which an operation such as setting the selected state is performed not on a node in the HTML document but on a node in the XML document. A similar method is used in an HTML editor, an outline editor, or the like that converts certain data into screen data and displays the data. In this case, the node position of the data before conversion is stored.
[0015]
However, in XSLT, a node in an XML document may be converted into a plurality of HTML document nodes. Therefore, when one node is selected in the HTML document, the above-described method is used to convert a node in the XML document. Even if the node operated in the selected state is held, if the XSLT is used to perform the re-conversion, a plurality of nodes may be in the selected state in the re-converted HTML document. It is not possible to specify the display portion on the screen.
[0016]
In some cases, the table of contents is simultaneously displayed separately from the text by using an HTML editor or a word processor, and the display of the table of contents is switched between display and non-display by folding the table of contents. The program is built on the premise that it is displayed, and it is possible to distinguish it from the text by storing that the headline displayed in the table of contents is folded. However, in an apparatus that converts an XML document by XSLT and displays the converted document, the XSLT document, which is a conversion rule, is not given to the display program in advance, and it is necessary to program in advance how many nodes of the XML document are output. Therefore, the above-mentioned method could not be used.
[0017]
Also, nodes and character strings embedded in the XSLT cannot be selected because the number of output points cannot be determined in advance, for example, by displaying the same character string at the beginning of a table row.
[0018]
[Problems to be solved by the invention]
As described above, when a structured document such as an XML document is converted into another structured document such as an HTML document using a style sheet and displayed, the operation content performed on the displayed element is changed to an XML document or an XML document. When the style sheet is updated and then converted and displayed again, there is a problem that the same element cannot be reproduced.
[0019]
Accordingly, the present invention has been made in view of the above-mentioned problems, and when a structured document such as an XML document is converted into another structured document such as an HTML document using a style sheet and displayed, the present invention is applied to the displayed elements. Even if the operation content is after updating the XML document or the style sheet, when the conversion is performed again and displayed, the operation position storage method that can be reproduced for the same element, and the structuring using the method It is an object to provide a document display method, a structured document display device, and a program.
[0020]
[Means for Solving the Problems]
According to the present invention, a first structured document (for example, an XML document) as a structured document having a document structure composed of a plurality of elements is stored in a storage unit, and the first structured document for displaying the first structured document is displayed. A third structured document (for example, an HTML document) is obtained by performing conversion using a second structured document (for example, an XSLT document) that describes a conversion rule for converting to a structured document. And a display unit for performing display based on the structured document according to (1), among the elements of the third structured document displayed by the display unit, an element to be operated by a user Is stored in the storage unit with the position information of the element of the first structured document and the position information of the element of the second structured document used when the element is generated. 1 structured document or the above When the above-mentioned conversion is performed again after updating the structured document of No. 2 and displayed, the position information stored in the storage unit is used to reproduce the content of the operation performed on the element to be operated. It is characterized by the following.
[0021]
According to the present invention, when a structured document such as an XML document is converted into another structured document such as an HTML document using a style sheet and displayed, the operation content performed on the displayed element is expressed in XML. Even after updating the document or the style sheet, when converting and displaying again, the same element can be reproduced.
[0022]
Preferably, the position of the element to be operated by the user is stored as the element of the first structured document and the element of the second structured document used when generating the element. It is stored with the position information in the storage space.
[0023]
Also, preferably, the position of the element to be operated by the user is determined by comparing the position of the element of the first structured document and the element of the second structured document used when generating the element. When the document structure is stored as position information on the document structure and at least one of the first structured document and the second structured document is updated, the operation target The position information on the document structure of the element of the first structured document and the element of the second structured document stored as the position of the element is corrected.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0025]
FIG. 1 shows a configuration example of an XML document display device for displaying, for example, an XML document as a structured document, as a structured document display device according to an embodiment of the present invention. The XML document shown in FIG. 1 is roughly divided into a
[0026]
The
[0027]
The
[0028]
It is not necessary to provide these simultaneously.
[0029]
The
[0030]
When the external data storage device is a device such as a hard disk or a semiconductor memory, the
[0031]
The
[0032]
Note that only the
[0033]
Further, only the
[0034]
Note that the network may be a wired network, a wireless network, or a network including a wired part and a wireless part. Further, the network may be the Internet, a home network or a corporate network, or a carrier network, a Web server on the Internet, and a Web browser on the LAN. It may be something like that.
[0035]
In addition, the number of computers on which the Web browser is arranged may be one or a plurality of similar computers.
[0036]
The XML document display device having the configuration shown in FIG. 1 may be realized on a computer (for example, a computer), but may be a mobile phone terminal, a PDA (personal digital assistant), or a network home appliance having a built-in CPU. It doesn't matter.
[0037]
In addition, the XML document display device shown in FIG. 1 displays another structured document such as an XML document using a style sheet such as an XSLT document in order to display the structured document such as an XML document on a display unit such as a display. For example, an HTML document as a structured document is converted and displayed based on the other structured document, and among the elements of the other structured document displayed by the display means, the operation target element operated by the user Is stored as the position of the element of the XML document and the position of the element of the XSLT document used when the element is generated, and a computer (computer) uses a program that uses the stored contents to reproduce the operation by the user. Can also be realized by causing
[0038]
In addition, a plurality of XML document display devices having the configuration shown in FIG. 1 are prepared, and the
[0039]
The
[0040]
Other structured documents as display data include, for example, an HTML (HyperText Markup Language) document. In addition, various XML documents, for example, an XHTML (The Extensible Hyper Text Markup Ranger Document), XHTML (The Extensible Hypertext MarkupVageGage document) Graphics documents, MathML (Mathmatic Markup Language) documents, other XML documents (for example, original XML documents with modifications), and XML documents combining these.
[0041]
What kind of structured document to use as display data depends on what structured document is supported by the
[0042]
For the XHTML standard, see, for example, http: // www. w3. org / TR / xhtml1. For the SVG standard, see, for example, http: // www. w3. org / TR / SVG, for the MathML standard, see, for example, http: // www. w3. org / TR / REC-MathML.
[0043]
In the following, description will be made assuming that an HTML document is used as a structured document as display data.
[0044]
Here, FIG. 5 shows an example of the XML document used in the following description, FIG. 6 shows an example of the XSLT document, FIG. 7 shows an example of the HTML document, and FIG. 8 shows the HTML document shown in FIG. Shows an example of a screen display when is displayed on the display unit 3 (when viewed on a browser).
[0045]
DHTML and DOM represent a hierarchical document structure of a structured document as a tree structure, and include elements (such as component names (tags), text data and attributes as values of the components, etc.) constituting the structured document. This is a technology in which each element of a structured document is expressed as a node of the tree-like data structure and is accessible from a program by expressing the element in a tree-type data structure represented as a node on the tree structure. Hereinafter, a structured document expressed as a tree-shaped data structure is referred to as a “DOM tree” without distinguishing between an HTML document and an XML document, and each element of the structured document is referred to as a “node” or a “DOM node”. There is.
[0046]
9 shows an example of a DOM tree corresponding to the XML document of FIG. 5, FIG. 10 shows an example of a DOM tree corresponding to the XSLT document of FIG. 6, and FIG. 11 shows an example of a DOM tree corresponding to the HTML document of FIG. Are respectively shown. In the DOM tree shown in FIGS. 9 to 11, nodes corresponding to component names are enclosed by squares, and nodes corresponding to text data as values of the components are enclosed by ellipses. Nodes corresponding to the attributes are omitted for simplicity of description.
[0047]
Nodes (elements) in the DOM tree correspond to component names, text data as their values, attributes, and the like in the HTML document and the XML document.
[0048]
A component is a portion surrounded by tags in a structured document, and a “tag” has a “start tag” and an “end tag”. Indicates the part up to the corresponding end tag. The start tag includes, for example, <book> in FIG. 5 and <TABLE> in FIG. 7, and the end tag includes a slash “/” before the tag name, for example, </ book in FIG. > And </ TABLE> in FIG. Components can have a hierarchical structure.
[0049]
An “attribute” is a set of a name and a value attached to a component, and is described in the form of “name = value” inside a start tag. For example, there is "select =" book "" included in the <xsl: template> start tag in FIG.
[0050]
In the case where nothing is included between the start tag and the end tag in the XML document (there may be an attribute), for example, the tag name such as <xsl: value-of /> in FIG. Is terminated with a slash "/" and the notation is omitted.
[0051]
The above notation is defined in the XML standard.
[0052]
Here, in the DOM tree shown in FIGS. 9 to 11, each node is identified by the position information of the node in the tree structure according to the hierarchical structure of each DOM tree.
[0053]
For example, in the DOM tree of the XML document illustrated in FIG. 9, the position information of the node X7 in the fourth hierarchy is “1-1-2-1”, which is determined from the node X1 in the first hierarchy to the node in question. The node positions (numbers) of each layer up to X7 are connected by hyphens “-”.
[0054]
The position information “1-1-2-1” of the node X7 is the second child node of the first child node (<book>) X2 of the first node (<booklist>) X1 in the first hierarchy. (<Author>) means the first text node (“purple expression”) X7 of X6.
[0055]
The DOM node does not need to have data arranged as a tree structure in the memory space of the main memory, but only needs to be able to access data as virtual tree format.
[0056]
Actually, the DOM nodes are stored on the main memory of the computer. In this case, each DOM node can be identified and referenced by an address in the memory space of the main memory.
[0057]
As described later, the DOM tree of the XML document input from the
[0058]
Similarly, for example, each DOM node of an HTML document as display data stored in the display
[0059]
Next, the
[0060]
The
[0061]
Hereinafter, the configuration and operation of the
[0062]
The XML
[0063]
Similarly, the XSLT
[0064]
FIG. 12 schematically illustrates a storage example of the XML document in the XML
[0065]
As shown in FIG. 12, each element (corresponding to each node of the DOM tree) constituting the XML document is stored in a storage space (for example, a memory space in this case) allocated to the XML
[0066]
The association between elements, corresponding to the arrows connecting the nodes in the DOM tree, is represented by pointers. In FIG. 12, a storage area for each element is provided with a storage area for pointer information corresponding to the element. In this area, another element to be associated with the element (for example, as a child element) is provided. When there is an element, the address of the area in the memory space where other elements are stored is stored as pointer information.
[0067]
For example, in the DOM tree shown in FIG. 9, an element X1 (“booklist”) of the first hierarchy has two child elements (child nodes) X2 and X3. In this case, as shown in FIG. In the XML
[0068]
FIG. 13 schematically illustrates a storage example of the XSLT document in the XSLT
[0069]
As shown in FIG. 13, each element (corresponding to each node of the DOM tree) constituting the XSLT document is stored in the memory space allocated to the XSLT
[0070]
The association between elements, corresponding to the arrows connecting the nodes in the DOM tree, is represented by pointers. In FIG. 13, a storage area for each element is provided with a storage area for pointer information corresponding to the element. In this area, another element to be linked to the element (for example, as a child element) is provided. When there is an element, the address of the area in the memory space where other elements are stored is stored as pointer information.
[0071]
The XSLT
[0072]
For example, an HTML document obtained as a result of transforming the XML document shown in FIG. 5 (see FIG. 9 for its DOM tree) using the XSLT document (see FIG. 10 for its DOM tree) is shown in FIG. Shown in FIG. 11 shows a DOM tree of the HTML document shown in FIG.
[0073]
The HTML document shown in FIG. 7 having the document structure shown in FIG. 11 is stored in the display
[0074]
FIG. 14 schematically illustrates a storage example of the HTML document illustrated in FIG. 7 having the document structure illustrated in FIG. 11 in the display
[0075]
The association between elements, corresponding to the arrows connecting the nodes in the DOM tree, is represented by pointers. In FIG. 14, a storage area for each element is provided with a storage area for pointer information corresponding to the element. In this area, another element to be associated with the element (for example, as a child element) is provided. When there is an element, the address of the area in the memory space where other elements are stored is stored as pointer information.
[0076]
The XSLT
[0077]
Such an operation of the
[0078]
15, 16, and 17 show examples of storage of the correspondence storage data in the
[0079]
The correspondence storage data includes the elements of the HTML document generated by the
[0080]
FIG. 15 shows position information of nodes (elements) corresponding to each other in the XML document (FIG. 9), the XSLT document (FIG. 10), and the HTML document (FIG. 11). (Corresponding to the address on the space), for example, in correspondence with the position information of each node in the HTML document as shown in FIG. 11, and the XML document and the node in the XSLT document which have a corresponding relationship with the node. FIG. 15 shows a case where the position information (in FIG. 15, the position information of each node is indicated by an address in the memory space).
[0081]
FIG. 16 shows position information of nodes (elements) corresponding to each other in the XML document (FIG. 9), the XSLT document (FIG. 10), and the HTML document (FIG. 11). Format is embedded in each node in the HTML document as shown in FIG. 11, for example, by embedding the position information of the XML document and the node in the XSLT document in correspondence with the node. Indicates the case of storing.
[0082]
For example, the node Z6 in the HTML document is associated with the position information “1” of the node in the XML document and the position information “1-2-1-1-1-1” of the node in the XSLT document. ing.
[0083]
FIG. 17 shows position information of nodes (elements) corresponding to each other in the XML document (FIG. 9), the XSLT document (FIG. 10), and the HTML document (FIG. 11). (Indicated by structural position information) is stored in a table format, for example.
[0084]
The display
[0085]
An HTML document as shown in FIG. 7 obtained by converting the XML document shown in FIG. 5 using the XSLT document shown in FIG. 6 is stored in the display
[0086]
When an HTML document is displayed on the
[0087]
For example, it is assumed that the user clicks on the position corresponding to the
[0088]
The display
[0089]
Of the contents recorded as the operation log, one set of the position information of the node in the XML document and the position information of the node in the XSLT document, which have a correspondence relationship with the node to be operated in the HTML document as the display data, This data is referred to as display node instruction data here.
[0090]
For example, as described above, when the node Z19 in the HTML document is the operation target, the position information of the node in the XML document and the position information of the node in the XSLT document, which have a correspondence relationship with the node Z19, are as shown in FIG. 17, “1-1” and “1-1-1-3” can be obtained from the correspondence storage data as shown in FIG. Further, “X3” and “Y9” can be obtained from the correspondence storage data shown in FIG.
[0091]
In the former case, as shown in FIG. 18A, the display data instruction data includes position information “1-2” in the XML document and position information “1-1-1-3” in the XSLT document. In the latter case, as shown in FIG. 18B, the position information is composed of position information “X3” in the XML document and position information “Y9” in the XSLT document.
[0092]
The display
[0093]
The display of the selected position on the display screen is performed when the display data operation
[0094]
Steps S6 to S8 may be repeated until the operation on the display data by the user is completed (step S9). In this case, for example, every time the user gives one operation instruction to the display data (step S6), the operation history (log) of the operation is stored in the display data operation log storage unit 17 (step S7), and the display data A display corresponding to the operation content is displayed on (ie, the HTML document) (step S8).
[0095]
Here, the data structure of the XSLT document and the operation of the XSLT processor will be described. These basically follow XSLT standard documents.
[0096]
FIG. 20 shows a configuration example of the data structure of the XSLT document. The XSLT document includes at least one
[0097]
The output command is a command for outputting a node to an output XML document or XSLT document. The output command includes a command for outputting a predetermined element, text, and attribute. There are instructions to output.
[0098]
The template call instruction is an instruction to obtain an output by applying a template to each node of a node set conforming to a conditional expression called XPath.
[0099]
The repeat instruction is given a conditional expression based on XPath as an attribute, and an instruction to repeat at least once or more is given as a child node.
[0100]
During the operation of the XSLT processor, the current node, that is, the node at the time of checking the
[0101]
The XSLT processor first sets a top-level node called a root node in the input XML document as the current node, and searches for a
[0102]
If the command is an output command, a corresponding HTML document node or XML document node is output. If the instruction is a template call, a set of nodes matching the conditional expression given by the XPath given by the argument is searched, the found nodes are set in order as the current node, and a matching XSLT template is searched. Apply. The same procedure is repeated until the application of the template is completed. The repetition instruction extracts a node set that satisfies the conditional expression given by XPath, sets the found nodes in order as the current node, and executes the instruction of the child node.
[0103]
Here, when one command in the XSLT document is repeated a plurality of times, the repetition command or the template call is repeated by the number of node sets meeting a certain condition. Does not include the nodes of the XML document in duplicate. Therefore, the node of the output HTML document can be represented by a combination of the node of the output instruction of the XSLT document and the current node of the XML document at that time.
[0104]
The display node instruction data is used to indicate a node of an HTML document which is display data, and includes position information of a node in an XML document and position information of a node in an XSLT document.
[0105]
When a node of display data is generated using the processing property of the XSLT processor, the position information of the node of the output instruction in the XSLT document (stored in the
[0106]
For example, when an update is performed to add a node to an XML document or an XSLT document stored in the XML
[0107]
As described above, the nodes in the display data (HTML document) indicated by the display data instruction data represented by the position information of the nodes in the XML document and the XSLT document, even if the XML document and the XSLT document are updated. , The same node as before the update.
[0108]
Focusing on this point, in the present embodiment, the operation position on the display data is determined by the position information (for the node corresponding to the operation position in the XML document and the XSLT document used when generating the display data). (Address in the memory space) to be recorded (as display data instruction data).
[0109]
Next, the correspondence storage data will be described.
[0110]
Here, a description will be given with reference to FIG. 16 in which the correspondence between the nodes in the XML document, the nodes in the XSLT document, and the nodes in the HTML document is easily understood.
[0111]
FIG. 16 illustrates correspondence relationship storage data in a form in which a node in an XML document having a correspondence relationship with the node and positional information on a tree structure of the node in the XSLT document are embedded in each node in the HTML document. I have.
[0112]
FIG. 8 shows a screen display example of the HTML document shown in FIG. The table shown in FIG. 8 has two columns of author names, and the same data, for example, “Kenyoshi Yoshida” is displayed in two places. The text node Z20 corresponding to “Kenyoshi Yoshida” of the
[0113]
Therefore, the text node Z20 in the HTML document in FIG. 16 corresponding to the
[0114]
On the other hand, the text node Z22 (see FIG. 16) in the HTML document corresponding to “Kenyoshi Yoshida” of the
[0115]
Thereby, the
[0116]
However, since the template call may actually be called a plurality of times with the same node set, this display node instruction data does not necessarily indicate a single display data node. However, if it is not unique in practical use, it is sufficient to select a plurality, select only near the beginning of the document, or select both depending on the application.
[0117]
According to the flowchart shown in FIG. 3, an XML document and an XSLT document are read from the
[0118]
Next, the
[0119]
In the above description, the correspondence storage data stored in the
[0120]
As shown in FIG. 8, when the
[0121]
Since the data in the display data operation
[0122]
Next, a case where the
[0123]
4, it is assumed that the XML document stored in the XML
[0124]
The update operation includes, for example, deletion and addition of a node, movement of a node by continuously deleting and adding a node, change of text as a value of a component, change of an attribute of a component, and the like.
[0125]
Here, for example, as illustrated in FIG. 21, it is assumed that nodes X12 to X16 surrounded by a dotted line have been added to a lower hierarchy of the node X1. In this case, the XML
[0126]
As shown in FIGS. 21 and 22, after the XML document stored in the XML
[0127]
The HTML document obtained by re-converting the updated XML document as shown in FIG. 21 is displayed on the browser (step S14). An example of the display is shown in FIG. In the table shown in FIG. 23A, a
[0128]
Next, the display
[0129]
The display
[0130]
As a result of the above procedure, as shown in FIG. 23B, the
[0131]
At this time, when the element in the display data indicated by the display node instruction data is invalid, that is, when the address of the element in the display data corresponding to the display data instruction data does not exist in the
[0132]
In step S17, after the updated XML document is displayed, for example, as shown in FIG. 23 (b), the process again proceeds from this state to step S6 in FIG. Operations can also be performed. The process from the operation on the display data in steps S6 to S9 in FIG. 3 to the reproduction of the operation contents in steps S11 to S17 in FIG. 4 can be repeated as many times as necessary.
[0133]
In the above example, since the operation on the node in the display data is to display the position selected by the user like the selection operation, the operation history (operation log or operation log) stored in the display data operation
[0134]
The operation on a node in the display data is not limited to such a selection operation, and a plurality of different operations may be performed on a plurality of nodes in the display data. Therefore, in such a case, in addition to the display data instruction data, an operation history is made in the display data operation
[0135]
By using such an operation history, according to the flowchart shown in FIG. 4, even after the update of the XML document stored in the XML
[0136]
FIG. 24 shows an example of the operation history as described above, and each operation history data is composed of "operation order", "display data instruction data", and "operation content".
[0137]
The operation content may be stored in a script language, or may be represented by data representing a DOM operation, for example, a method and its arguments. In FIG. 24, the operation content is described in a natural language for the sake of simplicity. For example, “substitution of“ red ”to the background-color of the Style attribute of the display data” is, for example, “this.style. backgroundColor = “red” ”, or“ Set, $ style / backgroundColor, “red” ”and data of a method and its argument.
[0138]
For example, when the operation in the operation history shown in FIG. 24 is performed on the display data (the tree structure shown in FIG. 11) shown in FIG. 8 displayed in step S5 in FIG. It is displayed as shown in FIG.
[0139]
That is, the display
[0140]
Note that the position information of the node in the display data instruction data shown in FIG. 24 is indicated by the address in the memory space and the position information on the tree structure in parentheses next to the address in the memory space for easy understanding.
[0141]
According to the operation history shown in FIG. 24, as an operation corresponding to the operation history in the
[0142]
The result of performing the above operation on the display data shown in FIG. 8 (see FIG. 11 for the tree structure) is a display example shown in FIG.
[0143]
The display
[0144]
At this time, if the node in the HTML document indicated by the display data instruction data is invalid, that is, if the node is not stored in the
[0145]
The operation shown in FIG. 24 is performed on the HTML document (the HTML document displayed as shown in FIG. 8) generated from the XML document shown in FIG. 9 and displayed as shown in FIG. After that, it is assumed that the XML document shown in FIG. 9 is updated as shown in FIG.
[0146]
A procedure for applying the operation history shown in FIG. 24 to the updated XML document will be described with reference to FIG.
[0147]
That is, the updated XML document is converted into an HTML document by the XSLT
[0148]
When the HTML document obtained in step S3 is displayed on the browser, as shown in FIG. 23A, a table with
[0149]
Next, the display
[0150]
As described above, even if the XML document and the XSLT document stored in the XML
[0151]
That is, when the operation log illustrated in FIG. 24 is applied to the display data (HTML document) stored in the display
[0152]
Therefore, the table displayed as shown in FIG. 23A before application of the operation log is displayed as shown in FIG. 26 by applying the operation log shown in FIG. That is, in FIG. 26, the background of the
[0153]
In the above description, the case where the XML document stored in the XML
[0154]
Further, in the above description, the correspondence storage data stored in the
[0155]
That is, as shown in FIGS. 16 and 17, the correspondence storage data stored in the
[0156]
When an update such as addition, deletion, or movement of a node is performed on the XML document stored in the XML
[0157]
The
[0158]
The node
[0159]
Next, taking the operation history shown in FIG. 24 as an example, a case where the node
[0160]
That is, after the operation shown in FIG. 24 is performed on the table on the display screen shown in FIG. 8, the XML document shown in FIG. Suppose that it is updated as shown in FIG. That is, it is assumed that nodes X12 to X16 have been added below node X1.
[0161]
As shown in FIG. 24, before updating the XML document, the position information of the node X3 was “1-2”, but by updating the XML document, the position of the second hierarchy is shifted by one. (Incremented) to "1-3".
[0162]
That is, the node
[0163]
As described above, in the case of the above example, when the position information of the node in the XML document of the display data instruction data indicates that the number of the second hierarchy is “2” or more, the node
[0164]
Therefore, since the position information of the node X2 shown in FIG. 24 is “1-1”, this position information is not updated as shown in FIG.
[0165]
In this example, the case where the second node is added to the second hierarchy of the XML document is shown. However, when the second node of the second hierarchy is deleted, the number of the second hierarchy is similarly changed. If it is larger than “2”, the value is decremented by one, and if it is equal to the number “2” of the second hierarchy, the operation history including the display data instruction data is deleted.
[0166]
In the above example, the case where the XLM document is updated has been described. However, when a node is added / deleted from the XSLT document, the position information of the node in the XSLT document in the display data instruction data is updated in the same manner as described above. do it.
[0167]
Now, according to the flowchart shown in FIG. 4, the XML document shown in FIG. 21 is converted into an HTML document, new correspondence storage data is generated, and stored in the correspondence storage unit 14 (steps S12 to S12). Step S13). When this HTML document is displayed on the browser, it is displayed as a table with one line added as shown in FIG. 23A (step S14). At this point, the DOM operation performed on the display data has been lost. Further, the correspondence storage data is newly generated.
[0168]
Next, since the data in the
[0169]
At this time, as shown in FIG. 27, in the display data instruction data which is the operation in the
[0170]
Each function and each process in the above description is assumed to be realized by predetermined software controlling a computer and peripheral devices, and is described assuming virtual circuit blocks corresponding to each function and each process. Therefore, each hardware element or software element does not necessarily have to correspond one-to-one to each block. Further, all or a part of each function and each process in the above description (or the Web browser itself equipped with each function and each process described below) can be configured by hardware such as a semiconductor chip.
[0171]
As described above, according to the above-described embodiment, in order to display an XML document in a desired display style, based on an HTML document generated by converting the XML document using an XSLT document (style sheet). In the display device for displaying, among the elements in the displayed HTML document, the position of the element to be operated operated by the user is determined by the element of the XML document used to generate the element to be operated and the XSLT. It is stored as display data instruction data which is position information of a document element (preferably, an address in a storage space (for example, a memory space) where each of the above elements is stored). Even if the conversion is performed again after updating the XML document or the XSLY document, the element specified by the display data instruction data in the re-converted HTML document is the same as the element to be operated in the HTML document before the re-conversion. Since they match, the content of the operation performed on the element (element to be operated) in the HTML document before the reconversion can be reproduced for the same element of the operation target in the HTML document after the reconversion.
[0172]
The method of the present invention described in the embodiment of the present invention can be used as a program that can be executed by a computer, such as recording on a magnetic disk (floppy disk, hard disk, etc.), optical disk (CD-ROM, DVD, etc.), semiconductor memory, It can also be stored in a medium and distributed.
[0173]
Note that the present invention is not limited to the above-described embodiment, and can be variously modified in an implementation stage without departing from the gist of the invention. Furthermore, the above embodiments include inventions at various stages, and various inventions can be extracted by appropriate combinations of a plurality of disclosed configuration requirements. For example, even if some components are deleted from all the components shown in the embodiment, (at least one of) the problems described in the column of the problem to be solved by the invention can be solved, and the effect of the invention can be solved. If at least one of the effects described in (1) is obtained, a configuration from which this component is deleted can be extracted as an invention.
[0174]
[Effects of the present invention]
As described above, according to the present invention, when a structured document such as an XML document is converted into another structured document such as an HTML document using a style sheet and displayed, an operation performed on the displayed element is performed. Even after the content is updated after updating the XML document or the style sheet, when the content is converted and displayed again, the same element can be reproduced.
[Brief description of the drawings]
FIG. 1 is a view showing a configuration example of a structured document display device according to an embodiment of the present invention.
FIG. 2 is a diagram showing another configuration example of the structured document display device.
FIG. 3 is a flowchart for explaining the processing operation of the structured document display device.
FIG. 4 is a flowchart illustrating a processing operation of the structured document display device.
FIG. 5 is a diagram showing a specific example of an XML document.
FIG. 6 is a diagram showing a specific example of an XSLT document.
7 is a diagram showing a specific example of an HTML document, and shows an HTML document generated as a result of converting the XML document of FIG. 5 using the XSLT document of FIG. 6;
FIG. 8 is a view showing a display example of the HTML document of FIG. 7;
FIG. 9 is a diagram showing a tree structure of the XML document of FIG. 5;
FIG. 10 is a view showing a tree structure of the XSLT document shown in FIG. 6;
FIG. 11 is a diagram showing a tree structure of the HTML document of FIG. 7;
FIG. 12 is a diagram showing a storage example of the XML document of FIG. 5 in an XML document storage unit.
FIG. 13 is a diagram showing a storage example of the XSLT document in FIG. 6 in an XSLT document storage unit.
FIG. 14 is a diagram showing a storage example of the HTML document of FIG. 7 in a display data storage unit.
FIG. 15 is a diagram illustrating a storage example of correspondence storage data in a correspondence storage unit.
FIG. 16 is a diagram showing another example of storage of correspondence storage data in the correspondence storage unit.
FIG. 17 is a diagram showing still another example of storage of correspondence storage data in the correspondence storage unit.
FIG. 18 is a diagram showing a specific example of display data instruction data.
FIG. 19 is a view showing a display example of an HTML document.
FIG. 20 is a view for explaining the data structure of an XSLT document.
FIG. 21 is a diagram showing a tree structure of an updated XML document.
FIG. 22 is a diagram showing a storage example of the XML document of FIG. 21 in an XML document storage unit.
FIG. 23A is a diagram showing a display example of an HTML document obtained as a result of converting the XML document of FIG. 21 using the XSLT document shown in FIG. 6, and FIG. a) A diagram showing a display example when an operation history is applied to the HTML document in FIG.
FIG. 24 is a diagram showing an example of an operation history (operation log or log) stored in a display data operation log storage unit.
25 is a view showing a display example when the operation log shown in FIG. 24 is applied to the HTML document shown in FIG. 8;
FIG. 26 is a view showing a display example when the operation log shown in FIG. 24 is applied to the HTML document shown in FIG.
FIG. 27 is a diagram showing a result of updating the position information of the display data instruction data by the node
[Explanation of symbols]
1. Data input section
2: Data update unit
3 Display unit
4 Input unit
5 ... Control unit
11 XML document storage unit
12 XSLT document storage unit
13 ... XSLT conversion processing unit
13a ... XSLT processor
13b ... Correlation generation unit
14. Correspondence storage unit
15 Display data storage unit
16 Display data operation unit
17: Display data operation log storage unit
18 ... Display log reapplication section
19: Node position update unit
X1 to X11, Y1 to Y19, Z1 to Z22 ... nodes (elements)
Claims (18)
前記表示手段で表示された前記第3の構造化文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の構造化文書の要素の位置情報と前記第2の構造化文書の要素の位置情報とで前記記憶手段に記憶し、
前記第1の構造化文書あるいは前記第2の構造化文書を更新した後に再び前記変換を行って表示する際には、前記操作対象の要素に対しなされた操作内容を再現するために、前記記憶手段に記憶された前記位置情報を利用することを特徴とする操作位置記憶方法。Storage means, and a conversion rule for converting a first structured document as a structured document having a document structure composed of a plurality of elements into the structured document for displaying the first structured document A structured document display device comprising: a third structured document that is converted by using a second structured document that describes the third structured document; and a display unit that performs display based on the third structured document.
Among the elements of the third structured document displayed on the display means, the position of the element to be operated by the user is determined by the position of the first structured document used in generating the element. Storing in the storage means the position information of the element and the position information of the element of the second structured document;
When the conversion is performed again after the first structured document or the second structured document is updated and displayed, the storage is performed in order to reproduce the operation performed on the element to be operated. An operation position storage method, characterized by using the position information stored in a means.
前記第1の構造化文書と前記第2の構造化文書のうち少なくとも一方の文書構造が更新されたときには、この更新内容に応じて、前記操作対象の要素の位置として記憶された、前記第1の構造化文書の要素と前記第2の構造化文書の要素のそれぞれの前記文書構造上の位置情報を補正することを特徴とする請求項1記載の操作位置記憶方法。The position of the element to be operated is stored as position information on the document structure of each of the element of the first structured document and the element of the second structured document used when generating the element. And
When at least one of the first structured document and the second structured document has been updated, the first structured document stored as the position of the element to be operated according to the updated content. 2. The operation position storage method according to claim 1, wherein the position information on the document structure of each of the element of the structured document and the element of the second structured document is corrected.
この表示手段で表示された前記第3の構造化文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の構造化文書の要素の位置情報と前記第2の構造化文書の要素の位置情報とで記憶する記憶手段と、
を具備し、
前記第1の構造化文書あるいは前記第2の構造化文書を更新した後に再び前記変換を行って表示する際に、前記操作対象の要素に対しなされた操作内容を再現するために、前記記憶手段で記憶された前記位置情報を利用することを特徴とする構造化文書表示装置。A first description describing a conversion rule for converting a first structured document as a structured document having a document structure composed of a plurality of elements into a structured document for displaying the first structured document. A display unit that obtains a third structured document by performing conversion using the second structured document, and performs display based on the third structured document;
Of the elements of the third structured document displayed on the display means, the position of the element to be operated by the user is determined by the position of the first structured document used when generating the element. Storage means for storing the position information of the element and the position information of the element of the second structured document;
With
When updating the first structured document or the second structured document and performing the conversion again and displaying the updated document, the storage means for reproducing the operation performed on the element to be operated A structured document display device using the position information stored in the storage device.
前記第1の構造化文書と前記第2の構造化文書のうち少なくとも一方の文書構造が更新されたときには、この更新内容に応じて、前記操作対象の要素の位置として記憶された、前記第1の構造化文書の要素と前記第2の構造化文書の要素のそれぞれの前記文書構造上の位置情報を補正することを特徴とする請求項4記載の構造化文書表示装置。The position of the element to be operated is stored as position information on the document structure of each of the element of the first structured document and the element of the second structured document used when generating the element. And
When at least one of the first structured document and the second structured document is updated, the first structured document stored as the position of the element to be operated is stored in accordance with the updated content. 5. The structured document display device according to claim 4, wherein the positional information on the document structure of each of the element of the structured document and the element of the second structured document is corrected.
前記第1の構造化文書として入力された第1の文書を前記第2の構造化文書として入力された第2の文書を用いて変換することにより生成された前記第3の構造化文書としての第1の表示文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の文書の要素の位置情報と前記第2の文書の要素の位置情報とで記憶し、
前記第1の文書が更新されたときは、当該第1の文書を更新した結果得られた第3の文書を前記第2の文書を用いて変換することにより生成された前記第3の構造化文書としての第2の表示文書の要素の中から、前記記憶された前記第1の文書の要素と前記第2の文書の要素の位置情報に対応する前記操作対象の要素を求めて、前記表示手段で表示する当該第2の表示文書中の当該操作対象の要素に対し、前記ユーザによる操作の内容を再現することを特徴とする構造化文書表示方法。Storage means, and a conversion rule for converting a first structured document as a structured document having a document structure composed of a plurality of elements into the structured document for displaying the first structured document A structured document display device comprising: a third structured document that is converted by using a second structured document that describes the third structured document; and a display unit that performs display based on the third structured document.
The third structured document generated by converting the first document input as the first structured document using the second document input as the second structured document is used as the third structured document. Among the elements of the first display document, the position of the operation target element operated by the user is determined by the position information of the element of the first document used when generating the element and the position information of the element of the second document. Memorize with the position information of the element,
When the first document is updated, the third structuring generated by converting the third document obtained as a result of updating the first document using the second document. From the elements of the second display document as a document, the stored element of the first document and the operation target element corresponding to the positional information of the element of the second document are obtained, and the display is performed. A method of reproducing a content of an operation by the user with respect to an element to be operated in the second display document displayed by the means.
前記第1の構造化文書として入力された第1の文書を前記第2の構造化文書として入力された第2の文書を用いて変換することにより生成された前記第3の構造化文書としての第1の表示文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の文書の要素の位置情報と前記第2の文書の要素の位置情報で記憶する記憶手段と、
前記第1の文書を更新する第1の更新手段と、
この第1の更新手段で前記第1の文書が更新された結果得られた第3の文書を、前記第2の文書を用いて変換することにより生成された前記第3の構造化文書としての第2の表示文書の要素の中から、前記記憶手段で記憶された前記第1の文書の要素と前記第2の文書の要素の位置情報に対応する前記操作対象の要素を求めて、前記表示手段で表示する当該第2の表示文書中の当該操作対象の要素に対し、前記ユーザによる操作の内容を再現する手段と、
を具備したことを特徴とする構造化文書表示装置。A first description that describes a conversion rule for converting a first structured document as a structured document having a document structure composed of a plurality of elements into a structured document for displaying the first structured document. A third structured document is obtained by performing conversion using the second structured document, and a structured document illuminating apparatus for displaying on the display means based on the third structured document,
The third structured document generated by converting the first document input as the first structured document using the second document input as the second structured document is used as the third structured document. Of the elements of the first display document, the position of the operation target element operated by the user is determined by the position information of the element of the first document used when generating the element and the position information of the element of the second document. Storage means for storing the position information of the element;
First updating means for updating the first document;
The third structured document generated by converting the third document obtained as a result of updating the first document by the first updating means using the second document is used as the third structured document. From among the elements of the second display document, the operation target element corresponding to the position information of the element of the first document and the position information of the element of the second document stored in the storage unit is obtained. Means for reproducing the content of the operation by the user for the element to be operated in the second display document displayed by the means;
A structured document display device comprising:
この第2の更新手段で前記第2の文書を更新した結果得られた第4の文書を用いて前記第1の文書を変換することにより生成された前記第3の構造化文書としての第3の表示文書の要素の中から、前記記憶手段で記憶された前記第1の文書の要素と前記第2の文書の要素の位置情報に対応する前記操作対象の要素を求めて、前記表示手段で表示する当該第3の表示文書中の当該操作対象の要素に対し、前記ユーザによる操作の内容を再現する手段と、
をさらに具備したことを特徴とする請求項10記載の構造化文書表示装置。Second updating means for updating the second document;
The third structured document as the third structured document generated by converting the first document using the fourth document obtained as a result of updating the second document by the second updating means From the elements of the displayed document, the element of the operation target corresponding to the position information of the element of the first document and the position information of the element of the second document stored in the storage means is obtained. Means for reproducing the content of the operation by the user for the element to be operated in the third display document to be displayed;
The structured document display device according to claim 10, further comprising:
前記表示手段で表示する前記第2の表示文書中の前記操作対象の要素に対し、前記記憶手段で記憶された前記操作の内容を再現することを特徴とする請求項10記載の構造化文書表示装置。The storage unit further stores the content of an operation performed on the element to be operated,
11. The structured document display according to claim 10, wherein the content of the operation stored in the storage unit is reproduced for the element to be operated in the second display document displayed by the display unit. apparatus.
前記表示手段で表示する前記第3の表示文書中の前記操作対象の要素に対し、前記記憶手段で記憶された前記操作の内容を再現することを特徴とする請求項11記載の構造化文書表示装置。The storage unit further stores the content of an operation performed on the element to be operated,
12. The structured document display according to claim 11, wherein the content of the operation stored in the storage unit is reproduced for the element to be operated in the third display document displayed by the display unit. apparatus.
コンピュータに、
前記第1の構造化文書として入力された第1の文書を前記第2の構造化文書として入力された第2の文書を用いて変換することにより生成された前記第3の構造化文書としての第1の表示文書の要素のうち、ユーザにより操作された操作対象の要素の位置を、当該要素を生成する際に用いられた前記第1の文書の要素と前記第2の文書の要素の位置情報で記憶する第1のステップと、
前記第1の文書を更新する第2のステップと、
前記第1の文書が更新された結果得られた第3の文書を、前記第2の文書を用いて変換することにより生成された前記第3の構造化文書としての第2の表示文書の要素の中から、前記第1のステップで記憶された前記第1の文書の要素と前記第2の文書の要素の位置情報に対応する前記操作対象の要素を求める第3のステップと、
前記表示手段で表示する前記第2の表示文書中の前記操作対象の要素に対し、前記ユーザによる操作の内容を再現する第4のステップと、
を実行させるプログラム。A first description describing a conversion rule for converting a first structured document as a structured document having a document structure composed of a plurality of elements into a structured document for displaying the first structured document. A program for obtaining a third structured document by performing conversion using the structured document of No. 2, and displaying the third structured document on display means based on the third structured document,
On the computer,
The third structured document generated by converting the first document input as the first structured document using the second document input as the second structured document is used as the third structured document. Of the elements of the first display document, the position of the element to be operated by the user is determined by the position of the element of the first document and the position of the element of the second document used when generating the element. A first step of storing with information;
A second step of updating said first document;
An element of the second display document as the third structured document generated by converting the third document obtained as a result of updating the first document using the second document A third step of obtaining the operation target element corresponding to the position information of the element of the first document and the element of the second document stored in the first step;
A fourth step of reproducing the content of the operation by the user with respect to the element to be operated in the second display document displayed by the display means;
A program that executes
前記第2の文書を更新する5のステップと、
前記第2の文書を更新した結果得られた第4の文書を用いて前記第1の文書を変換することにより生成された前記第3の構造化文書としての第3の表示文書の要素の中から、前記第1のステップで記憶された前記第1の文書の要素と前記第2の文書の要素の位置情報に対応する前記操作対象の要素を求める第6のステップと、
前記表示手段で表示する前記第3の表示文書中の前記操作対象の要素に対し、前記ユーザによる操作の内容を再現する第7のステップと、
をさらに実行させることを特徴とする請求項15記載のプログラム。To the computer,
5 steps for updating the second document;
Among the elements of the third display document as the third structured document generated by converting the first document using the fourth document obtained as a result of updating the second document A sixth step of obtaining the element to be operated corresponding to the position information of the element of the first document and the element of the second document stored in the first step;
A seventh step of reproducing the content of an operation performed by the user with respect to the element to be operated in the third display document displayed by the display means;
16. The program according to claim 15, further comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002191406A JP3788956B2 (en) | 2002-06-28 | 2002-06-28 | Structured document display method, structured document display device, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002191406A JP3788956B2 (en) | 2002-06-28 | 2002-06-28 | Structured document display method, structured document display device, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2004038334A true JP2004038334A (en) | 2004-02-05 |
| JP3788956B2 JP3788956B2 (en) | 2006-06-21 |
Family
ID=31700992
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002191406A Expired - Fee Related JP3788956B2 (en) | 2002-06-28 | 2002-06-28 | Structured document display method, structured document display device, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3788956B2 (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2005098663A1 (en) * | 2004-04-08 | 2005-10-20 | Justsystems Corporation | Information management device |
| WO2005098698A1 (en) * | 2004-04-08 | 2005-10-20 | Justsystems Corporation | Document processing device |
| WO2006051959A1 (en) * | 2004-11-12 | 2006-05-18 | Justsystems Corporation | Document processing device and document processing method |
| WO2006051969A1 (en) * | 2004-11-12 | 2006-05-18 | Justsystems Corporation | Document processing device and document processing method |
| WO2006051960A1 (en) * | 2004-11-12 | 2006-05-18 | Justsystems Corporation | Document processing device and document processing method |
| WO2007007529A1 (en) * | 2005-06-24 | 2007-01-18 | Justsystems Corporation | Document processing device and document processing module |
| US7900136B2 (en) | 2004-11-25 | 2011-03-01 | Canon Kabushiki Kaisha | Structured document processing apparatus and structured document processing method, and program |
| JP2018018280A (en) * | 2016-07-27 | 2018-02-01 | 富士ゼロックス株式会社 | Document display device and program |
| CN115604254A (en) * | 2022-12-15 | 2023-01-13 | 济南丽阳神州智能科技有限公司(Cn) | Breakpoint examination continuation processing method and device |
-
2002
- 2002-06-28 JP JP2002191406A patent/JP3788956B2/en not_active Expired - Fee Related
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPWO2005098663A1 (en) * | 2004-04-08 | 2008-02-28 | 株式会社ジャストシステム | Information management device |
| WO2005098698A1 (en) * | 2004-04-08 | 2005-10-20 | Justsystems Corporation | Document processing device |
| JPWO2005098698A1 (en) * | 2004-04-08 | 2008-02-28 | 株式会社ジャストシステム | Document processing device |
| WO2005098663A1 (en) * | 2004-04-08 | 2005-10-20 | Justsystems Corporation | Information management device |
| WO2006051969A1 (en) * | 2004-11-12 | 2006-05-18 | Justsystems Corporation | Document processing device and document processing method |
| WO2006051960A1 (en) * | 2004-11-12 | 2006-05-18 | Justsystems Corporation | Document processing device and document processing method |
| WO2006051959A1 (en) * | 2004-11-12 | 2006-05-18 | Justsystems Corporation | Document processing device and document processing method |
| US7900136B2 (en) | 2004-11-25 | 2011-03-01 | Canon Kabushiki Kaisha | Structured document processing apparatus and structured document processing method, and program |
| WO2007007529A1 (en) * | 2005-06-24 | 2007-01-18 | Justsystems Corporation | Document processing device and document processing module |
| JPWO2007007529A1 (en) * | 2005-06-24 | 2009-01-29 | 株式会社ジャストシステム | Document processing apparatus and document processing module |
| JP2018018280A (en) * | 2016-07-27 | 2018-02-01 | 富士ゼロックス株式会社 | Document display device and program |
| CN115604254A (en) * | 2022-12-15 | 2023-01-13 | 济南丽阳神州智能科技有限公司(Cn) | Breakpoint examination continuation processing method and device |
| CN115604254B (en) * | 2022-12-15 | 2023-03-31 | 济南丽阳神州智能科技有限公司 | Breakpoint review processing method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3788956B2 (en) | 2006-06-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10976888B2 (en) | Automatically generating column layouts in electronic documents | |
| RU2390834C2 (en) | Method and device for browsing and interacting with electronic worksheet from web-browser | |
| US10534830B2 (en) | Dynamically updating a running page | |
| US9817811B2 (en) | Web server system, dictionary system, dictionary call method, screen control display method, and demonstration application generation method | |
| WO2002080030A2 (en) | Improvements relating to developing documents | |
| EP2417539A2 (en) | Document editing method | |
| JP2004030582A (en) | Structured document editing device, structured document editing method, and program | |
| WO2004097656A1 (en) | Content creation system, content creation method, computer-executable program for executing the content creation method, computer-readable recording medium containing the program, graphical user interface system, and display control method | |
| JP3788956B2 (en) | Structured document display method, structured document display device, and program | |
| US8225217B2 (en) | Method and system for displaying information on a user interface | |
| CN120045807A (en) | Rendering method, system, equipment and storage medium for tree control | |
| CN115204119B (en) | A real-time rich text editing method based on markup language | |
| WO2006137563A1 (en) | Data processing device and data processing method | |
| WO2006137562A1 (en) | Document processing device and document processing method | |
| JP4566196B2 (en) | Document processing method and apparatus | |
| JP4627530B2 (en) | Document processing method and apparatus | |
| JPWO2005098660A1 (en) | Document processing apparatus and document processing method | |
| JPWO2005098658A1 (en) | Document processing apparatus and document processing method | |
| WO2007052680A1 (en) | Document processing device and document processing method | |
| JPWO2006051974A1 (en) | Document processing apparatus and document processing method | |
| JP4720695B2 (en) | Content provision method | |
| JP2014059699A (en) | Demo application generation system and demo application generation program | |
| JP4719743B2 (en) | Graph processing device | |
| JP2002259362A (en) | Document conversion definition generation program | |
| JPWO2005098659A1 (en) | Document processing apparatus and document processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20041227 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050118 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050322 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050322 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060110 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060306 |
|
| 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: 20060322 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060324 |
|
| LAPS | Cancellation because of no payment of annual fees |