JP3828499B2 - Document editing apparatus, document editing method, and document editing program - Google Patents

Document editing apparatus, document editing method, and document editing program Download PDF

Info

Publication number
JP3828499B2
JP3828499B2 JP2003063736A JP2003063736A JP3828499B2 JP 3828499 B2 JP3828499 B2 JP 3828499B2 JP 2003063736 A JP2003063736 A JP 2003063736A JP 2003063736 A JP2003063736 A JP 2003063736A JP 3828499 B2 JP3828499 B2 JP 3828499B2
Authority
JP
Japan
Prior art keywords
document
display
node
branch
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003063736A
Other languages
Japanese (ja)
Other versions
JP2004272684A (en
Inventor
浩 矢尾
春彦 外山
智 白井
大 石丸
達徳 金井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2003063736A priority Critical patent/JP3828499B2/en
Publication of JP2004272684A publication Critical patent/JP2004272684A/en
Application granted granted Critical
Publication of JP3828499B2 publication Critical patent/JP3828499B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、例えば、XML文書をXSLT文書で変換した結果得られた表示文書を介して、当該XML文書中に新たな要素を挿入するいう編集を行うための方法、装置およびプログラムに関する。
【0002】
【従来の技術】
XML文書はデータをツリー構造で記述するので、表形式のワークシートやリレーショナルデータベースと比較して、柔軟なデータ構造を定義できる。
【0003】
また、テキスト形式の文法が標準で定められているので、ユーザが直接テキスト形式のデータを編集することも可能である。しかし、人間の可読性が確保されているとはいえ、XML文書に格納されている情報を把握しやすいとはいえない。開始タグと終了タグの対応を確認したり、無用にテキスト表記が長くなり一覧性が悪いからである。
【0004】
テキスト形式ではなく、ツリー形式で表示した場合も同じである。データ構造には各種の意味があるにも関わらず、それらを一律に同じツリー形式で表示すると、ひと目で簡単にそれらの意味を区別できないからである。
【0005】
XMLデータを編集するには、(1)一般のテキストエディタを用いる、(2)あるデータ専用の編集アプリケーションを用いる、(3)汎用のXMLデータ編集アプリケーションを用いる、といった手法がある。
【0006】
専用アプリケーションでは、表示方法や編集方法をデータに合わせて作りこむことが可能なので、使いやすくかつ動作速度等の効率も良い。しかし、XML文書は柔軟にデータ構造を設計できることが特徴であり、個人が容易にデータを扱う際のフォーマットとして用いるにも適している。これらのデータ構造は千差万別であり、各々に合わせた専用アプリケーションを作るには高度なプログラミング技術が必要である。
【0007】
また、汎用のXMLデータ編集アプリケーションは、一般にそのアプリケーションが提供する表示形式上でデータを編集するものであり、多くはツリー形式またはテーブル形式に変換して表示するものである。
【0008】
スタイルシートを用いると、データを変換して様々な表示ができる。XML文書の構造を変換するスタイルシートの技術として、XSLTが標準として規定されている。XSLTを用いると、高度なプログラミング技術を必要とせず比較的容易に表示形式を変えることができる。また、単純にXMLの要素をHTMLの要素に変換するだけでなく、文書の構造を変換することにより、不要なデータを表示しない形式や比較したいデータや同時に見たいデータを隣接させて表示する形式など、作業に合わせた表示が可能である。
【0009】
XSLT変換後のHTMLの表示上で元XMLデータを編集するには、HTMLノードと元XMLデータのノードとの対応関係を保持する必要がある。
【0010】
XML文書をXSLT文書で変換して、HTMLの表示文書を介して元XML文書を編集するために、元XMLノードの情報を表示ノードに埋め込むというものがある(例えば、非特許文献1参照)。
【0011】
XSLT変換後のHTMLの表示上で新たなデータを追加する場合、元XMLデータにも新たな要素や属性を挿入する。要素を挿入するには、挿入の基準となる要素と挿入方向の指定が必要である。しかし、それらの情報は元XMLデータの構造に関する情報であり、それらをユーザがXSLT変換後のHTML上で把握することは容易ではない。なぜなら、変換後の表示上では要素名や属性名が直接表示されているとは限らず、また、元XMLデータのツリー構造と変換後のHTMLのツリー構造が異なる場合があるからである。
【0012】
既存のXML文書編集においても、要素名や属性名を直接入力しなくて済むように、メニュー形式で挿入候補を選択できるものは存在した。例えば、ノードの種類で分類して、選択メニューに全てのノードをリスト表示するものや、スキーマや型定義に適合するようにリスト表示するノードを制限するものがある。
【0013】
しかし、それらは元XMLデータ上でツリー構造や挿入位置を意識する必要があることに変わりない。
【0014】
【非特許文献1】
矢尾他,“表示スタイル変更可能なWebトップXMLエディタ”,情報処理学会研究報告 2002−DD−36,Vol.2002 No.116,pp.17−24,Nov.2002
【0015】
【発明が解決しようとする課題】
本来、スタイルシートにより構造を変換して表示する場合、画面上でデータが表示される位置によって、そのデータの意味をユーザが把握できるように変換・表示する。そのような表示の上では、ユーザは各データの値を保持している要素名や属性名等を意識せずにデータの意味を把握できる。
【0016】
しかし新規データの挿入のように、元XMLデータの構造の変更を伴う編集を行う際には、ユーザは変換後のHTMLのツリー構造を見ているにもかかわらず、元XMLデータの構造を意識して挿入位置と挿入ノードを指定する必要があった。
【0017】
このように、従来は、XML文書などの所定の文書構造を有する構造化文書はスタイルシートを用いて変換した結果得られる表示文書を介して表示されるため、表示文書を介して編集する場合には、表示文書の文書構造と、その元のXML文書との文書構造が異なるために、特に、XML文書に新たな要素を挿入するという編集が、表示文書上で容易に行えないという問題点があった。
【0018】
そこで、本発明は、XML文書などの所定の文書構造を有する構造化文書をスタイルシートを用いて変換した結果得られる表示文書の表示画面上で、所望の新たな表示要素の挿入位置を指定するだけで、当該表示文書上の挿入位置に当該新たな表示要素を生成する新たな要素をXML文書中に挿入することのできる文書編集方法、装置およびプログラムを提供することを目的とする。
【0019】
【課題を解決するための手段】
本発明は、(a)複数の要素を含む第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む表示文書に変換するための複数の命令文を含む第2の文書を記憶手段に記憶し、(b)前記第1の文書を前記第2の文書を用いて前記表示文書に変換して当該表示文書を表示し、(c)表示された前記表示文書中の複数の表示要素のうちの1つである第1の表示要素の子要素あるいは兄弟要素となる新たな表示要素を挿入するために、少なくとも前記第1の表示要素を指定し、(d)前記第2の文書から、前記新たな表示要素を生成し得る第1の命令文を検索し、(e)前記第1の命令文あるいは当該第1の命令文により発生した前記表示要素を生成するための分岐処理の対象となる前記第1の文書中の前記複数の要素のうちの1つである第1の要素の子要素あるいは兄弟要素であって、前記第1の命令文で指定される条件を満たす新たな要素を生成し、(f)この生成された新たな要素を、前記第1の文書中に挿入する挿入候補として表示し、(g)表示された挿入候補のうち、選択された挿入候補を前記第1の文書に挿入することを特徴とする。
【0020】
本発明によれば、XML文書などの所定の文書構造を有する第1の文書をスタイルシート(第2の文書)を用いて変換した結果得られる表示文書(例えば、HTML文書)の表示画面上で、所望の新たな表示要素の挿入位置を指定するだけで、当該表示文書上の挿入位置に当該新たな表示要素を生成する新たな要素を第1の文書中に挿入することができる。
【0021】
【発明の実施の形態】
以下、本発明の実施形態について図面を参照して説明する。
【0022】
なお、以下の説明では、編集対象データがXML文書、変換手続きを記述したスタイルシートがXSLT(Extensible Stylesheet language Transformation)文書の場合を例にとり説明し、XML文書をXSLT文書の記述に従い変換した結果の文書(表示データ)を表示文書と呼び、表示文書として、HTML文書やSVG文書が生成される場合を例にとり説明する。また、各文書内のノード(要素)を「XMLノード」、「XSLTノード」、「表示ノード」と呼ぶ。
【0023】
(第1の実施形態)
図1は、第1の実施形態にかかるXML文書編集装置の構成例を示したもので、表示部1、入力部2、文書記憶部3、変換処理部4、中間記憶部5、コンテキスト検索部6、分岐検索部7、挿入候補生成部8、候補選択部9、およびデータ更新部10から構成される。
【0024】
文書記憶部3は編集対象のXML文書と、変換手順を記述したXSLT文書を保持する。
【0025】
変換処理部4は、編集対象のXML文書をXSLT文書の記述に従い表示文書に変換して、表示文書および変換ログを生成し、これらを中間記憶部5に記憶する。
【0026】
表示文書は、変換処理の結果の文書である。XSLT文書は、XML文書を表示するための表示データ(HTML文書、SVG文書)を生成するための変換規則が記述されている。
【0027】
変換ログには、変換処理部4の処理過程で実行されたXSLTノードの順に、当該XSLTノードと、当該XSLTノードに対応するXMLノード(すなわちカレントノード)と、当該XSLTノードで出力された表示ノードの対応関係を記録したものである。
【0028】
ここでは、例えば、図2に示すようなXML文書を図3に示すXSLT文書を用いて図4に示すような表示文書に変換する場合を例にとり、本実施形態に係るXSLT文書と変換ログについて簡単に説明する。なお、この例における変換ログの一例を図6に示す。また、図2〜図4のそれぞれにおいて、左端の番号(例えば、1:、2:、…)は、各文書内の要素のそれぞれを特定するための識別子として用いられる番号(ノード番号)で、各要素の各文書中での出現順に振られている。また、図6の変換ログの各エントリ(1行の記録情報)の左端の番号(例えば、1:、2:、…)は、各エントリを識別するための識別子であり、変換処理における処理順を表す番号(エントリ番号)でもある。また、図5は、図4に示した表示文書を描画して表示部1に表示した例を示したものである。
【0029】
XSLT文書に記述されている、XML文書を表示文書に変換するための変換規則とは、▲1▼与えられたXML文書中のどのノードを変換元とし、▲2▼変換先の表示文書にどのようなノードを生成・付加するのかを指定したものである。この2つを指定するために、XSLTでは、「xsl:template」要素が用いられる。上記▲1▼の指定は、当該要素の「match」属性で指定される。すなわち、「match」属性により、XML文書中の処理対象とする要素の条件を指定するようになっている。また、上記▲2▼の指定、すなわち、XML文書中の「match」属性で指定される条件を満たす要素に対して生成される表示文書のノードが、「xsl:template」タグで囲まれた部分に記述されている。「xsl:template」タグで囲まれた部分には、表示文書上でのノードを生成(変換)するための処理手順が記述されている、とも云える。
【0030】
そして、変換先の表示データに構造を持たせるために、「xsl:apply-templates」要素を用いる。
【0031】
図3のXSLT文書で記述されている、ノード番号「1」の「xsl:template」要素では、「books」を含むXML文書中の要素に対し、表示データ上の「TABLE」要素を生成させている。「xsl:template」要素の中では、図3のノード番号「3」の「xsl:apply-templates」要素により、XML文書中の「books」を含む要素の子要素のうち、「select」属性で指定された条件を満たす要素(すなわち、例えば「book」を含む要素)を、別の「xsl:template」要素(ノード番号「4」の要素)を用いて変換した結果を<TABLE></TABLE>の間に埋め込むようになっている。
【0032】
上記の「xsl:apply-templates」命令は、「select」属性により指定された条件を満たすノードに対して、指定した処理手順(ノードを生成するための処理もあれば、ノードを生成しない処理の場合もある)を実行する命令であり、この命令の場合、条件を満たすノードが複数あれば、そのノードの数だけ、上記指定した処理手順を繰返し実行することとなる。
【0033】
XSLTには、「xsl:apply-templates」命令の他にも、「xsl:if」命令が定義されており、この命令では、「test」属性で指定された条件を満たすときには、カレントノードに対し指定した処理手順(ノードを生成するための処理もあれば、ノードを生成しない処理の場合もある)を実行するものである。この「xsl:if」命令の場合、この指定した処理手順は1回のみ実行される。
【0034】
このように、XML文書中の指定した条件を満たすノードに対し、表示データ上のノードを生成するための所定の処理に移行して、当該所定の処理を1回のみ、あるいは複数回繰返して実行する命令をここでは、分岐命令と呼ぶ。また、ここでは、所定の処理(分岐処理)に移行することを分岐するとも呼ぶ。
【0035】
「xsl:if」命令や、「xsl:call-template」命令のように、1回のみ所定の処理を実行する分岐命令を単純分岐命令と呼び、「xsl:apply-templates」命令のように、XML文書中に存在する条件を満たすノードの数だけ、所定の処理の実行を繰り返す分岐命令を繰返し命令と呼ぶ。繰返し命令には、「xsl:apply-templates」命令の他、「xsl:for-each」命令、「xsl:value-of」命令などがある。
【0036】
なお、変換ログについてのさらなる説明は後述する。
【0037】
図1の説明に戻り、表示部1は、編集画面を表示するユーザインタフェースである。XML文書編集装置が動作する計算機のディスプレイ装置がこれにあたる。編集画面には変換処理部4で生成された表示文書を表示規則に従い描画する。例えば表示文書がHTML文書の場合にはHTMLのレンダリングを行う。また、編集画面には各種の編集メニューが表示される。
【0038】
入力部2は、ユーザの操作を受けるユーザインタフェースである。マウスに代表されるポインティングデバイスがこれにあたる。以下の各編集操作において、ユーザが編集画面内で表示文書上の表示ノードまたは編集メニュー上の機能を選択する際に使用される。
【0039】
コンテキスト検索部6は、表示文書上での新たな表示ノードの挿入位置(表示ノードと当該表示ノードと新たな表示ノードとの位置関係)を入力部2から受け、変換ログを参照して、当該挿入位置として指定された表示ノードを基に、当該表示ノードに対応する変換ログ中のログエントリ、カレントノード、XSLTノードを特定する。
【0040】
分岐検索部7は、ユーザにより挿入位置として指定された表示ノードと位置関係を基に、コンテキスト検索部6で特定された、ログエントリとカレントノードとXSLTノードをコンテキストを受け取り、指定された挿入位置に新たな表示ノードを生成するXSLT文書中の分岐命令を求める。そして、この求めた分岐命令を挿入候補生成部8に送る。
【0041】
挿入候補生成部8は、分岐検索部7で求めた分岐命令中の条件(条件式)を解析する。その条件を満たすような、編集対象のXML文書への挿入候補を生成し、その挿入候補のXML文書中での挿入位置を決定する。
【0042】
候補選択部9は、挿入候補生成部8で生成された挿入候補を全て受け取ると、挿入候補の選択メニューを表示部1に出力する。そして入力部2を介してユーザが指定した挿入候補を選択する。
【0043】
データ更新部10は、候補選択部9で選択された挿入候補を、編集対象のXML文書中の当該挿入候補の挿入位置に挿入する。
【0044】
[XML文書編集装置の処理動作]
図1のXML文書編集装置の処理動作の概略を図7のフローチャートを参照して説明する。
【0045】
(ステップS1)変換処理部4において、XML文書をXSLT文書を用いて表示文書に変換する。この変換処理の実行経過を変換ログとして記録する。変換ログには、XSLT文書中の各分岐命令により分岐が発生したとき(変換ログ上の分岐位置)とその分岐による分岐処理の内容が、一連の変換処理の実行経過の中でどこにあるかが容易に理解可能なように記録されている。
【0046】
(ステップS2)表示文書を表示部1に描画する。
【0047】
(ステップS3)表示部1により表示された当該表示文書の表示画面上で、ユーザにより、(新たな表示データを挿入するための)挿入位置が指定される。なお、ここでは、現在の表示文書中に存在しない表示ノードの挿入位置が指定されるのであるが、この新たな表示ノードの挿入位置を指定するためには、例えば、表示画面上の表示領域(表示ノード)と、当該表示ノードと新たな表示データとの位置関係とを指定する。
【0048】
例えば、表示画面上に表示されたテーブル上のある1つのセル内にデータを挿入しようとする場合、セルを表示する表示ノード(例えば、「TD」要素)とその中に表示されるデータを表示する新たな表示ノードとの表示文書上の位置関係は包含関係にある(新たな表示ノードは、セルを表示する表示ノードの子ノードに対応する)。このような位置関係をここでは「child」と呼ぶ。また、表示画面上に表示されたテーブル上のある1つのセルの後や、ある行の後などにデータを挿入しようとする場合、セルや行を表示する表示ノード(例えば、「TD」要素、「TR」要素)とその後に表示される新たな表示ノードは、(木構造上の同じ階層にあるノードであり、従って、表示文書上の位置関係は兄弟関係にある。このような位置関係をここでは「next」あるいは「nextSibling」と呼ぶ。
【0049】
このように、ユーザは、挿入位置として、表示ノードを指定するとともに当該指定した表示ノードとの位置関係を指定する。
【0050】
(ステップS4)コンテキスト検索部6では、変換ログを参照して、表示画面上で挿入位置として指定された表示ノードを生成した、ログエントリ、すなわち、当該指定された表示ノードを生成した、XSLT文書中のノード(XSLTノード)とXML文書中のノード(XMLノード)すなわちカレントノードを求める。
【0051】
(ステップS5)分岐検索部7では、変換ログ中から求めたログエントリを基点として、挿入位置として指定された位置関係を基に、当該指定された挿入位置に新たな表示ノードを生成するようなXSLT文書中の分岐命令を求める。なお、この分岐命令は、1つまたは複数存在する場合もあるが、それらを全て求める。また、ここでは、新たな表示ノードを生成する可能性のある新たな分岐処理の挿入位置(変換ログ中の基準となるエントリと当該エントリと新たな分岐処理との位置関係)を変換ログから求めることにより、当該分岐処理を発生させる分岐命令を求める。
【0052】
(ステップS6)挿入候補生成部8では、この求めた1つまたは複数の分岐命令のそれぞれについて、当該分岐命令の処理対象となる、当該各分岐命令の条件を満たすXML文書中のXMLノードの候補(挿入候補)を生成する。このとき、当該挿入候補のXML文書中の挿入位置(分岐検索部7で検索された分岐命令あるいは当該分岐命令により発生した分岐処理の対象となるXML文書中のXMLノードと、当該XMLノードと挿入候補との位置関係)は、分岐検索部7で検索されたエントリと、当該エントリと新たな分岐処理との位置関係に対応する。但し、挿入候補が属性ノードの場合には、上記位置関係は必要ではなく、XML文書中のどのXMLノードに挿入すればよいかがわかればよい。従って、この場合には、分岐検索部7で検索された分岐命令あるいは当該分岐命令により発生した分岐処理の対象となるXML文書中のXMLノードが当該挿入候補の挿入位置となる。
【0053】
(ステップS7〜ステップS8)候補選択部9では、挿入候補生成部8で生成された各挿入候補に対応する表示ノードを表示画面上に追加表示するなどして、生成された複数の挿入候補をユーザに提示し、この生成された複数の挿入候補のなかから1つをユーザに選択してもらうための選択画面を生成し、それを表示する。
【0054】
(ステップS9〜ステップS10)提示した挿入候補のうち、ユーザにより選択された挿入候補を、データ更新部10がXML文書に挿入する(XML文書の更新)。
【0055】
次に、図1の変換処理部4、変換ログ、コンテキスト検索部6、分岐検索部7、挿入候補生成部8、候補選択部9について詳細に説明する。
【0056】
[変換ログ]
変換ログには、変換処理の過程で実行されたXSLTノードと、当該XSLTノードに対応するXMLノード(すなわちカレントノード)と、当該XSLTノードで出力された表示ノードがあるときは当該表示ノードとの対応関係を記録する。変換ログの構成は様々な形態をとり得る。
【0057】
図6は、変換ログの一例を示したものである。この例は、変換処理においてXSLTノードが実行された順にエントリを作成し、実行されたXSLTノード、およびそのXSLTノードの実行時のカレントノード、およびそのXSLTノードの実行時に出力された表示ノードのそれぞれの識別子を、そのエントリに格納する形態である。
【0058】
変換ログ内で記録する各ノードの識別情報(識別子)の形態として、ノードが属する文書内での位置を記録する形態(第1の形態)がある。図6では、各ノードの識別情報として、各ノードの文書内での出現順序を表す番号を使用している。これは図2および図3で示したXML文書、XSLT文書の左側に付加した各ノードの番号に対応している。なおこの例では、属性を表す属性ノードを含めずに出現順序を数えている。したがって、属性ノードの位置を示す場合には、出現順序+属性名の形式で識別情報を記録している。
【0059】
各ノードの識別情報の他の形態として、文書ルートから指定ノードまでの経路上のノードについて、各レベル内での位置を順に記述する形態(第2の形態)が可能である。例えば、図2のXML文書のノード番号「8」(2番目の「book」要素の「title要素」のノード位置は、最上位のレベルでノード番号「1」のノード(「books」要素)の2つの子ノードのうち、2番目の子ノード(「book」要素)の1番目の子ノードである。これをXPath(XML Path Language)の表記方法に従って記述すると次のようになる。
“/node()[1]/node()[2]/node()[1]”
さらに、次のように記法を省略して、ログのサイズを小さくすることもできる。 “1.2.1”
第2の形態の利点は、文書内での出現順序を用いる形態に比べて、位置情報の計算およびノードの特定の処理量が小さくて済む点である。
【0060】
また、ノードの識別情報として可読なテキスト形式で記録する必要がなく、各ノードが個別のオブジェクトに格納されている場合には、各ノードの識別情報としてノードオブジェクトへの参照を記録する形態(第3の形態)も可能である。
【0061】
変換ログは各エントリに対応する各種ノードの識別情報以外に、分岐命令により実行された処理(分岐処理)に対応する履歴(分岐処理の実行系列)である、実行系列の動的分岐構造情報を保持する。実行系列全体は、分岐処理の実行系列を単位として入れ子構造を成す。動的分岐構造情報には、この入れ子構造と、各エントリがどの実行系列に属するかを示す情報が含まれる。この情報から、各エントリに対応する処理が実行された実行系列、テンプレートをインスタンス化した「xsl:apply-templates」命令、「xsl:apply-templates」命令や「xsl:for-each」命令等の繰返し処理を行う命令において各繰返し処理の範囲を特定することができる。
【0062】
図6に示した変換ログでは、動的分岐構造情報として、分岐処理の実行系列の入れ子構造を字下げで表現している。すなわち、分岐命令に対応するエントリを親ノード、当該分岐命令により発生した分岐、すなわち、分岐処理は、その子ノードとして記録されている。さらに、各分岐処理中に実行するXSLTの命令に対応するエントリも、当該分岐処理に対応するエントリの子ノードとして記録されている。従って、図6に示した変換ログは、ツリー状の構造をもち、この木構造上の子ノードと親ノードとの関係から、どの分岐処理がどの分岐命令により発生したものであるか、各分岐処理において、どのような命令が実行されているかが容易にわかるようになっている。
【0063】
図6では、分岐が生じた場合、分岐命令の実行に対応するエントリの子供として、「branch」エントリという特別なエントリを変換ログに記録する。分岐処理中に実行された命令に対応するエントリは、「branch」エントリの子供として記録する。
【0064】
分岐命令が繰返し命令の場合、当該繰返し命令の処理対象となるノードの条件を指定する、例えば「select」属性に指定されたパス表現にマッチするノード毎に分岐が生じるので、その分岐処理(この場合、繰返し処理)毎に「branch」エントリを記録する。
【0065】
各「branch」エントリに対応するカレントノードは、繰返し命令実行時のカレントノードではなく、テンプレートをインスタンス化した後のカレントノードとする。すなわち、分岐命令中の条件を満たす処理対象のノードが、「branch」エントリに対応するカレントノードとして記録される。
【0066】
例えば図6では、変換ログのエントリ番号「5」のエントリに対応する「xsl:apply-templates」命令では、条件「book」にマッチする要素について繰返し処理を行う。図2のXML文書では、「book」にマッチする要素はノード番号「2」および「7」の「book」要素のみである。この「book」要素についての繰返し処理を記録しているのが、図6の変換ログのエントリ番号「6」および「17」の「branch」エントリである。
【0067】
変換ログの別の形態として、1個のログに全ての情報を記録するのではなく、複数の対応表に分割する形態も可能である。変換ログには対応するXSLTノードおよび表示ノードの識別情報を記録せず、変換ログとは別に表示ノードとログエントリとの対応表と、XSLTノードとログエントリとの対応表を生成する形態が可能である。
【0068】
変換ログのさらに別の形態として、表示ノードに対応するログエントリやXSLTノードの識別情報を直接表示文書中の表示ノードに埋め込む形態も可能である。図8に、この形態の表示文書の一例を示す。この例では、表示ノードに対応するログエントリの識別情報を、特別な名前空間に属する属性「ed:log」の値として表示ノード自体に埋め込んでいる。
【0069】
変換ログのさらに別の形態として、XMLの文法にしたがう形態も可能である。図9に、この形態の変換ログの記述例を示す。この例は、図6に示した形態の変換ログの各エントリをXMLの要素とし、各エントリに対応するXSLTノード、カレントノード、表示ノードの識別情報を属性として表現している。また、図6に示した形態で字下げによって表していた動的な分岐構造を、XMLのツリー構造で表現している。
【0070】
[挿入位置指定]
変換処理部4で表示文書を生成すると、その表示文書を表示部1に表示して、ユーザの操作待ちになる。ここで、表示部1および入力部2を介して、ユーザが表示文書上で挿入位置を指定する。
【0071】
図2に示すようなXML文書を図3に示すXSLT文書を用いて図4に示すような表示文書に変換される。図4に示した表示文書の表示例を図5に示す。表示部1には、図4に示したように、表示文書が描画されており、挿入位置(表示ノードと位置関係)を指定する手段を提供する。
【0072】
図7のステップS3において、ユーザは、マウスポインタをある表示ノードの表示領域上に移動してクリックする。また、ある表示ノードの表示領域の内部や枠の色を一時的に変更してフォーカスがあたっていることを示し、カーソルキーでフォーカスを別の表示ノード(表示領域)に移動して決定キー(例えばエンターキー)で挿入位置を決定する形態も可能である。
【0073】
ユーザが表示ノードを決定すると、次に当該表示ノードと新たな表示ノードとの位置関係の指定を行う。位置関係には、少なくとも、前述したように、「child」と「next」の2種類が選択可能であることが好ましい。
【0074】
例えば、図10(a)に示すように、挿入位置として、テーブルの右下の空欄のセルの表示領域が指定されたとする。この時点で表示部1に、位置関係を指定するためのメニューを表示し、メニュー内に各位置関係を表す領域を用意する。ユーザがマウスポインタを各領域に移動すると、その領域に対応する位置関係を指定したと判断する。また、挿入位置の指定と同様に、カーソルキーを用いてフォーカスを各領域に移動して位置関係を指定する形態も可能である。こうして得られた挿入位置としての表示ノードと位置関係はコンテキスト検索部6へ渡される。
【0075】
例えば、図7のステップS3において、図10(a)に示すように、ユーザが、挿入位置として、テーブルの右下の空欄のセルの表示領域を指定し、位置関係として、図10(b)に示したように、「child」を指定したとする。
【0076】
[コンテキスト検索部]
コンテキスト検索部6では、挿入位置として指定された表示ノードと位置関係を受けると、当該表示ノードを生成した変換ログのエントリ、カレントノード、XSLTノードを特定する。
【0077】
変換ログが、図6の形態の場合、まず挿入位置として指定された表示ノードの識別情報を取得する。この形態では、表示文書内でのノードの出現順序を計算する。次に取得した識別情報と一致する表示ノードの識別情報を持つエントリを変換ログから検索して特定する。
【0078】
図8に示したように、表示文書に、変換ログのエントリ番号が埋め込まれている形態の場合、挿入位置として指定された表示ノードに埋め込まれたエントリの識別情報(ここでは、エントリ番号)を取得して、その識別情報に対応する変換ログのエントリを特定すればよい。
【0079】
次に、特定されたエントリに記録された各ノードの識別情報を取得し、XSLT文書からXSLTノード、XML文書からカレントノードを特定する。
【0080】
例えば、図10(a)、(b)に示すように、表示ノードとしてテーブルの右下の空欄のセルの表示領域が指定されたとき、このセルを表示する表示ノードは、図4のノード番号「10」の表示ノードである。従って、図6に示す変換ログからは、ノード番号「10」の表示ノードの生成は、エントリ番号「24」のログに記録されていることがわかる。このログによれば、当該指定された表示ノードは、ノード番号「8」のXSLTノードで、ノード番号「7」のXMLノードがカレントノードのときに生成されている。
【0081】
得られた変換ログのエントリ、XSLTノードおよびカレントノードは、挿入位置として指定された表示ノードと位置関係とともに分岐検索部7に渡される。
【0082】
[分岐検索部]
分岐検索部7は、コンテキスト検索部6から挿入位置として指定された表示ノードDに対応する変換ログのエントリE、XSLTノードS、カレントノードCを受けて、変換ログとXSLT文書を検索して、表示ノードDとの位置関係が挿入位置として指定された位置関係にある新たな表示ノードを生成する可能性のある新たな分岐処理の挿入位置を変換ログから求める(これを、新たな分岐処理の挿入位置を検索する、ともいう)。変換ログ中の新たな分岐処理の挿入位置が求まれば、当該分岐処理を発生させる分岐命令に対応するエントリは、変換ログ中で、当該分岐処理に対応するエントリに対応するノードのルート方向(上流方向)にあるエントリである。
【0083】
新たな分岐処理の挿入位置の検索処理には、XSLT文書上で静的な階層構造を解析すると同時に、変換ログ上で動的な実行系列の入れ子構造を解析する必要がある。
【0084】
例えば、表示ノードDとの位置関係が「child」の場合(表示ノードDの子ノードを新たに生成する場合)、XSLTノードSの子ノード以外にも、表示ノードDの子ノードを出力するXSLTノードが存在する可能性がある。XSLTノードSの直接の子ノードでない子孫ノードであっても、XSLTノードSからの各階層に出力命令を挟まない子孫ノードが出力する表示ノードは表示ノードDの子ノードとなる。また、XSLTノードSからの各階層に出力命令を挟まない子孫ノードとして「xsl:apply-templates」命令や「xsl:call-template」命令が存在する場合、インスタンス化されたテンプレート内のXSLTノードが出力する表示ノードも表示ノードDの子孫ノードとなる。
【0085】
表示ノードDとの位置関係が「next」の場合(表示ノードDの兄弟ノードを生成する場合)、XSLTノードSの直後の兄弟ノード以外にも、表示ノードDの直後の兄弟ノードを出力するXSLTノードが存在する可能性がある。例えばXSLTノードSの直後の兄弟ノードが出力命令でない場合には、その子孫ノードを調べる必要がある。また、XSLTノードSの直後に兄弟ノードが存在しない場合には、XSLTノードSの親ノードの直後の兄弟ノードを調べる必要がある。位置関係「child」の場合と同様に、別テンプレートのインスタンス化が生じた場合には、そのテンプレートも検索の対象になる。
【0086】
[位置関係が「child」と指定された場合の新たな分岐処理の挿入位置の検索]
まず、表示ノードDとの位置関係として「child」と指定された場合の分岐検索部7の処理動作について、図11〜図15に示すフローチャートを参照して説明する。この処理では、変換ログとXSLT文書を同時に解析しながら、必要に応じてエントリの解析手続き(function seachChild)を再帰的に呼び出す。
【0087】
(1)検索開始
最初に、コンテキスト検索部6から受けた変換ログのエントリを引数Esに代入し、手続き searchChild を呼び出す(図11のステップS101)。
【0088】
(2)function searchChild
引数Esに対応するログエントリに含まれるXSLTノードS(以下、簡単にノードSと呼ぶ)を取得し(ステップS12のステップS102)、当該XSLTノードSの種類(繰返し命令/単純繰返し命令/分岐命令でない命令)に応じた処理を行う。
【0089】
ノードSが繰返し命令の場合(ステップS103)、図13に示した処理動作を行い、ノードSが単純分岐命令の場合(ステップS104)、図14に示した処理動作を行う。それ以外の場合、図15に示した処理動作を行う。
【0090】
(3)ノードSが繰返し命令の場合
図13に示すように、変換ログを参照して、まず、変数Esに代入されたログエントリが子供として「branch」エントリを持つかを調べる(ステップS105)。Esに代入されたログエントリが子供の「branch」エントリを持つ場合、当該「branch」エントリに対応する繰返し処理(分岐処理)の前後および間に新たな繰返し処理を発生させることができる。ここでは先頭の繰返し処理の前と最後の繰返し処理の後ろに新たな繰返し処理を発生させるとする。
【0091】
先頭の繰返し処理の前に新たな繰返し処理を発生させる場合、当該新たな繰返し処理(新たなエントリ)の挿入位置として、Esに代入されたログエントリの先頭の子供の「branch」エントリを表す情報(これを「Es.firstChild」と表す)と、当該先頭の子供の「branch」エントリと新たな繰返し処理との位置関係として、「直前の兄弟」を表す情報(これを「previousSibling」と表す)とを組にして、挿入候補生成部8に送る(ステップS106)。この場合、新たな繰返し処理(分岐処理)は、現在Esに代入されているエントリに含まれるXSLTノードにより発生するので、当該XSLTノードが、当該新たな分岐処理を発生させる分岐命令である。「Es.firstChild」は、この分岐命令を含むログエントリを通知する情報「Es」を含む情報である。
【0092】
また、最後の繰返しの後に新たな繰返し処理を発生させる場合、当該新たな繰返し処理(新たなエントリ)の挿入位置として、Esに代入されたログエントリの最後の子供の「branch」エントリを表す情報(これを「Es.lastChild」と表す)と、当該最後の子供の「branch」エントリと新たな繰返し処理との位置関係として、「直後の兄弟」を表す情報(これを「nextSibling」と表す)とを組にして、挿入候補生成部8に送る(ステップS107)。この場合も、新たな繰返し処理(分岐処理)は、現在Esに代入されているエントリに含まれるXSLTノード(繰返し命令)により発生しているので、当該XSLTノードが、当該新たな分岐処理を発生させる分岐命令である。「Es.firstChild」は、この分岐命令を含むログエントリを通知する情報「Es」を含む情報である。
【0093】
その後、Esの子供の「branch」エントリ(「Es.firstChild」、「Es.lastChild」)をそれぞれ引数Esとして、手続きsearchChildを再帰的に呼び出す。全ての「branch」エントリについて再帰呼び出しが終了したら、Esについての再帰呼び出しを終了して元の手続きへ返る(ステップS108〜ステップS111)。
【0094】
Esが子供の「branch」エントリを持たない場合(ステップS105)、新たな繰返し処理を発生させる条件を考えればよい。すなわち、新たな繰返し処理(新たなエントリ)の挿入位置として、当該Esを表す情報「Es」と当該Esに代入されたログエントリと新たな繰返し処理との位置関係として「子供」を表す情報(ここでは「child」と表す)とを組にして、挿入候補生成部8に送る(ステップS112)。この場合も、新たな繰返し処理(分岐処理)は、現在Esに代入されているエントリに含まれるXSLTノード(繰返し命令)により発生するので、当該XSLTノードが、当該新たな分岐処理を発生させる分岐命令である。その後、Esについての再帰呼び出しを終了して元の手続きへ返る。
【0095】
(4)ノードSが単純分岐命令の場合
図14に示すように、まず、変数Esに代入されたログエントリが子供として「branch」エントリを持つかを調べる(ステップS121)。Esに代入されたログエントリが子供の「branch」エントリを持つ場合、Esの子供の「branch」エントリEbを引数Esとして(ステップS122)、手続きsearchChildを再帰的に呼び出す(ステップS123)。Ebについて再帰呼び出しが終了したら、Esについての再帰呼び出しを終了して元の手続きへ返る。
【0096】
Esに代入されたログエントリが子供の「branch」エントリを持たない場合(ステップS121)、新たな分岐処理を発生させる条件を考えればよい。すなわち、新たな分岐処理の挿入位置として、当該Esを表す情報「Es」と、当該Esに代入されたログエントリと新たな分岐処理との位置関係として「子供」を表す情報(ここでは「child」と表す)とを組にして、挿入候補生成部8に送る(ステップS124)。この場合、新たな(分岐処理)は、現在Esに代入されているエントリに含まれるXSLTノード(単純分岐命令)により発生するので、当該XSLTノードが、当該新たな分岐処理を発生させる分岐命令である。その後、Esについての再帰呼び出しを終了して元の手続きへ返る。
【0097】
(5)ノードSが繰返し命令および単純分岐命令以外の場合
図15に示すように、まず、ノードSの最初の子ノードであるXSLTノードに対応するエントリEcを特定する。
【0098】
Esが「branch」エントリではない場合(ステップS131)、Esの直後の兄弟エントリをEcとする(ステップS132)。Esが「branch」エントリの場合(ステップS131)、その分岐で別のtemplateをインスタンス化した場合は、ノードSの子供XSLTノードではなく、インスタンス化したtemplateの子供ノードを調べる必要がある。そこで、Esの最初の子供エントリがtemplateに対応するエントリの場合(ステップS133)、Esの最初の子供エントリ(templateに対応)を新たにEsとする(ステップS134)。そしてEsに対応するXSLTノード(template)をSとして、Esの直後の兄弟エントリ(templateの先頭の子供に対応)をEcとする(ステップS134)。Esの最初の子供エントリがtemplateに対応するエントリでない場合(ステップS133)、Esの最初の子供エントリ(単純分岐命令の先頭の子供に対応)をEcとする(ステップS135)。
【0099】
上記の処理でEcが存在しない場合(ステップS136)、Esについての再帰呼び出しを終了して元の手続きへ返る。
【0100】
Ecを決定した後(ステップS136)、変換ログ内でEcの後ろの兄弟エントリ(following-sibling)を順に調べて、それぞれについて以下の処理を行う。
【0101】
Ecの後ろの兄弟エントリには、ノードSの子孫ノードに対応するエントリも含まれるので、Ecに対応するXSLTノードC(ステップS137)がSの直接の子ノードに含まれるかどうかを調べる。CがSの子ノードでない場合(ステップS138)、次の兄弟エントリをEcとして(ステップS141)、ステップS136に戻り、処理を繰り返す。
【0102】
CがSの子ノードの場合(ステップS138)、Cが出力命令でないならば(ステップS139)、さらにその子供を調べる必要があるので、Ecを引数Esとして手続きsearchChildを再帰的に呼び出す(ステップS142)。Cが出力命令のときは(ステップS139)、そのまま、ステップS140へ進む。
【0103】
CがSの最後の子供でない場合(ステップS140)、次の兄弟エントリをEcとして(ステップS141)、ステップS136へ戻り、処理を繰り返す。
【0104】
CがSの最後の子供であった場合(ステップS140)、それ以降の兄弟エントリについては調べる必要がないので、Esについての再帰呼び出しを終了して元の手続きへ返る。
【0105】
以上の手続きにより、挿入位置として指定された表示ノードの子供(子ノード)である新たな表示ノードを生成するような新たな分岐処理の変換ログ上での挿入位置(ログエントリと、当該ログエントリと新たな分岐処理との位置関係)を挿入候補生成部8に送ることができる。これにより、挿入候補生成部8に、当該新たな分岐処理を発生させるXSLT文書中の分岐命令(この場合、Esに含まれるXSLTノードが当該新たな分岐処理を発生させるXSLT文書中の分岐命令)を通知することができる。なお、上記実施形態の場合、前述したように、新たな分岐処理の変換ログ上での挿入位置として通知されるログエントリに当該分岐命令を通知する情報が付加されている。
【0106】
[位置関係が「next」と指定された場合の新たな分岐処理の挿入位置の検索]
次に、表示ノードDとの位置関係として「next」と指定された場合の分岐検索部7の処理動作について説明する。まず、この場合に、検索の対象となる変換ログのパターンを図16、図17を参照して説明する。
【0107】
図16(a)に示す変換ログでは、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「1」のエントリであり、その後ろ方向に、繰返し命令に対応するログエントリ「apply-templates」が存在している。その次の「branch」エントリはこの「apply-templates」の子供であって、最初の繰返し処理(分岐処理)である。この場合、
パターン1:繰返し命令の最初の分岐処理(図16(a)ではエントリ番号「3」)の前(図16(a)ではエントリ番号「3」の前)を新たな分岐処理の挿入位置とする。この時、当該新たな分岐処理を発生させる分岐命令は(新たな表示ノードを生成する分岐命令は)、当該「apply-templates」命令である。
【0108】
パターン2:繰返し命令の最初の分岐処理(図16(a)ではエントリ番号「3」〜「6」)の中で新たな分岐処理の挿入位置の検索を続行する。その際、図16(a)では、エントリ番号「3」を注目エントリとする。
【0109】
図16(b)は、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「1」のエントリであり、その後ろ方向に繰返し命令に対応するログエントリ「apply-templates」が存在しているが、その子供として、当該繰返し命令による分岐処理に対応する「branch」エントリが存在していない変換ログを示している。この場合、
パターン3:繰返し命令に対応する子供として(図16(b)では、エントリ番号「2」と「3」の間に)新たな分岐処理を挿入する。このとき、当該新たな分岐処理を発生させる分岐命令は、当該「apply-templates」命令である。
【0110】
パターン4:繰返し命令を無視してその後のエントリ(図16(b)ではエントリ番号「2」)を注目エントリとして、分岐処理の挿入位置の検索を続行する。
【0111】
図16(c)において、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「5」のエントリであるとき、このエントリから新たな分岐処理の挿入位置の検索を開始したが、このエントリで、当該「PPP」要素を生成した分岐処理「branch」エントリが終了している。この場合、
パターン5:現分岐処理の後に(図16(c)のエントリ番号「3」の分岐処理の次の分岐処理として)新たな分岐処理を挿入する。このとき、当該新たな分岐処理を発生させる分岐命令は、現分岐処理(図16(c)のエントリ番号「3」〜「5」)を発生させた分岐命令であり、それは、図16(c)のエントリ番号「2」の「apply-templates」命令である。
【0112】
パターン6:現分岐処理(図16(c)のエントリ番号「3」〜「5」)の次の分岐処理(図16(c)のエントリ番号「6」〜「9」)の中で新たな分岐処理の挿入位置の検索を続行する。その際、図16(c)ではエントリ番号「6」を注目エントリとする。
【0113】
図16(c)において、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「9」のエントリであるとき、このエントリは、変換ログ中の最後の分岐処理の最後のエントリである。この場合には、
パターン7:繰返し命令(図16(c)のエントリ番号「2」)の後のエントリ(図16(c)ではエントリ番号「10」)を注目エントリとして、新たな分岐処理の挿入位置の検索を続行する。
【0114】
図17(a)に示す変換ログでは、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「1」のエントリであり、その後ろ方向に、単純分岐命令に対応するログエントリ「if」(エントリ番号「2」)が存在している。その後のエントリ番号「3」の「branch」エントリは、エントリ番号「2」の「if」命令の条件が満たされてカレントノードに対し実際に分岐処理が生じたことを示している。この場合、
パターン8:単純分岐命令の分岐処理の中で新たな分岐処理の挿入位置の検索を続行する。その際、図17(a)では、エントリ番号「3」を注目エントリとする。
【0115】
図17(b)に示す変換ログでは、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「1」のエントリであり、その後ろ方向に、単純分岐命令に対応するログエントリ「if」(エントリ番号「2」)が存在しているが、当該「if」命令の条件が満たされずに分岐処理が生じなかった場合(「if」エントリの子供に「branch」エントリが存在していない場合)を示している。この場合、
パターン9:単純分岐命令に対応する子供として(図17(b)ではエントリ番号「2」と「3」の間に)当該単純分岐命令の条件を満たした新たな分岐処理を挿入する。この時、当該新たな分岐処理を発生させる分岐命令は、当該単純分岐命令(図16(c)のエントリ番号「2」)の「if」命令である。
【0116】
パターン10:単純分岐命令を無視してその後のエントリ(図17(b)ではエントリ番号「3」)を注目エントリとして、分岐処理の挿入位置の検索を続行する。
【0117】
図17(c)に示す変換ログでは、表示ノードDとしての「PPP」に対応する変換ログのエントリE(注目エントリ)が、エントリ番号「4」のエントリであり、このエントリから新たな分岐処理の挿入位置の検索を開始したが、このエントリで、当該「PPP」要素を生成した分岐処理「branch」エントリが終了している。この場合、
パターン11:単純分岐命令の後のエントリ(図17(c)では、エントリ番号「5」)を注目エントリとして、新たな分岐処理の検索を続行する。
【0118】
図18〜図21は、上記各パターンに対応して、変換ログ上の新たな分岐処理の挿入位置と、分岐命令の検索を行う際の処理動作を説明するためのフローチャートである。
【0119】
フローチャート中のエントリEsは検索の起点となるエントリ(上記注目エントリ)を表し、ノードSはエントリEsに対応するXSLTノードを表す。また、以下の説明における、上記エントリEs、エントリEn、Ebの変換ログ上の位置関係について、図33、図34を参照して説明する。
【0120】
(1)検索開始
最初に、コンテキスト検索部6から受けた変換ログのログエントリをEsとし、Esに対応するXSLTノードをノードSとする。
【0121】
(2)Enの特定
出力する表示ノードの表示文書の木構造上のレベル位置が変わらずにEsの次に実行されるXSLTノードに対応するエントリEnを特定する。
【0122】
Esが「branch」エントリでない場合(ステップS151)、(a1)EnはEsと兄弟である(すなわち、EsとEnとが図33(a)に示すような位置関係にある)、(a2)Enに対応する(Enに含まれる)XSLTノードNがEsに対応する(含まれる)XSLTノードSと兄弟である(SとNが同じ親を持つ)、の2個の条件を満たすEnをEsから後にある兄弟エントリ(Es.nextsibling)から検索する(ステップS153〜ステップS156)。
【0123】
Enが存在しない場合は(ステップS153)、図19のステップS171へ進む。
【0124】
Esが「branch」エントリの場合(ステップS151)、その「branch」エントリに対応する分岐処理で別の「template」をインスタンス化した場合は、ノードSの子供XSLTノードではなく、インスタンス化したtemplateの子供ノードを調べる必要がある。
【0125】
そこで、Esの最初の子供エントリ(Es.firstChild)が「template」エントリの場合(ステップS157)、Esの最初の子供エントリ(「template」エントリ)の直後の兄弟エントリ(「template」エントリの最初の子供エントリ)Es.firstChild.nextsiblingをEnとする(ステップS158)。このときのEsとEnとの位置関係を図33(b)に示す。
【0126】
Esの最初の子供エントリが「template」エントリでない場合(ステップS157)、Esの最初の子供エントリ(分岐命令の先頭の子供エントリ)Es.firstChildをEnとする(ステップS159)。このときのEsとEnとの位置関係を図33(c)に示す。
【0127】
Enが存在しない場合は(ステップS160)、図19のステップS171へ進む。
【0128】
(3)Enの解析
図18のステップS155、ステップS160において、Enが存在する場合、ステップS161に進むが、その際、Enに対応するXSLTノードN(以下、簡単にノードNと呼ぶ)を取得する。
【0129】
ステップS161において、ノードNの種類が繰返し命令の場合、図20に示すフローチャートの処理へ進む。ノードNが繰返し命令でないときは、ステップS162へ進む。ステップS162において、ノードNが単純分岐命令の場合、図21に示すフローチャートの処理へ進む。それ以外の場合、処理は終了する。
【0130】
(4)ノードNが繰返し命令の場合(図20参照)
図20のステップS181へ進み、まず、Enが子供として「branch」エントリを持つかを調べる。Esが「branch」エントリを持つ場合(ステップS181)、それらの「branch」エントリに対応する繰返し処理の前に、新たな繰返しを発生させることができる(上記パターン1に対応)。そこで、ステップS182へ進み、新たな繰返し処理の挿入位置として、Enの先頭の「branch」エントリを表す情報(「En.firstChild」)と、当該先頭の「branch」エントリと新たな繰返し処理との位置関係として「直前の兄弟」を表す情報「previousSibling」とを組にして、挿入候補生成部8に送る。この場合、当該新たな繰返し処理を発生させる分岐命令は、Enに対応するXSLTノードNである。「En.firstChild」は、この分岐命令を含むログエントリを通知する情報「En」を含む情報である。その後、Enの最初の子供の「branch」エントリをEsとして、図18のステップS151へ戻る(上記パターン2に対応)。
【0131】
Esが「branch」エントリを持たない場合(ステップS181)、ノードNの繰返し命令に対応する新たな繰返し処理を発生させる(上記パターン3に対応)。そのために、ステップS184では、当該新たな繰返し処理の挿入位置として、Enを表す情報「En」と、当該Enと新たな繰返し処理との位置関係として「子供」を表す情報「child」とを組にして、挿入候補生成部8に送る。この場合、当該新たな繰返し処理を発生させる分岐命令は、Enに対応するXSLTノードNである。その後、EnをEsとして、図18のステップS151へ戻る(上記パターン4に対応)。
【0132】
(5)ノードNが単純分岐命令の場合(図21参照)
図21のステップS191へ進み、まず、Enが子供として「branch」エントリを持つかを調べる。Enが「branch」エントリを持つ場合(ステップS191)、その「branch」エントリを(「En.firstChild」)をEsとして(ステップS192)、図18のステップS151へ戻る(上記パターン8に対応)。
【0133】
Enが「branch」エントリを持たない場合(ステップS191)、ノードNの単純分岐命令に対応する新たな分岐処理を発生させる(上記パターン9に対応)。そのために、ステップS193では、新たな分岐処理の挿入位置として、Enを表す情報「En」と、当該Enと新たな分岐処理との位置関係として「子供」を表す情報「child」とを組にして、挿入候補生成部8に送る。この場合、当該新たな分岐処理を発生させる分岐命令は、Enに対応するXSLTノードNである。その後、ステップS194へ進み、EnをEsとして、図18のステップS151へ戻る(上記パターン10に対応)。
【0134】
(6)Enが存在しない場合
図18のステップS153、ステップS160において、Enが存在しない場合は、図19のステップS171へ進む。ここでは、Esに対応するエントリ(注目エントリ)で当該エントリが含まれる分岐処理(現分岐処理)が終了している場合(すなわち、変換ログ中で、Esが図34(a)〜(c)に示すような位置に存在する場合)の処理を行う。
【0135】
Esの親(Es.parentNode)がルート(root)、すなわち変換ログの最上位レベルにおける最後のエントリである場合、(ステップS171)、処理を終了する。そうでない場合、(ステップS171)、図34(a)に示すように、Esが含まれる分岐処理に対応する「branch」エントリ(すなわちEsの親ノードEs.parentNode)をEb、その分岐処理を発生させた命令に対応するエントリ(すなわち、Ebの親ノードEb.parentNode)をEn、Enに対応するXSLTノードをNとする(ステップS172)。
【0136】
ノードNが繰返し命令である場合(ステップS173)、Ebの兄弟ノードとして新たな繰返し処理を発生させることができる(上記パターン5に対応)。そこで、ステップS174では、新たな繰返し処理の挿入位置として、Ebを表す情報「Eb」と、当該Ebと新たな繰返し処理との位置関係として「次の兄弟」を表す「nextSibling」とを組にして、挿入候補生成部8に送る。この場合、当該新たな分岐処理を発生させる分岐命令は、Ebと図34(a)に示すような位置関係にあるEnに対応するノードNである。
【0137】
さらに、図34(b)に示すように、Eb(エントリ番号「3」)の直後にその兄弟エントリ(Eb.nextsibling、エントリ番号「6」)が存在する場合(ステップS175)、そのエントリは次の繰返しを表している。そこでそのエントリ番号「6」の「branch」エントリを新たにEsとして(ステップS176)、図18のステップS151へ戻る(上記パターン6に対応)。
【0138】
一方、図34(c)に示すように、Ebの直後にその兄弟エントリが存在しない場合(ステップS175)、Ebが最後の繰返し処理であることを表している。そこでEnを新たなEsとして(ステップS177)、図18のステップS151へ戻る(上記パターン7に対応)。
【0139】
ノードNが単純分岐命令である場合(ステップS178)、EnをEsとして、図18のステップS151へ戻る(上記パターン11に対応)。
【0140】
以上の手続きにより、挿入位置として指定された表示ノードの兄弟ノードである新たな表示ノードを生成するような新たな分岐処理の変換ログ上での挿入位置(ログエントリと、当該ログエントリと新たな分岐処理との位置関係)を挿入候補生成部8に送ることができる。これにより、挿入候補生成部8に、当該新たな分岐処理を発生させるXSLT文書中の分岐命令を通知することができる。なお、上記実施形態の場合、前述したように、新たな分岐処理の変換ログ上での挿入位置として通知されるログエントリに当該分岐命令を通知する情報が付加されている。
【0141】
[挿入候補生成部]
前述したように、分岐検索部7で、新たな分岐処理の変換ログ中の挿入位置(基準となる変換ログ上のエントリと当該エントリと新たな分岐処理との位置関係「previousSibling」「nextSibling」「child」)と、当該新たな分岐処理を発生させるXSLTノードの分岐命令とが求まる。
【0142】
具体的には、▲1▼表示文書中に挿入する新たな表示ノードを生成する新たな分岐処理を発生させるXSLTノード(分岐命令)と、当該XSLTノードの対象となるXMLノードとXML文書中に挿入する新たな要素との位置関係(新たな要素が当該XMLノードの直前の兄弟ノードに対応する場合は「previousSibling」、当該XMLノードの直後の兄弟ノードに対応する場合は「nextSibling」、当該XMLノードの子ノードに対応する場合は「child」)、あるいは、▲2▼表示文書中に挿入する新たな表示ノードを生成する新たな分岐処理を発生させるXSLTノード(分岐命令)と、当該XSLTノードにより発生した分岐処理の対象となったXMLノードとXML文書中に挿入する新たな要素との位置関係(前記同様に、「previousSibling」、「nextSibling」、「child」)が、求まる。
【0143】
そこで、挿入候補生成部8では、分岐検索部7で求めた変換ログ中の挿入位置(変換ログ上のエントリと当該エントリと新たな分岐処理との位置関係)に挿入される新たな分岐処理を発生させる分岐命令を基に、XML文書への挿入候補としてのノードを生成し、その挿入候補のXML文書上での挿入位置を、XML文書中の基点となるノードと上記位置関係となるような位置とする。すなわち、上記▲1▼に示した情報が得られているときは、基点となるXMLノードは、当該挿入候補を生成する新たな分岐処理を発生させる分岐命令(XSLTノード)の対象となるXMLノードであり、上記▲2▼に示した情報が得られているときは、基点となるXMLノードは、当該挿入候補を生成する新たな分岐処理を発生させるXSLTノード(分岐命令)により既に発生された分岐処理の対象となったXMLノードであり、この基点となるXMLノードと当該挿入候補との位置関係が「previousSibling」、「nextSibling」、「child」のいずれかにあるようなXML文書の文書構造上の位置とする。ここでは、上記位置関係(「previousSibling」、「nextSibling」、「child」)をXpathに倣い、「軸」とも呼ぶ。
【0144】
まず、挿入候補生成部8では、分岐検索部7で求めた挿入位置に挿入される新たな分岐処理を発生される分岐命令で指定されている条件を満たす挿入候補を生成する。当該分岐命令が繰返し命令の場合は「select」属性、単純分岐命令の場合は「test」属性で条件(条件式)が指定されているので、これら属性から、挿入候補が満たすべき条件を得る。
【0145】
ここでは簡単な例として、条件式内でノードを表すパス式として、カレントノードからの相対パスを表し、かつ、child軸またはattribute軸以外の軸を含まない場合のみを扱う。
【0146】
述語(predicate)の指定がある場合には、述語の内容が上記の相対パス式か、あるいは、相対パス式と定数との比較式の場合のみを扱う。例えば、“book”、“@point”,“book[review]”,“book[@point=3]”等のパス式がこれに当てはまる。それに対して、“book/title”、“book[.//review]”等は対象外とする。
【0147】
次に、図22に示すフローチャートを参照して、挿入候補生成部8の処理動作について説明する。
【0148】
(1)処理開始
図22では、まず、分岐検索部7で検索した結果得られた新たな分岐処理を発生させる分岐命令に対応するエントリEと、上記位置関係(軸)Axisを受け取る(ステップS201)。
【0149】
次に、Eに対応するXSLTノードをS、Eに対応するカレントノードをCを取得し(ステップS202、ステップS203)、Sの種類に応じた処理を行う(ステップS204、ステップS205)。すなわち、Sが繰返し命令の場合(ステップS204)、図23に示すフローチャートの処理に移行し、Sが単純分岐命令の場合(ステップS205)、図24に示すフローチャートの処理に移行する。それ以外の場合、処理を終了する。
【0150】
(2)ノードSが繰返し命令の場合
Sが繰返し命令の場合、上記パス式のパターンに加えて、それらのパス式の結合式も挿入候補を生成する対象とする。例えば、 “title|review”等の結合式がこれに当てはまる。
【0151】
図23にSが繰返し命令の場合の処理を示す。「select」属性から得られた条件式をCondとする(ステップS211)、このCondをチェックして、上記の対象外の場合には(ステップS212)挿入候補を生成せずに終了する。結合式が得られた場合(ステップS213)、結合されている個々のパス式を取り出す(ステップS214)。
【0152】
各パス式を順次にExpとして、式Exp、カレントノードC、位置関係Axisを引数として、手続き createCand を呼び出す(ステップS215〜ステップS218)。
【0153】
式Condが結合式ではない場合(ステップS213)、式Cond、カレントノードC、位置関係Axisを引数として、手続き createCand を呼び出す(ステップS219)。
【0154】
(3)ノードSが単純繰返し命令の場合
Sが単純繰返し命令(例えば「if」命令)の場合、上記パス式のパターンに加えて、パス式と定数との比較式を、挿入候補を生成する対象とする。例えば、“@point=3”等の比較式がこれに当てはまる。
【0155】
図24に、Sが「if」命令の場合の処理を示す。「test」属性から得られた条件式をCondとする(ステップS221)。このCondをチェックして、上記の対象外の場合は(ステップS222)、挿入候補を生成せずに終了する。適合している場合、パス式か比較式かを調べる(ステップS223)。
【0156】
Condがパス式の場合(ステップS223)、繰返し命令の場合と同様に、式Cond、カレントノードC、位置関係Axisを引数として、手続き createCand を呼び出す(ステップS224)。
【0157】
Condが2項比較式の場合(ステップS223)、ステップS225へ進み、 “パス式 演算子 定数”を “パス式[.演算子 定数]”と変換する。例えば、条件式が “@point=3”の場合には、“@point[.=3]”と変換する。その後、変換後のCond、カレントノードC、位置関係Axisを引数として、手続き createCand を呼び出す(ステップS224)。
【0158】
(4)パス式を満たす候補の生成(function createCand)
手続きcreateCandの処理を図25に示すフローチャートを参照して説明する。まず、パス式の先頭のノードテスト(NodeTest)と述語(Predicate)を分離する(ステップS231)。ノードテストが要素名の場合にはその要素を生成して挿入候補のルート要素Rとする(ステップS232)。述語Pが存在する場合(ステップS233,ステップS234)、述語内の要素または属性に対応するノードTを生成して(ステップS236,ステップS237)、要素Rに子供または属性として付加する(ステップS238)。
【0159】
例えば、条件式が“book[review]”の場合、“<book><review/></book>”というツリーが挿入候補として生成される。また、条件式が、“book[@point=3][review]”の場合、“<book point=3><review/></book>”というツリーが挿入候補として生成される。
【0160】
ノードテストが属性名の場合には、その属性を生成して挿入候補のノードRとする(ステップS232)。
【0161】
述語Pが存在する場合(ステップS234)、その属性自身の値と定数との比較式の場合のみ、ノードRがその条件を満たす値を持つものとする(ステップS235、ステップS240)。例えば、条件式が“@point[.=3]”の場合には、「point」属性を挿入候補とし、その値を「3」とする。
【0162】
上記の手続きで生成した挿入候補R、カレントノードC、位置関係Axisを候補選択部9に送る(ステップS241)。
【0163】
なお、手続き createCand のより好ましい形態として、ノードSが「value-of」命令の場合には、ノードRの値を設定する形態が可能である。述語の存在によってノードRの値が特定されている場合はその値を使用し、値が特定されていない場合は、ノードRの要素名または属性名をその値とする。
【0164】
これにより、「value-of」命令によりノードRの値が表示され、挿入候補の挿入による表示文書の変化を実際に画面上で確認することができる。
【0165】
[編集画面について]
分岐検索部7および挿入候補生成部8で得られた挿入候補は、複数存在する場合がある。候補選択部9では、得られた候補を表示して、それらの中から所望の候補を選択するための画面を生成し、表示部1と入力部2を介してユーザの選択を得る。
【0166】
挿入候補の表示形態として最も簡単な形態は、各挿入候補に対応した領域を表示し、その中に各候補をXML文書の一般的なテキスト形式で表示する形態である。
【0167】
図26に、この形態の挿入候補の表示例の例を示す。この形態では、ユーザがXML文書の要素名および属性名等を判断材料として挿入候補を選択する。図26の例は、図10で挿入位置としてテーブル内の右下の空欄のセルの表示領域(表示文書中の「TD」ノードに対応)を指定し、当該指定した表示ノードと新たに挿入する表示ノードとの位置関係として「child」を指定した後、各挿入候補をXML文書の一般的なテキスト形式で表示するウインドウR1を表示した例である。
【0168】
この例では、前述の分岐検索部7の処理により、図6の変換ログ中のエントリ番号「25」の「value-of」命令により新たな分岐処理を発生させればよいことがわかる。そこで、当該新たな分岐処理の挿入位置として、エントリ番号「25」のログエントリと、当該ログエントリと新たな分岐処理との位置関係として「子供」を表す情報「child」とを組にして、挿入候補生成部8に送る(図13のステップS112)。
【0169】
挿入候補生成部8では、XSLT文書中の当該新たな分岐処理を発生させる分岐命令「value-of」の条件式「@point」を満たす挿入候補を生成する。当該挿入候補のXML文書中の挿入位置は、当該分岐命令「value-of」の対象となるXMLノードとの位置関係が「child」となる位置に対応する。この場合、該分岐命令「value-of」の対象となるXMLノードは、図2のノード番号「7」のXMLノードであり、このノードとの位置関係が「子供」(または挿入候補が属性ノードの場合には「属性」)となるような挿入候補が生成される。
【0170】
この場合、候補選択部9には、挿入候補生成部8で生成された各挿入候補と、各挿入候補のXML文書中の挿入位置が渡される(図28のステップS251)。すなわち、挿入候補=「point」属性(値は文字列“point”)と、当該挿入候補のXML文書中の挿入位置として、カレントノード=ノード番号「7」(/books[1]/book[2])、カレントノードと当該挿入候補との位置関係=子供「child」が送られる。
【0171】
候補選択部9では、挿入候補生成部8で生成された各挿入候補と各挿入候補の挿入位置を表示するウインドウR1を生成し、表示部1に表示する(ステップS252〜ステップS254)。
【0172】
この例では挿入候補はこの1個だけであるので、図26の表示画面上では、この挿入候補に対応する領域のみが表示されている。
【0173】
挿入候補のより好ましい表示形態としては、各挿入候補を仮にXML文書に挿入して、XSLT文書によりHTML文書に変換して、プレビューを編集画面に表示する形態が可能である。図27に、この形態の表示例を示す。
【0174】
図26のように、ウインドウR1に挿入候補を表示した後(図28のステップS254)、ユーザが所望の挿入候補にマウスポインタを移動すると、対応する挿入候補を仮挿入したXML文書の変換結果を図27に示すように、プレビューで表示する。
【0175】
さらに、ユーザがウインドウR1に表示されている所望の挿入候補に対し、マウスクリックする等の決定動作を行うと、当該挿入候補の選択が確定される。
【0176】
図27の例では、ユーザがウインドウR1に表示されている挿入候補にポインタを移動すると(図28のステップS255)、候補選択部9は、挿入候補(候補=「point」属性(値は文字列“point”)と、当該挿入候補のXML文書中の挿入位置として、ノード番号「7」に対応するXMLノード(/books[1]/book[2])と当該ノードと当該挿入候補との位置関係=「子供(属性)」とを基に、文書記憶部3に格納されているXML文書のコピー(仮文書)に、挿入候補(候補=「point」属性(値は文字列“point”)を、ノード番号「7」に対応するXMLノード(/books[1]/book[2])と当該挿入候補との位置関係=「子供(属性)」となる挿入位置に挿入する。この挿入候補を挿入したXML文書のコピーを、XSLT文書を用いて表示文書に変換して、その変換結果としての表示文書を、現在の表示文書の代わりに表示部1に表示する(ステップS256〜ステップS258)。その結果、図27に示すように、テーブルの右下の空欄のセル内には、挿入候補の「point」属性の値である「@point」という文字列が表示される。
【0177】
ユーザがウインドウR1に表示されている所望の挿入候補に対し、マウスクリックする等の決定動作を行うと、当該挿入候補の選択が確定されるので(ステップS259)、この場合は、データ更新部10に対し、確定された挿入候補と、その挿入位置を渡す(ステップS260)。
【0178】
例えば、図27の場合、挿入候補(候補=「point」属性(値は文字列“point”)と、当該挿入候補のXML文書中の挿入位置として、ノード番号「7」(/books[1]/book[2])と当該ノードと当該挿入候補との位置関係=「子供(属性)」とが、データ更新部10へ渡される。
【0179】
データ更新部10では、文書記憶部3に格納されているXML文書に、挿入候補(候補=「point」属性(値は文字列“point”)を、ノード番号「7」に対応するノード(/books[1]/book[2])と当該挿入候補との位置関係=「子供(属性)」となる挿入位置に挿入する。
【0180】
その後、変換処理部4で、前述同様に、当該更新されたXML文書をXSLT文書を用いて表示文書に変換し(その際、変換ログを記録する)、表示部1に当該表示文書を表示する。
【0181】
なお、決定動作を行わずに表示画面上で、他の挿入位置に対応する領域に、マウスポインタを移動した場合、分岐検索部7から新たに処理を開始して、挿入候補の表示内容を切り替える形態も可能である。
【0182】
以上、説明したように、上記第1の実施形態のXML文書編集装置によれば、ユーザが表示文書上で、新たな表示ノードの挿入位置(現在表示されている表示ノードと、当該表示ノードと新たな表示ノードとの位置関係)を指定すると、当該新たな表示ノードを生成するXSLT文書中の分岐命令を検索し、当該分岐命令による分岐処理により当該新たな表示ノードを生成するようなXML文書中の新たなXMLノードを挿入候補として生成し、当該挿入候補のXML文書中の挿入位置を求める。挿入候補は、上記検索された分岐命令の対象となるXMLノード、あるいは、上記検索された分岐命令の対象となるXMLノードにより既に発生された分岐処理の対象となったXMLノードの子ノード(属性ノードを含む)と直前の兄弟ノードと直後の兄弟ノードのいずれかとしてXML文書中に挿入される。
【0183】
各挿入候補をXML文書中のそれぞれの挿入位置に挿入した結果得られる表示文書をプレビューすることで、ユーザは複数の挿入候補から、実際にユーザが希望する結果をもたらすXML文書の編集結果が得られる挿入候補を選択することができる。
【0184】
挿入候補生成部8によって、ユーザが指定した位置の表示に変化を及ぼす挿入候補を生成・提示することが可能である。ユーザはXML文書のツリー構造や要素名、属性名を意識せずに、スタイルシート(例えばXML文書)による変換後の画面上の位置とデータの関係のみで文書データの編集が可能となる。
【0185】
(第2の実施形態)
上記第1の実施形態のXML文書編集装置では、表示文書中の新たな表示ノードを挿入するための挿入位置を指定する際には、表示画面に現在表示されている表示ノードと、新たな挿入ノードとの位置関係(「child」、「next」)とを指定していた。
【0186】
しかし、このような挿入位置の指定方法では、画面上に表示されていない表示ノードを挿入位置として指定することはできない。例えば、表示文書(HTML文書)で「TABLE」要素で表示されるテーブル内で、ある行の下にもう一行新たに追加したい場合、この新たな行を表す「TR」ノードは画面上で指定することはできない。
【0187】
また、表示文書中のセルを表す「TD」ノードの後ろに(兄弟ノードとして)「TD」ノードを追加する際は、画面上では「右」に表示されるのに対し、行を表す「TR」ノードの後ろに(兄弟ノードとして)「TR」ノードを追加する際は画面上では「下」に表示される。したがって、HTMLの表示規則を知っているユーザは画面上の「右」「下」をHTML上の兄弟ノードを追加するという意味で、位置関係として「next」として指定できるが、表示規則を知らないユーザにとっては操作と編集メニューの認識のギャップが生じる。
【0188】
このように、実際の表示画面上の表示上でのユーザ所望の挿入位置とHTML文書の構造中の挿入位置とが、必ずしも明確であるとは云えない。
【0189】
そこで、第2の実施形態に係るXML文書編集装置では、上記の問題を解決するために、挿入位置の指定方法として、ユーザが表示画面上で指定した挿入位置を、XML文書編集装置内の処理に適した挿入位置に変換する挿入位置変換部11を有している。
【0190】
図29は、第2の実施形態に係るXML文書編集装置の構成例を示した者で、図1と同一部分には同一符号を付し、異なる部分についてのみ説明する。すなわち、図29では、挿入位置変換部11と、この挿入位置変換部11で用いる変換規則を記憶する変換規則記憶部12をさらに有している。
【0191】
挿入位置変換部11では、入力部2から得られたユーザにより入力された挿入位置がコンテキスト検索部6に渡る間に、変換規則記憶部12に記憶されている変換規則を用いて当該入力した挿入位置をXML文書編集装置内の処理に適した挿入位置に変換する。そして、挿入位置変換部11で得られた挿入位置を用いて、コンテキスト検索部6、分岐検索部7,挿入候補生成部8,候補選択部9等の各構成部において、前述の第1の実施形態のXML文書編集装置と同様の処理動作が行われる。それ以外は、前述の第1の実施形態のXML文書編集装置と同様である。
【0192】
ユーザにとって、表示文書の表示されている表示画面上で挿入位置を指定する場合、表示画面上で現在表示されているいずれかの表示領域を指定して、当該該表示領域を基点にその中か右側か下側かで指定することが自然である。従って、図7のステップS2で表示文書を表示した後、ステップS3において、ユーザが、新たな表示ノードの挿入位置として、表示画面上のある表示領域(すなわち、表示ノード)を指定したとき、新たな表示ノードと当該表示領域との位置関係を、「中(inner)」、「右(right)」、「下(down)」といった画面上での位置関係で指定するための編集メニューを表示する。
【0193】
例えば、図30に示すように、(表示文書を表示した)表示画面上に表示されたテーブル中の左下のセルを選択すると、上記編集メニューが表示される。この編集メニューによれば、当該選択されたセルを基点にして、当該セル内を挿入位置とする場合「中(inner)」と、当該セルの右側に新たなセルを挿入する場合「右(right)」と、当該セルの下側に新たな行を挿入する場合「下(down)」とのいずれかを選択することができる。ユーザがこの編集メニューから「下(down)」を選択したとする。この場合、入力部2からは、ユーザ指定の挿入位置として、指定された表示ノード(図4のHTML文書中のノード番号「8」の表示ノード)と、指定された位置関係「down」とを組にして、挿入位置変換部11へ渡される。
【0194】
挿入位置変換部11は、ユーザ指定の挿入位置情報(例えば、上記のように、表示ノードBinと位置関係Ainとの組)を受けると、変換規則記憶部12に記憶されている各変換規則の条件部に記述されている条件を参照して、受け取ったユーザ指定の挿入位置が条件にマッチする変換規則を取得する。
【0195】
その変換規則に従い、ユーザ指定の挿入位置を、装置内の処理で用いる挿入位置情報(表示ノードと位置関係との組)に変換して、コンテキスト検索部6に送る。その後の処理は前述の第1の実施形態と同じである。
【0196】
上記例のように、表示ノード「TD」を指定するとともに、位置関係として「down」が指定された場合には、当該セルの下側に新たな行を挿入するための挿入位置、すなわち、表示ノード「TR」と当該表示ノードと新たな表示ノードとの位置関係「next」に変換される。
【0197】
この場合に適用される変換規則記憶部12に記憶される変換規則は、例えば、条件(表示ノード「TD」,位置関係「down」)→変換後の挿入位置(指定された表示ノードの親ノードである「TR」ノード、位置関係「next」)である。変換後の挿入位置としては、表示ノードの要素名と、当該表示ノードと新たな表示ノードとの位置関係が指定されている。
【0198】
ユーザにより入力された挿入位置が、変換規則の条件部と一致した場合、挿入位置変換部11は、変換後の(表示ノード、位置関係)をコンテキスト検索部6に送る。例えば、上記例の場合、指定された「TD」を含むTRノードと位置関係「next」、すなわち(TR、next)がコンテキスト検索部11へ送られる。
【0199】
別の例として、ユーザが、表示ノード「TD」を指定するとともに、位置関係として「right」を指定した場合、これに適用される変換規則は、(TD、right)→(TD、next)であり、この変換規則によると、ユーザが挿入位置としてテーブル内のあるTDノードを指定し、位置関係として「right」を指定すると、コンテキスト検索部6には、挿入位置として、指定されたTDノードと、当該TDノードと新たな表示ノードとの位置関係として「next」が送られる。
【0200】
なお、マッチする規則が複数ある場合には、それぞれの規則の変換結果の組を全てコンテキスト検索部6に送る。コンテキスト検索部6、分岐検索部7、挿入候補生成部8は、それぞれの組に対して処理を行う。挿入候補選択部8は、それらの処理で生成された挿入候補を全て選択メニューに加える。
【0201】
マッチする規則が存在しない場合は、下記のデフォルト変換規則を適用する。
【0202】
(*、right)→(*、next)
(*,down)→(*、next)
(*,inner)→(*、child)
Binに指定された「*」は、任意の要素(ノード)を表すものとする。
【0203】
変換規則の別の形態として、変換前後の挿入位置の指定としてXPathのパスパターンおよびパス式の表記が可能である。この形態の変換規則は
条件(パスパターンPin、位置関係Ain)→(パス式Pout、位置関係Aout)の形態をとる。
【0204】
ユーザ指定の挿入位置(表示ノードBorg,位置関係Aorg)の組が、変換規則の条件部にマッチしているかどうかの判断は、Borgに対応する表示ノードが変換規則のパスパターンPinにマッチし、かつAorgが変換規則のAinと一致する場合に、マッチしていると判断する。変換規則にマッチしている場合、変換後の位置関係はAoutとなる。変換後の表示ノードは、BorgをコンテキストノードとしてPoutを評価した結果のノード集合に含まれるノードBoutとなる。変換後、(Bout,Aout)の組をコンテキスト検索部に送る。
【0205】
なお、Boutが複数存在する場合には、マッチする規則が複数ある場合と同様に、それぞれのBoutとAoutの組を全てコンテキスト検索部6に送る。
【0206】
例えば、(TD|TH、down)→(parent::TR,nextSibling)という変換規則は、ユーザが挿入位置としてテーブル内のセルを表すあるTDノードまたは見出し文字を表すTHノードを指定し、位置関係として「down」を指定すると当該変換規則の条件部にマッチする。変換後は表示ノードBoutとして、ユーザが指定したTDノードまたはTHノードの親TRノード、位置関係Aoutとして「next」とがコンテキスト検索部6に送られる。これは、テーブル内のあるカラムの下を指定すると、次の行が挿入されることを期待した規則である。
【0207】
図30において、ユーザにより、表示ノード(図4のHTML文書中のノード番号「8」の表示ノード)と、位置関係「down」が挿入位置として指定されると、上記の変換規則(条件(表示ノード「TD」,位置関係「down」)→(表示ノード「TR」、位置関係「next」))にマッチする。従って、指定された表示ノードは、図4のHTML文書中のノード番号「7」の表示ノードに変換され、位置関係は「next」に変換される。そして、この変換後の挿入位置が、コンテキスト検索部6に送られる。コンテキスト検索部6、分岐検索部7、挿入候補生成部8の処理により、挿入候補Rとして“<book/>”、当該挿入候補のXML文書中の挿入位置として、XMLノードC=ノード番号「7」、当該XMLノードCと挿入候補との位置関係として、Axis=「nextSibling」が候補選択部9に送られる。
【0208】
当該挿入候補をXML文書のコピーに挿入して(すなわち、図2のXML文書に3番目の「book」要素が挿入されて)、プレビューが表示されたとき(図28のステップS251〜ステップS258)の画面表示例を図32に示す。
【0209】
以上説明したように、上記第2の実施形態によれば、実際の表示画面上のユーザ所望の挿入位置からHTML文書の文書構造中の挿入位置への変換が可能となり、ユーザの理解し易い、指示し易い形態で表示画面上で挿入位置を指定することができる。
【0210】
なお、ユーザが挿入位置を指定する場合、上記のように、現在表示されている表示ノードのうち基点となる表示ノードと当該表示ノードとの位置関係を指定していたが、この場合に限らない。すなわち、上記変換規則を用いれば、表示画面の所望の一点あるいは領域を指定することにより挿入位置を指定することも可能である。この場合の変換規則は、指定された表示領域を条件とし、この条件にマッチするユーザ指定の挿入位置を、当該表示領域に対応する変換後の表示ノードと、新たな表示ノードとの位置関係とに変換することを指定したものとなる。
【0211】
また、画面に表示されない表示ノードを挿入位置とする必要がある場合に、画面に表示される別の表示ノードを挿入位置とする操作で代用することができる。
【0212】
本発明の実施の形態に記載した本発明の手法は、コンピュータに実行させることのできるプログラムとして実現可能であるとともに、このプログラムを磁気ディスク(フレキシブルディスク、ハードディスクなど)、光ディスク(CD−ROM、DVDなど)、半導体メモリなどの記録媒体に格納して頒布することもできる。
【0213】
また、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。
【0214】
【発明の効果】
以上説明したように、本発明によれば、XML文書などの所定の文書構造を有する構造化文書をスタイルシートを用いて変換した結果得られる表示文書の表示画面上で、所望の新たな表示要素の挿入位置を指定するだけで、当該表示文書上の挿入位置に当該新たな表示要素を生成する新たな要素をXML文書中に挿入することができる。
【図面の簡単な説明】
【図1】 本発明の第1の実施形態に係るXML文書編集装置の構成例を示した図。
【図2】 編集対象のXML文書の一例を示す図。
【図3】 スタイルシートとしてのXSLT文書の一例を示す図。
【図4】 表示文書の一例を示す図。
【図5】 表示文書の表示例を示す図。
【図6】 変換ログの一例を示す図。
【図7】 図1のXML文書編集装置の処理動作を説明するためのフローチャート。
【図8】 変換ログの他の例を示す図。
【図9】 変換ログのさらに他の例を示す図。
【図10】 表示文書の表示画面上で、ユーザが新たな表示ノードの挿入位置を指定するための画面表示例を示す図で、(a)図は、マウスポインタによる挿入位置の基点となる表示ノードを指定するときの画面表示例を示し、(b)図は、マウスポインタによる基点の表示ノードと新たな表示ノードとの位置関係を指定するときの画面表示例を示している。
【図11】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャートで、挿入位置として指定さた基点の表示ノードとの位置関係が子ノード「child」となる新たな表示ノードを生成する可能性のある新たな分岐処理の挿入位置を変換ログから求めるための処理動作を示している。
【図12】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図13】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図14】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図15】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図16】 挿入位置として指定された基点の表示ノードとの位置関係として兄弟ノード「next」と指定された場合の分岐検索部7の処理動作を説明するための、検索の対象となる変換ログのパターンを示す図。
【図17】 挿入位置として指定された基点の表示ノードとの位置関係として兄弟ノード「next」と指定された場合の分岐検索部7の処理動作を説明するための、検索の対象となる変換ログのパターンを示す図。
【図18】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャートで、挿入位置として指定さえた基点の表示ノードとの位置関係が兄弟ノードとなる新たな表示ノードを生成する可能性のある新たな分岐処理の挿入位置を変換ログから求めるための処理動作を示している。
【図19】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図20】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図21】 分岐検索部の新たな分岐処理の検索処理動作を説明するためのフローチャート。
【図22】 挿入候補生成部の処理動作を説明するためのフローチャート。
【図23】 挿入候補生成部の処理動作を説明するためのフローチャート。
【図24】 挿入候補生成部の処理動作を説明するためのフローチャート。
【図25】 挿入候補生成部の処理動作を説明するためのフローチャート。
【図26】 候補選択部で生成する選択メニューの表示例を示す図。
【図27】 候補選択部で生成する選択メニューの表示例を示す図。
【図28】 候補選択部の処理動作を説明するためのフローチャート。
【図29】 本発明の第2の実施形態に係るXML文書編集装置の構成例を示した図。
【図30】 表示文書の表示画面上で、ユーザが新たな表示ノードの挿入位置を指定するための画面表示例を示す図。
【図31】 表示文書の表示画面上で、ユーザが新たな表示ノードの挿入位置を指定するための画面表示例を示す図。
【図32】 挿入候補の表示例を示した図。
【図33】 分岐検索部の新たな分岐処理の検索処理動作を説明するための図で、エントリEs、エントリEn、Ebの変換ログ上の位置関係について説明するための図。
【図34】 分岐検索部の新たな分岐処理の検索処理動作を説明するための図で、エントリEs、エントリEn、Ebの変換ログ上の位置関係について説明するための図。
【符号の説明】
1…表示部、2…入力部、3…文書記憶部、4…変換処理部、5…中間記憶部、6…コンテキスト検索部、7…分岐検索部、8…挿入候補生成部、9…候補選択部、10…データ更新部、11…挿入位置変換部、12…変換規則記憶部。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method, an apparatus, and a program for performing editing such as inserting a new element into an XML document via a display document obtained as a result of converting the XML document with an XSLT document, for example.
[0002]
[Prior art]
Since XML documents describe data in a tree structure, a flexible data structure can be defined in comparison with a tabular worksheet or relational database.
[0003]
In addition, since the text format grammar is defined as a standard, the user can directly edit the text format data. However, although human readability is ensured, it is not easy to grasp information stored in an XML document. This is because the correspondence between the start tag and the end tag is confirmed, or the text notation becomes unnecessarily long and the listability is poor.
[0004]
The same is true when the tree format is used instead of the text format. This is because even though the data structure has various meanings, if they are displayed uniformly in the same tree format, they cannot be easily distinguished at a glance.
[0005]
To edit XML data, there are methods such as (1) using a general text editor, (2) using an editing application dedicated to certain data, and (3) using a general-purpose XML data editing application.
[0006]
In the dedicated application, the display method and editing method can be created according to the data, so it is easy to use and efficient in terms of operation speed. However, an XML document is characterized in that a data structure can be designed flexibly, and is suitable for use as a format when an individual easily handles data. These data structures vary widely, and advanced programming techniques are required to create dedicated applications tailored to each.
[0007]
Further, general-purpose XML data editing applications generally edit data on a display format provided by the application, and many of them are converted into a tree format or a table format and displayed.
[0008]
Using a style sheet, you can convert the data and display it in various ways. XSLT is defined as a standard as a style sheet technology for converting the structure of an XML document. With XSLT, the display format can be changed relatively easily without the need for advanced programming techniques. In addition to simply converting XML elements to HTML elements, the document structure is converted so that unnecessary data is not displayed, data to be compared, and data to be viewed are displayed adjacent to each other. It is possible to display according to the work.
[0009]
In order to edit the original XML data on the HTML display after the XSLT conversion, it is necessary to maintain the correspondence relationship between the HTML node and the original XML data node.
[0010]
In order to convert an XML document with an XSLT document and edit the original XML document via an HTML display document, information of the original XML node is embedded in the display node (see, for example, Non-Patent Document 1).
[0011]
When new data is added on the HTML display after XSLT conversion, new elements and attributes are also inserted into the original XML data. In order to insert an element, it is necessary to specify an element to be inserted and an insertion direction. However, these pieces of information are information relating to the structure of the original XML data, and it is not easy for the user to grasp them on the HTML after XSLT conversion. This is because the element name and attribute name are not directly displayed on the display after conversion, and the tree structure of the original XML data may be different from the tree structure of the HTML after conversion.
[0012]
Even in the existing XML document editing, there is an item in which insertion candidates can be selected in a menu format so that it is not necessary to directly input an element name or an attribute name. For example, there are a type that classifies by node type and displays a list of all nodes in the selection menu, and a type that restricts the nodes displayed in a list so as to conform to the schema and type definition.
[0013]
However, they still need to be aware of the tree structure and insertion position on the original XML data.
[0014]
[Non-Patent Document 1]
Yao et al., “Web Top XML Editor with Changeable Display Style”, Information Processing Society of Japan Research Report 2002-DD-36, Vol. 2002 No. 116, pp. 17-24, Nov. 2002
[0015]
[Problems to be solved by the invention]
Originally, when the structure is converted by a style sheet and displayed, the data is converted and displayed so that the user can understand the meaning of the data depending on the position where the data is displayed on the screen. On such a display, the user can grasp the meaning of the data without being conscious of the element name or attribute name holding the value of each data.
[0016]
However, when performing editing that involves changing the structure of the original XML data, such as inserting new data, the user is aware of the structure of the original XML data, even though he / she is looking at the converted HTML tree structure. It was necessary to specify the insertion position and insertion node.
[0017]
As described above, conventionally, a structured document having a predetermined document structure such as an XML document is displayed through a display document obtained as a result of conversion using a style sheet. Therefore, when editing through a display document, Since the document structure of the display document is different from the document structure of the original XML document, editing such as inserting a new element in the XML document cannot be easily performed on the display document. there were.
[0018]
Therefore, the present invention designates the insertion position of a desired new display element on the display screen of a display document obtained as a result of converting a structured document having a predetermined document structure such as an XML document using a style sheet. Therefore, an object of the present invention is to provide a document editing method, apparatus, and program capable of inserting a new element for generating a new display element at an insertion position on the display document into an XML document.
[0019]
[Means for Solving the Problems]
The present invention includes: (a) a first document including a plurality of elements; and a plurality of statements for converting into a display document including a plurality of display elements generated corresponding to any of the plurality of elements. A second document including the second document is stored in a storage unit, (b) the first document is converted into the display document using the second document, the display document is displayed, and (c) the displayed document is displayed. In order to insert a new display element to be a child element or sibling element of the first display element that is one of the plurality of display elements in the display document, at least the first display element is specified, ( d) A first command sentence that can generate the new display element is searched from the second document, and (e) the first command sentence or the display element generated by the first command sentence is retrieved. The plurality of elements in the first document to be subjected to branch processing for generation A new element that is a child element or sibling element of the first element that is one of the conditions and that satisfies the condition specified by the first command statement is generated, and (f) the generated new element Are displayed as insertion candidates to be inserted into the first document, and (g) the selected insertion candidates among the displayed insertion candidates are inserted into the first document.
[0020]
According to the present invention, on a display screen of a display document (for example, an HTML document) obtained as a result of converting a first document having a predetermined document structure such as an XML document using a style sheet (second document). By simply designating the insertion position of a desired new display element, a new element for generating the new display element can be inserted into the first document at the insertion position on the display document.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0022]
In the following description, the case where the editing target data is an XML document and the style sheet describing the conversion procedure is an XSLT (Extensible Stylesheet language Transformation) document will be described as an example. The result of converting the XML document according to the description of the XSLT document A document (display data) is referred to as a display document, and a case where an HTML document or an SVG document is generated as a display document will be described as an example. In addition, nodes (elements) in each document are referred to as “XML node”, “XSLT node”, and “display node”.
[0023]
(First embodiment)
FIG. 1 shows a configuration example of an XML document editing apparatus according to the first embodiment. A display unit 1, an input unit 2, a document storage unit 3, a conversion processing unit 4, an intermediate storage unit 5, a context search unit. 6, a branch search unit 7, an insertion candidate generation unit 8, a candidate selection unit 9, and a data update unit 10.
[0024]
The document storage unit 3 holds an XML document to be edited and an XSLT document describing a conversion procedure.
[0025]
The conversion processing unit 4 converts the XML document to be edited into a display document according to the description of the XSLT document, generates a display document and a conversion log, and stores them in the intermediate storage unit 5.
[0026]
The display document is a document resulting from the conversion process. The XSLT document describes a conversion rule for generating display data (HTML document, SVG document) for displaying the XML document.
[0027]
In the conversion log, the XSLT node, the XML node corresponding to the XSLT node (that is, the current node), and the display node that is output by the XSLT node in the order of the XSLT nodes executed in the process of the conversion processing unit 4 It is a record of the correspondence relationship.
[0028]
Here, for example, an XML document as shown in FIG. 2 is converted into a display document as shown in FIG. 4 by using the XSLT document as shown in FIG. 3, and the XSLT document and the conversion log according to this embodiment will be described. Briefly described. An example of the conversion log in this example is shown in FIG. Also, in each of FIGS. 2 to 4, the leftmost number (for example, 1: 2, 2:...) Is a number (node number) used as an identifier for identifying each element in each document. Each element is assigned in the order of appearance in each document. Also, the leftmost number (for example, 1 :, 2 :,...) Of each entry (record information of one line) in the conversion log in FIG. 6 is an identifier for identifying each entry, and the processing order in the conversion process It is also a number (entry number) representing. FIG. 5 shows an example in which the display document shown in FIG. 4 is drawn and displayed on the display unit 1.
[0029]
The conversion rules for converting an XML document into a display document described in the XSLT document are: (1) which node in the given XML document is the conversion source, and (2) which is the conversion destination display document It is specified whether such a node is generated or added. In order to specify these two, XSLT uses an “xsl: template” element. The designation (1) is designated by the “match” attribute of the element. That is, the condition of the element to be processed in the XML document is designated by the “match” attribute. Also, the part of the display document generated for the element specified in the above (2), that is, the element that satisfies the condition specified by the “match” attribute in the XML document is surrounded by the “xsl: template” tag. It is described in. It can be said that a processing procedure for generating (converting) a node on the display document is described in a portion surrounded by “xsl: template” tags.
[0030]
Then, an “xsl: apply-templates” element is used to give the display data to be converted a structure.
[0031]
In the “xsl: template” element with the node number “1” described in the XSLT document of FIG. 3, the “TABLE” element on the display data is generated for the element in the XML document including “books”. Yes. In the “xsl: template” element, the “xsl: apply-templates” element having the node number “3” in FIG. 3 is used to select the “select” attribute among the child elements of the element including “books” in the XML document. The result of transforming an element satisfying the specified condition (that is, an element including “book”, for example) using another “xsl: template” element (element of the node number “4”) is <TABLE></ TABLE > Is embedded in between.
[0032]
The above “xsl: apply-templates” command is applied to the node that satisfies the condition specified by the “select” attribute. In this case, if there are a plurality of nodes that satisfy the condition, the specified processing procedure is repeatedly executed for the number of nodes.
[0033]
In addition to the “xsl: apply-templates” instruction, the XSLT defines an “xsl: if” instruction. When this instruction satisfies the condition specified by the “test” attribute, A designated processing procedure (a process for generating a node or a process for not generating a node may be performed) is executed. In the case of this “xsl: if” instruction, the designated processing procedure is executed only once.
[0034]
As described above, for a node satisfying the specified condition in the XML document, the process shifts to a predetermined process for generating a node on the display data, and the predetermined process is executed only once or a plurality of times. Here, the instruction to do is called a branch instruction. Further, here, the transition to a predetermined process (branch process) is also referred to as a branch.
[0035]
A branch instruction that executes a predetermined process only once, such as an “xsl: if” instruction or an “xsl: call-template” instruction, is called a simple branch instruction, and an “xsl: apply-templates” instruction, A branch instruction that repeats the execution of a predetermined process by the number of nodes that satisfy the conditions that exist in the XML document is called a repeat instruction. In addition to the “xsl: apply-templates” command, there are “xsl: for-each” commands, “xsl: value-of” commands, and the like.
[0036]
Further explanation of the conversion log will be described later.
[0037]
Returning to the description of FIG. 1, the display unit 1 is a user interface that displays an editing screen. This corresponds to a display device of a computer on which the XML document editing apparatus operates. On the editing screen, the display document generated by the conversion processing unit 4 is drawn according to the display rule. For example, when the display document is an HTML document, HTML rendering is performed. Various editing menus are displayed on the editing screen.
[0038]
The input unit 2 is a user interface that receives user operations. This is a pointing device represented by a mouse. In each of the following editing operations, it is used when the user selects a display node on the display document or a function on the editing menu in the editing screen.
[0039]
The context search unit 6 receives the insertion position of the new display node (the positional relationship between the display node and the display node and the new display node) from the input unit 2 on the display document, and refers to the conversion log to Based on the display node designated as the insertion position, the log entry, current node, and XSLT node in the conversion log corresponding to the display node are specified.
[0040]
The branch search unit 7 receives the context of the log entry, the current node, and the XSLT node specified by the context search unit 6 based on the positional relationship with the display node specified by the user as the insertion position, and the specified insertion position. A branch instruction in the XSLT document for generating a new display node is obtained. Then, the obtained branch instruction is sent to the insertion candidate generation unit 8.
[0041]
The insertion candidate generation unit 8 analyzes the condition (conditional expression) in the branch instruction obtained by the branch search unit 7. An insertion candidate in the XML document to be edited that satisfies the condition is generated, and an insertion position in the XML document of the insertion candidate is determined.
[0042]
When the candidate selection unit 9 receives all the insertion candidates generated by the insertion candidate generation unit 8, the candidate selection unit 9 outputs a selection menu of the insertion candidates to the display unit 1. Then, an insertion candidate designated by the user via the input unit 2 is selected.
[0043]
The data update unit 10 inserts the insertion candidate selected by the candidate selection unit 9 at the insertion position of the insertion candidate in the XML document to be edited.
[0044]
[Processing of XML document editing apparatus]
An outline of the processing operation of the XML document editing apparatus of FIG. 1 will be described with reference to the flowchart of FIG.
[0045]
(Step S1) The conversion processing unit 4 converts the XML document into a display document using the XSLT document. The conversion process is recorded as a conversion log. In the conversion log, when a branch occurs due to each branch instruction in the XSLT document (branch position on the conversion log) and where the content of the branch processing by that branch is in the course of execution of a series of conversion processing It is recorded so that it can be easily understood.
[0046]
(Step S2) The display document is drawn on the display unit 1.
[0047]
(Step S3) On the display screen of the display document displayed by the display unit 1, an insertion position (for inserting new display data) is designated by the user. Here, the insertion position of a display node that does not exist in the current display document is designated. In order to designate the insertion position of this new display node, for example, a display area ( Display node) and the positional relationship between the display node and new display data.
[0048]
For example, when data is to be inserted into one cell on a table displayed on the display screen, a display node (for example, “TD” element) for displaying the cell and data displayed therein are displayed. The positional relationship on the display document with the new display node is inclusive (the new display node corresponds to a child node of the display node that displays the cell). Such a positional relationship is called “child” here. In addition, when data is to be inserted after a certain cell on a table displayed on the display screen, after a certain row, or the like, a display node (for example, a “TD” element, The “TR” element) and the new display node displayed thereafter are nodes in the same hierarchy on the tree structure, and therefore the positional relationship on the display document is a sibling relationship. Here, it is called “next” or “nextSibling”.
[0049]
As described above, the user designates the display node as the insertion position and designates the positional relationship with the designated display node.
[0050]
(Step S4) The context search unit 6 refers to the conversion log and generates the display node designated as the insertion position on the display screen. The log entry, that is, the XSLT document created with the designated display node. The node in the middle (XSLT node) and the node in the XML document (XML node), that is, the current node are obtained.
[0051]
(Step S5) The branch search unit 7 generates a new display node at the designated insertion position based on the positional relationship designated as the insertion position with the log entry obtained from the conversion log as the base point. Find the branch instruction in the XSLT document. There may be one or a plurality of branch instructions, but all of them are obtained. In addition, here, the insertion position of a new branch process that may generate a new display node (the reference entry in the conversion log and the positional relationship between the entry and the new branch process) is obtained from the conversion log. Thus, a branch instruction for generating the branch process is obtained.
[0052]
(Step S6) In the insertion candidate generation unit 8, for each of the obtained one or a plurality of branch instructions, XML node candidates in the XML document that satisfy the conditions of the branch instructions that are the processing targets of the branch instructions (Insertion candidate) is generated. At this time, the insertion position in the XML document of the insertion candidate (the branch instruction searched by the branch search unit 7 or the XML node in the XML document to be subjected to the branch processing generated by the branch instruction, the XML node and the insertion (Positional relationship with a candidate) corresponds to the positional relationship between the entry searched by the branch search unit 7 and the entry and a new branching process. However, when the insertion candidate is an attribute node, the above positional relationship is not necessary, and it is only necessary to know which XML node in the XML document should be inserted. Therefore, in this case, the branch instruction searched by the branch search unit 7 or the XML node in the XML document to be subjected to the branch processing generated by the branch instruction becomes the insertion position of the insertion candidate.
[0053]
(Step S7 to Step S8) The candidate selection unit 9 additionally displays a plurality of generated insertion candidates by, for example, additionally displaying a display node corresponding to each insertion candidate generated by the insertion candidate generation unit 8 on the display screen. A selection screen that is presented to the user and has the user select one of the generated insertion candidates is generated and displayed.
[0054]
(Steps S9 to S10) Of the presented insertion candidates, the data updating unit 10 inserts the insertion candidate selected by the user into the XML document (update of the XML document).
[0055]
Next, the conversion processing unit 4, the conversion log, the context search unit 6, the branch search unit 7, the insertion candidate generation unit 8, and the candidate selection unit 9 in FIG. 1 will be described in detail.
[0056]
[Conversion log]
In the conversion log, when there is an XSLT node executed in the process of conversion processing, an XML node corresponding to the XSLT node (that is, a current node), and a display node output by the XSLT node, the display node Record the correspondence. The configuration of the conversion log can take various forms.
[0057]
FIG. 6 shows an example of the conversion log. In this example, entries are created in the order in which the XSLT nodes are executed in the transformation process, and each of the executed XSLT node, the current node when the XSLT node is executed, and the display node output when the XSLT node is executed Is stored in the entry.
[0058]
As a form of identification information (identifier) of each node recorded in the conversion log, there is a form (first form) in which the position in the document to which the node belongs is recorded. In FIG. 6, a number representing the order of appearance of each node in the document is used as identification information of each node. This corresponds to the number of each node added to the left side of the XML document and the XSLT document shown in FIGS. In this example, the appearance order is counted without including the attribute node representing the attribute. Therefore, when indicating the position of the attribute node, the identification information is recorded in the form of appearance order + attribute name.
[0059]
As another form of the identification information of each node, a form (second form) in which the positions in each level are sequentially described for the nodes on the route from the document root to the designated node is possible. For example, the node number “8” (the “title element” of the second “book” element is the node position of the node “1” at the highest level (“books” element)) in the XML document of FIG. Of the two child nodes, the first child node of the second child node (“book” element), which is described in accordance with the XPath (XML Path Language) notation method, is as follows.
“/ Node () [1] / node () [2] / node () [1]”
Furthermore, the log size can be reduced by omitting the notation as follows. “1.2.1”
The advantage of the second form is that the calculation of the position information and the specific processing amount of the node can be reduced as compared with the form using the appearance order in the document.
[0060]
In addition, it is not necessary to record the node identification information in a readable text format, and when each node is stored in an individual object, a reference to the node object is recorded as the node identification information (No. 1). 3) is also possible.
[0061]
In addition to the identification information of the various nodes corresponding to each entry, the conversion log contains dynamic branch structure information of execution series, which is a history (branch process execution series) corresponding to a process executed by a branch instruction (branch process). Hold. The entire execution sequence has a nested structure with the execution sequence of branch processing as a unit. The dynamic branch structure information includes this nested structure and information indicating to which execution sequence each entry belongs. From this information, the execution sequence in which the processing corresponding to each entry was executed, the "xsl: apply-templates" instruction that instantiated the template, the "xsl: apply-templates" instruction, the "xsl: for-each" instruction, etc. The range of each repetition process can be specified in the instruction for performing the repetition process.
[0062]
In the conversion log shown in FIG. 6, the nested structure of the execution sequence of the branch process is expressed by indentation as the dynamic branch structure information. That is, an entry corresponding to a branch instruction is recorded as a parent node, and a branch generated by the branch instruction, that is, a branch process is recorded as a child node. Furthermore, an entry corresponding to an XSLT instruction executed during each branch process is also recorded as a child node of the entry corresponding to the branch process. Therefore, the conversion log shown in FIG. 6 has a tree-like structure. From the relationship between the child node and the parent node on the tree structure, which branch processing is caused by which branch instruction is determined. In the processing, it is easy to know what instruction is being executed.
[0063]
In FIG. 6, when a branch occurs, a special entry called “branch” entry is recorded in the conversion log as a child of the entry corresponding to the execution of the branch instruction. The entry corresponding to the instruction executed during the branch process is recorded as a child of the “branch” entry.
[0064]
When the branch instruction is a repeat instruction, a branch occurs for each node that matches the path expression specified in the “select” attribute, for example, specifying the condition of the node to be processed by the repeat instruction. In this case, a “branch” entry is recorded for each iteration.
[0065]
The current node corresponding to each “branch” entry is not the current node when the repeated instruction is executed, but the current node after instantiating the template. That is, the node to be processed that satisfies the conditions in the branch instruction is recorded as the current node corresponding to the “branch” entry.
[0066]
For example, in FIG. 6, in the “xsl: apply-templates” command corresponding to the entry with the entry number “5” in the conversion log, an iterative process is performed for elements that match the condition “book”. In the XML document of FIG. 2, the only elements that match “book” are the “book” elements with node numbers “2” and “7”. It is the “branch” entry of the conversion log entry numbers “6” and “17” in FIG. 6 that records the repetition processing for this “book” element.
[0067]
As another form of the conversion log, it is possible to divide the information into a plurality of correspondence tables instead of recording all the information in one log. The conversion log does not record the identification information of the corresponding XSLT node and the display node, and can generate a correspondence table between the display node and the log entry and a correspondence table between the XSLT node and the log entry separately from the conversion log. It is.
[0068]
As another form of the conversion log, it is possible to embed the log entry corresponding to the display node and the identification information of the XSLT node directly in the display node in the display document. FIG. 8 shows an example of a display document in this form. In this example, the identification information of the log entry corresponding to the display node is embedded in the display node itself as the value of the attribute “ed: log” belonging to a special name space.
[0069]
As another form of the conversion log, a form according to the XML grammar is also possible. FIG. 9 shows a description example of the conversion log in this form. In this example, each entry of the conversion log in the form shown in FIG. 6 is an XML element, and the identification information of the XSLT node, the current node, and the display node corresponding to each entry is expressed as an attribute. Also, the dynamic branch structure represented by the indentation in the form shown in FIG. 6 is expressed by an XML tree structure.
[0070]
[Insertion position specification]
When the display document is generated by the conversion processing unit 4, the display document is displayed on the display unit 1 and waits for a user operation. Here, the user designates the insertion position on the display document via the display unit 1 and the input unit 2.
[0071]
The XML document as shown in FIG. 2 is converted into a display document as shown in FIG. 4 using the XSLT document shown in FIG. A display example of the display document shown in FIG. 4 is shown in FIG. As shown in FIG. 4, a display document is drawn on the display unit 1 and provides means for designating an insertion position (positional relationship with a display node).
[0072]
In step S3 of FIG. 7, the user moves the mouse pointer over the display area of a certain display node and clicks. In addition, the display area of a display node or the color of the frame is temporarily changed to indicate that it is in focus, and the cursor key is used to move the focus to another display node (display area). For example, an insertion position may be determined by using an enter key.
[0073]
When the user determines a display node, the positional relationship between the display node and a new display node is next specified. As the positional relationship, it is preferable that at least two types of “child” and “next” can be selected as described above.
[0074]
For example, as shown in FIG. 10A, it is assumed that a blank cell display area at the lower right of the table is designated as the insertion position. At this time, a menu for designating the positional relationship is displayed on the display unit 1, and an area representing each positional relationship is prepared in the menu. When the user moves the mouse pointer to each area, it is determined that the positional relationship corresponding to that area has been designated. Similarly to the specification of the insertion position, a form in which the positional relationship is specified by moving the focus to each region using the cursor key is also possible. The display node and the positional relationship as the insertion position obtained in this way are passed to the context search unit 6.
[0075]
For example, in step S3 of FIG. 7, as shown in FIG. 10A, the user designates the display area of the blank cell at the lower right of the table as the insertion position, and the positional relationship in FIG. Assume that “child” is designated as shown in FIG.
[0076]
[Context search section]
When receiving the positional relationship with the display node designated as the insertion position, the context search unit 6 specifies the conversion log entry, current node, and XSLT node that generated the display node.
[0077]
If the conversion log is in the form of FIG. 6, first, identification information of the display node designated as the insertion position is acquired. In this form, the order of appearance of the nodes in the display document is calculated. Next, an entry having identification information of a display node that matches the acquired identification information is searched from the conversion log and specified.
[0078]
As shown in FIG. 8, in the case where the conversion log entry number is embedded in the display document, the identification information (here, the entry number) of the entry embedded in the display node designated as the insertion position is displayed. What is necessary is just to acquire the conversion log entry corresponding to the identification information.
[0079]
Next, identification information of each node recorded in the identified entry is acquired, and the XSLT node is identified from the XSLT document and the current node is identified from the XML document.
[0080]
For example, as shown in FIGS. 10A and 10B, when a display area of a blank cell at the lower right of the table is designated as a display node, the display node for displaying this cell is the node number of FIG. The display node is “10”. Therefore, it can be seen from the conversion log shown in FIG. 6 that the generation of the display node with the node number “10” is recorded in the log with the entry number “24”. According to this log, the designated display node is generated when the XSLT node having the node number “8” and the XML node having the node number “7” are the current node.
[0081]
The obtained conversion log entry, XSLT node, and current node are passed to the branch search unit 7 together with the display node and the positional relationship designated as the insertion position.
[0082]
[Branch search part]
The branch search unit 7 receives the conversion log entry E, the XSLT node S, and the current node C corresponding to the display node D designated as the insertion position from the context search unit 6, and searches the conversion log and the XSLT document. An insertion position of a new branch process that may generate a new display node having a positional relation with the display node D that is designated as the insertion position is obtained from the conversion log (this is determined by the new branch process). Also called searching for the insertion position). If the insertion position of a new branch process in the conversion log is obtained, the entry corresponding to the branch instruction that generates the branch process is the root direction of the node corresponding to the entry corresponding to the branch process in the conversion log ( (Upstream direction).
[0083]
In the search processing of the insertion position of the new branch processing, it is necessary to analyze the static hierarchical structure on the XSLT document and simultaneously analyze the dynamic execution sequence nesting structure on the conversion log.
[0084]
For example, when the positional relationship with the display node D is “child” (when a child node of the display node D is newly generated), in addition to the child node of the XSLT node S, the XSLT that outputs the child node of the display node D Node may exist. Even if it is a descendant node that is not a direct child node of the XSLT node S, a display node that is output by a descendant node that does not put an output command in each layer from the XSLT node S is a child node of the display node D. In addition, when an “xsl: apply-templates” instruction or an “xsl: call-template” instruction exists as a descendant node that does not sandwich an output instruction in each hierarchy from the XSLT node S, the XSLT node in the instantiated template is The output display node is also a descendant node of the display node D.
[0085]
When the positional relationship with the display node D is “next” (when a sibling node of the display node D is generated), in addition to the sibling node immediately after the XSLT node S, the XSLT that outputs the sibling node immediately after the display node D is output. Node may exist. For example, when the sibling node immediately after the XSLT node S is not an output command, it is necessary to check the descendant node. If there is no sibling node immediately after the XSLT node S, it is necessary to check the sibling node immediately after the parent node of the XSLT node S. As in the case of the positional relationship “child”, when an instantiation of another template occurs, that template is also a search target.
[0086]
[Search for insertion position of new branch processing when positional relationship is specified as “child”]
First, the processing operation of the branch search unit 7 when “child” is designated as the positional relationship with the display node D will be described with reference to the flowcharts shown in FIGS. In this process, the analysis procedure (function seachChild) of the entry is recursively called as necessary while simultaneously analyzing the conversion log and the XSLT document.
[0087]
(1) Start search
First, the entry of the conversion log received from the context search unit 6 is substituted for the argument Es, and the procedure searchChild is called (step S101 in FIG. 11).
[0088]
(2) function searchChild
The XSLT node S (hereinafter simply referred to as node S) included in the log entry corresponding to the argument Es is acquired (step S102 of step S12), and the type of the XSLT node S (repetition instruction / simple repetition instruction / branch instruction) Process according to the non-instruction).
[0089]
When the node S is a repeated instruction (step S103), the processing operation shown in FIG. 13 is performed. When the node S is a simple branch instruction (step S104), the processing operation shown in FIG. 14 is performed. In other cases, the processing operation shown in FIG. 15 is performed.
[0090]
(3) When node S is a repeat instruction
As shown in FIG. 13, referring to the conversion log, first, it is checked whether the log entry assigned to the variable Es has a “branch” entry as a child (step S105). If the log entry assigned to Es has a child “branch” entry, a new iterative process can be generated before and after the iterative process (branch process) corresponding to the “branch” entry. Here, it is assumed that a new iteration process is generated before the first iteration process and after the last iteration process.
[0091]
When a new iterative process is generated before the first iterative process, information indicating the “branch” entry at the head of the log entry assigned to Es as the insertion position of the new iterative process (new entry) (This is expressed as “Es.firstChild”) and the information indicating the “previous sibling” as the positional relationship between the “branch” entry of the first child and the new iteration (this is expressed as “previousSibling”) Are sent to the insertion candidate generation unit 8 (step S106). In this case, since the new iteration process (branch process) is generated by the XSLT node included in the entry currently assigned to Es, the XSLT node is a branch instruction for generating the new branch process. “Es.firstChild” is information including information “Es” for notifying a log entry including this branch instruction.
[0092]
In addition, when a new iteration process is generated after the last iteration, information indicating the “branch” entry of the last child of the log entry assigned to Es as the insertion position of the new iteration process (new entry). (This is expressed as “Es.lastChild”) and the positional relationship between the “branch” entry of the last child and the new iteration, and information indicating “immediate sibling” (this is expressed as “nextSibling”) Are sent to the insertion candidate generation unit 8 (step S107). Also in this case, the new iterative process (branch process) is generated by the XSLT node (repetitive instruction) included in the entry currently assigned to Es. Therefore, the XSLT node generates the new branch process. This is a branch instruction to be executed. “Es.firstChild” is information including information “Es” for notifying a log entry including this branch instruction.
[0093]
After that, the procedure searchChild is recursively called with the “branch” entries (“Es.firstChild” and “Es.lastChild”) of the children of Es as arguments Es. When the recursive call is completed for all “branch” entries, the recursive call for Es is terminated and the process returns to the original procedure (steps S108 to S111).
[0094]
If Es does not have a child “branch” entry (step S105), a condition for generating a new iterative process may be considered. That is, as the insertion position of a new iteration process (new entry), information “Es” representing the Es and information representing “children” as the positional relationship between the log entry assigned to the Es and the new iteration process ( Here, it is expressed as “child” and sent to the insertion candidate generation unit 8 (step S112). In this case as well, a new iterative process (branch process) is generated by the XSLT node (repetitive instruction) included in the entry currently assigned to Es, so that the XSLT node generates the new branch process. It is an instruction. Thereafter, the recursive call for Es is terminated and the process returns to the original procedure.
[0095]
(4) When node S is a simple branch instruction
As shown in FIG. 14, first, it is checked whether the log entry assigned to the variable Es has a “branch” entry as a child (step S121). If the log entry assigned to Es has a child “branch” entry, the procedure “child” is recursively called with the “branch” entry Eb of the child of Es as the argument Es (step S122) (step S123). When the recursive call for Eb ends, the recursive call for Es ends and returns to the original procedure.
[0096]
When the log entry assigned to Es does not have a child “branch” entry (step S121), a condition for generating a new branch process may be considered. That is, information “Es” representing the Es as the insertion position of the new branch process, and information representing “child” as the positional relationship between the log entry assigned to the Es and the new branch process (here, “child” ”And send it to the insertion candidate generation unit 8 (step S124). In this case, since a new (branch process) is generated by an XSLT node (simple branch instruction) included in the entry currently assigned to Es, the XSLT node is a branch instruction that generates the new branch process. is there. Thereafter, the recursive call for Es is terminated and the process returns to the original procedure.
[0097]
(5) When node S is not a repeat instruction or simple branch instruction
As shown in FIG. 15, first, the entry Ec corresponding to the XSLT node that is the first child node of the node S is specified.
[0098]
If Es is not a “branch” entry (step S131), the sibling entry immediately after Es is set to Ec (step S132). When Es is a “branch” entry (step S131), when another template is instantiated at that branch, it is necessary to check the child node of the instantiated template, not the child XSLT node of the node S. Therefore, when the first child entry of Es is an entry corresponding to the template (step S133), the first child entry of Es (corresponding to the template) is newly set as Es (step S134). Then, the XSLT node (template) corresponding to Es is set as S, and the sibling entry immediately after Es (corresponding to the first child of the template) is set as Ec (step S134). If the first child entry of Es is not an entry corresponding to the template (step S133), the first child entry of Es (corresponding to the first child of the simple branch instruction) is set to Ec (step S135).
[0099]
If Ec does not exist in the above process (step S136), the recursive call for Es is terminated and the process returns to the original procedure.
[0100]
After determining Ec (step S136), sibling entries (following-sibling) after Ec are sequentially examined in the conversion log, and the following processing is performed for each.
[0101]
Since the sibling entry after Ec includes an entry corresponding to a descendant node of the node S, it is checked whether or not the XSLT node C (step S137) corresponding to Ec is included in the direct child node of S. If C is not a child node of S (step S138), the next sibling entry is set as Ec (step S141), the process returns to step S136, and the process is repeated.
[0102]
When C is a child node of S (step S138), if C is not an output command (step S139), it is necessary to further check the child, so the procedure searchChild is recursively called with Ec as an argument Es (step S142). ). When C is an output command (step S139), the process proceeds to step S140 as it is.
[0103]
If C is not the last child of S (step S140), the next sibling entry is set as Ec (step S141), the process returns to step S136, and the process is repeated.
[0104]
If C is the last child of S (step S140), there is no need to examine subsequent sibling entries, so the recursive call for Es is terminated and the original procedure is returned.
[0105]
Through the above procedure, the insertion position (log entry and log entry of the new branch process that generates a new display node that is a child (child node) of the display node specified as the insertion position. And the new branch process) can be sent to the insertion candidate generation unit 8. Thereby, the branch instruction in the XSLT document that causes the insertion candidate generation unit 8 to generate the new branch process (in this case, the branch instruction in the XSLT document in which the XSLT node included in Es generates the new branch process) Can be notified. In the case of the above embodiment, as described above, information for notifying the branch instruction is added to the log entry that is notified as the insertion position on the conversion log of the new branch process.
[0106]
[Search for Insertion Position of New Branch Processing When Positional Relationship is Designated as “next”]
Next, the processing operation of the branch search unit 7 when “next” is designated as the positional relationship with the display node D will be described. First, the conversion log pattern to be searched in this case will be described with reference to FIGS.
[0107]
In the conversion log shown in FIG. 16A, the conversion log entry E (target entry) corresponding to “PPP” as the display node D is the entry with the entry number “1”, and the repeat command There is a log entry "apply-templates" corresponding to. The next “branch” entry is a child of this “apply-templates” and is the first iterative process (branch process). in this case,
Pattern 1: The position before the first branch process of the repeat instruction (entry number “3” in FIG. 16A) (before entry number “3” in FIG. 16A) is set as the insertion position of the new branch process. . At this time, the branch instruction for generating the new branch process (the branch instruction for generating a new display node) is the “apply-templates” instruction.
[0108]
Pattern 2: The search for the insertion position of a new branch process is continued in the first branch process of the repeat instruction (entry numbers “3” to “6” in FIG. 16A). At that time, in FIG. 16A, the entry number “3” is set as the entry of interest.
[0109]
FIG. 16B shows that the entry E (target entry) in the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “1”, and the log entry corresponding to the repeat instruction in the backward direction. A conversion log in which “apply-templates” exists but does not have a “branch” entry corresponding to branch processing by the repeat instruction is shown as a child. in this case,
Pattern 3: As a child corresponding to the repeat instruction (in FIG. 16B, a new branch process is inserted between the entry numbers “2” and “3”). At this time, the branch instruction for generating the new branch process is the “apply-templates” instruction.
[0110]
Pattern 4: Ignoring the repeat instruction and using the subsequent entry (entry number “2” in FIG. 16B) as the target entry, the search for the insertion position of the branch process is continued.
[0111]
In FIG. 16C, when the conversion log entry E (target entry) corresponding to “PPP” as the display node D is the entry with the entry number “5”, the insertion position of a new branch process from this entry In this entry, the branch process “branch” entry that generated the “PPP” element is completed. in this case,
Pattern 5: A new branch process is inserted after the current branch process (as a branch process next to the branch process of entry number “3” in FIG. 16C). At this time, the branch instruction that generates the new branch process is the branch instruction that generated the current branch process (entry numbers “3” to “5” in FIG. 16C). ) Entry number “2” “apply-templates” command.
[0112]
Pattern 6: New in the next branch process (entry numbers “6” to “9” in FIG. 16C) after the current branch process (entry numbers “3” to “5” in FIG. 16C) Continue searching for the insertion point of branch processing. At this time, in FIG. 16C, the entry number “6” is set as the attention entry.
[0113]
In FIG. 16C, when the conversion log entry E (target entry) corresponding to “PPP” as the display node D is the entry with the entry number “9”, this entry is the last entry in the conversion log. This is the last entry in the branch process. In this case,
Pattern 7: Search for the insertion position of a new branch process using the entry (entry number “10” in FIG. 16C) after the repeat instruction (entry number “2” in FIG. 16C) as the target entry. continue.
[0114]
In the conversion log shown in FIG. 17A, the conversion log entry E (target entry) corresponding to “PPP” as the display node D is the entry with the entry number “1”, and a simple branch is provided in the backward direction. There is a log entry “if” (entry number “2”) corresponding to the instruction. The subsequent “branch” entry with entry number “3” indicates that the condition of the “if” instruction with entry number “2” is satisfied and branch processing has actually occurred for the current node. in this case,
Pattern 8: The search for the insertion position of a new branch process is continued in the branch process of a simple branch instruction. At this time, in FIG. 17A, the entry number “3” is set as the entry of interest.
[0115]
In the conversion log shown in FIG. 17B, the entry E (target entry) of the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “1”, and a simple branch is provided in the backward direction. If the log entry “if” (entry number “2”) corresponding to the instruction exists, but the condition of the “if” instruction is not satisfied and branch processing does not occur (the child of the “if” entry has “ the branch entry does not exist). in this case,
Pattern 9: As a child corresponding to a simple branch instruction (between the entry numbers “2” and “3” in FIG. 17B), a new branch process that satisfies the condition of the simple branch instruction is inserted. At this time, the branch instruction for generating the new branch process is the “if” instruction of the simple branch instruction (entry number “2” in FIG. 16C).
[0116]
Pattern 10: The simple branch instruction is ignored, and the subsequent entry (entry number “3” in FIG. 17B) is set as the target entry, and the search for the insertion position of the branch process is continued.
[0117]
In the conversion log shown in FIG. 17C, the conversion log entry E (target entry) corresponding to “PPP” as the display node D is the entry with the entry number “4”. However, the branch processing “branch” entry that generated the “PPP” element has been completed. in this case,
Pattern 11: The search for a new branch process is continued with the entry after the simple branch instruction (entry number “5” in FIG. 17C) as the target entry.
[0118]
FIG. 18 to FIG. 21 are flowcharts for explaining the processing position when searching for a branch instruction and a new branch process insertion position on the conversion log corresponding to each pattern.
[0119]
An entry Es in the flowchart represents an entry (the above noted entry) serving as a search starting point, and a node S represents an XSLT node corresponding to the entry Es. In the following description, the positional relationship of the entries Es, En, and Eb on the conversion log will be described with reference to FIGS. 33 and 34. FIG.
[0120]
(1) Start search
First, the log entry of the conversion log received from the context search unit 6 is set as Es, and the XSLT node corresponding to Es is set as the node S.
[0121]
(2) En identification
The entry En corresponding to the XSLT node executed next to Es is specified without changing the level position on the tree structure of the display document of the display node to be output.
[0122]
If Es is not a “branch” entry (step S151), (a1) En is a sibling with Es (ie, Es and En are in a positional relationship as shown in FIG. 33A), (a2) En The XSLT node N corresponding to (included in En) is an XSLT node S corresponding to (included in) Es and is a sibling (S and N have the same parent). A search is performed from the subsequent sibling entry (Es.nextsibling) (steps S153 to S156).
[0123]
If En does not exist (step S153), the process proceeds to step S171 in FIG.
[0124]
If Es is a “branch” entry (step S151) and another “template” is instantiated in the branch process corresponding to the “branch” entry, it is not a child XSLT node of node S, but an instantiated template. Need to examine child nodes.
[0125]
Therefore, when the first child entry of Es (Es.firstChild) is a “template” entry (step S157), the first sibling entry (“template” entry) immediately after the first child entry of Es (“template” entry) is entered. Child entry) Set Es.firstChild.nextsibling to En (step S158). FIG. 33B shows the positional relationship between Es and En at this time.
[0126]
If the first child entry of Es is not a “template” entry (step S157), the first child entry of Es (first child entry of the branch instruction) Es.firstChild is set to En (step S159). The positional relationship between Es and En at this time is shown in FIG.
[0127]
If En does not exist (step S160), the process proceeds to step S171 in FIG.
[0128]
(3) Analysis of En
In step S155 and step S160 in FIG. 18, if En exists, the process proceeds to step S161. At this time, an XSLT node N (hereinafter simply referred to as node N) corresponding to En is acquired.
[0129]
In step S161, when the type of the node N is a repetitive instruction, the process proceeds to the process of the flowchart shown in FIG. If the node N is not a repeat instruction, the process proceeds to step S162. If the node N is a simple branch instruction in step S162, the process proceeds to the process shown in the flowchart of FIG. Otherwise, the process ends.
[0130]
(4) When node N is a repeated instruction (see FIG. 20)
Proceeding to step S181 in FIG. 20, first, it is checked whether En has a “branch” entry as a child. If Es has a “branch” entry (step S181), a new iteration can be generated before the iteration process corresponding to those “branch” entries (corresponding to the above pattern 1). Therefore, the process proceeds to step S182, where information indicating the first “branch” entry of En (“En.firstChild”), the first “branch” entry, and the new iterative process are inserted as insertion positions for the new iterative process. The information “previousSibling” indicating “immediately preceding sibling” as a positional relationship is paired and sent to the insertion candidate generation unit 8. In this case, the branch instruction for generating the new repetitive processing is the XSLT node N corresponding to En. “En.firstChild” is information including information “En” for notifying a log entry including this branch instruction. Thereafter, the entry “branch” of the first child of En is set as Es, and the process returns to step S151 in FIG. 18 (corresponding to the above pattern 2).
[0131]
If Es does not have a “branch” entry (step S181), a new iterative process corresponding to the repetitive instruction of node N is generated (corresponding to pattern 3 above). For this purpose, in step S184, information “En” representing En is set as the insertion position of the new repetition process, and information “child” representing “child” is set as the positional relationship between the En and the new repetition process. And sent to the insertion candidate generation unit 8. In this case, the branch instruction for generating the new repetitive processing is the XSLT node N corresponding to En. Thereafter, En is set as Es, and the process returns to step S151 in FIG. 18 (corresponding to the pattern 4).
[0132]
(5) When node N is a simple branch instruction (see FIG. 21)
Proceeding to step S191 in FIG. 21, first, it is checked whether En has a “branch” entry as a child. When En has a “branch” entry (step S191), the “branch” entry is set to “En.firstChild” as Es (step S192), and the process returns to step S151 in FIG. 18 (corresponding to the pattern 8).
[0133]
If En does not have a “branch” entry (step S191), a new branch process corresponding to the simple branch instruction of node N is generated (corresponding to pattern 9 above). Therefore, in step S193, information “En” representing En as an insertion position of a new branch process and information “child” representing “child” as a positional relationship between the En and the new branch process are paired. To the insertion candidate generation unit 8. In this case, the branch instruction for generating the new branch process is the XSLT node N corresponding to En. Thereafter, the process proceeds to step S194, where En is set as Es, and the process returns to step S151 in FIG. 18 (corresponding to the pattern 10).
[0134]
(6) When En does not exist
In step S153 and step S160 in FIG. 18, if En does not exist, the process proceeds to step S171 in FIG. Here, when the branch process (current branch process) including the entry is completed in the entry corresponding to Es (the target entry) (that is, Es is shown in FIGS. 34A to 34C in the conversion log). In the position shown in FIG.
[0135]
If the parent of Es (Es.parentNode) is the root, that is, the last entry in the highest level of the conversion log (step S171), the process ends. Otherwise (step S171), as shown in FIG. 34 (a), the branch entry corresponding to the branch process including Es (ie, Es's parent node Es.parentNode) is Eb, and the branch process is generated. It is assumed that the entry (that is, the parent node Eb.parentNode of Eb) corresponding to the executed instruction is En, and the XSLT node corresponding to En is N (step S172).
[0136]
When the node N is a repeat instruction (step S173), a new repeat process can be generated as a sibling node of Eb (corresponding to the above pattern 5). Therefore, in step S174, the information “Eb” representing Eb is set as the insertion position of the new repetition process, and “nextSibling” representing “next sibling” is set as the positional relationship between the Eb and the new repetition process. To the insertion candidate generation unit 8. In this case, the branch instruction for generating the new branch process is a node N corresponding to En that has a positional relationship as shown in FIG.
[0137]
Further, as shown in FIG. 34B, when the sibling entry (Eb.nextsibling, entry number “6”) exists immediately after Eb (entry number “3”) (step S175), the entry is the next one. Represents the repetition of. Therefore, the “branch” entry with the entry number “6” is newly set as Es (step S176), and the process returns to step S151 in FIG. 18 (corresponding to the pattern 6).
[0138]
On the other hand, as shown in FIG. 34C, when the sibling entry does not exist immediately after Eb (step S175), it indicates that Eb is the last iteration process. Therefore, En is set as a new Es (step S177), and the process returns to step S151 in FIG. 18 (corresponding to the pattern 7).
[0139]
When the node N is a simple branch instruction (step S178), En is set as Es, and the process returns to step S151 in FIG. 18 (corresponding to the pattern 11).
[0140]
Through the above procedure, the insertion position on the conversion log of the new branch processing that generates a new display node that is a sibling node of the display node designated as the insertion position (the log entry, the log entry, and the new The positional relationship with the branching process) can be sent to the insertion candidate generator 8. As a result, it is possible to notify the insertion candidate generation unit 8 of a branch instruction in the XSLT document that causes the new branch process to be generated. In the case of the above embodiment, as described above, information for notifying the branch instruction is added to the log entry that is notified as the insertion position on the conversion log of the new branch process.
[0141]
[Insertion candidate generator]
As described above, the branch search unit 7 inserts the insertion position in the conversion log of the new branch process (the positional relationship between the entry on the reference conversion log and the entry and the new branch process “previousSibling”, “nextSibling”, “ child ") and the branch instruction of the XSLT node that generates the new branch process.
[0142]
Specifically, (1) an XSLT node (branch instruction) that generates a new branch process for generating a new display node to be inserted into a display document, an XML node that is a target of the XSLT node, and an XML document Position relationship with the new element to be inserted (when the new element corresponds to the sibling node immediately before the XML node, “previousSibling”, when the new element corresponds to the sibling node immediately after the XML node, “nextSibling”, the XML ("Child" when corresponding to a child node of the node) or (2) an XSLT node (branch instruction) for generating a new branch process for generating a new display node to be inserted into the display document, and the XSLT node The positional relationship between the XML node that is the target of the branch processing generated by the above and a new element to be inserted into the XML document (similarly, “previousSibling”, “ nextSibling ”,“ child ”).
[0143]
Therefore, the insertion candidate generation unit 8 performs new branch processing to be inserted at the insertion position in the conversion log obtained by the branch search unit 7 (position relationship between the entry on the conversion log and the entry and the new branch processing). Based on the branch instruction to be generated, a node is generated as an insertion candidate in the XML document, and the insertion position of the insertion candidate on the XML document is in the above positional relationship with the node serving as the base point in the XML document. Position. That is, when the information shown in (1) above is obtained, the XML node serving as the base point is the XML node that is the target of the branch instruction (XSLT node) that generates a new branch process that generates the insertion candidate. When the information shown in (2) above is obtained, the XML node serving as the base point has already been generated by the XSLT node (branch instruction) that generates a new branch process that generates the insertion candidate. Document structure of an XML document that is an XML node subject to branching processing and whose positional relationship between the XML node that is the base point and the insertion candidate is “previousSibling”, “nextSibling”, or “child” The upper position. Here, the positional relationship (“previousSibling”, “nextSibling”, “child”) is similar to Xpath and is also referred to as “axis”.
[0144]
First, the insertion candidate generation unit 8 generates an insertion candidate that satisfies a condition specified by a branch instruction that generates a new branch process to be inserted at the insertion position obtained by the branch search unit 7. When the branch instruction is a repeat instruction, a condition (conditional expression) is specified by the “select” attribute, and when the branch instruction is a simple branch instruction, a condition to be satisfied by the insertion candidate is obtained from these attributes.
[0145]
Here, as a simple example, only a case where a relative path from the current node is represented as a path expression representing a node in the conditional expression and no axis other than the child axis or the attribute axis is included is handled.
[0146]
When a predicate is specified, only the case where the content of the predicate is the above relative path expression or a comparison expression between a relative path expression and a constant is handled. For example, path expressions such as “book”, “@point”, “book [review]”, “book [@ point = 3]” apply to this. In contrast, “book / title”, “book [.// review]”, etc. are excluded.
[0147]
Next, the processing operation of the insertion candidate generation unit 8 will be described with reference to the flowchart shown in FIG.
[0148]
(1) Start processing
In FIG. 22, first, the entry E corresponding to the branch instruction for generating a new branch process obtained as a result of the search by the branch search unit 7 and the positional relationship (axis) Axis are received (step S201).
[0149]
Next, S is acquired as the XSLT node corresponding to E, and C is acquired as the current node corresponding to E (step S202, step S203), and processing corresponding to the type of S is performed (step S204, step S205). That is, when S is a repeat instruction (step S204), the process proceeds to the process of the flowchart shown in FIG. 23, and when S is a simple branch instruction (step S205), the process proceeds to the process of the flowchart shown in FIG. Otherwise, the process ends.
[0150]
(2) When node S is a repeat instruction
When S is a repetitive instruction, in addition to the above path expression pattern, a combined expression of these path expressions is a target for generating insertion candidates. For example, a join expression such as “title | review” applies to this.
[0151]
FIG. 23 shows processing when S is a repetitive instruction. The conditional expression obtained from the “select” attribute is set to Cond (step S211). This Cond is checked, and if it is not the above target (step S212), the process ends without generating an insertion candidate. When the combined expression is obtained (step S213), the combined path expressions are extracted (step S214).
[0152]
Each path expression is sequentially set to Exp, and the procedure createCand is called with the expression Exp, the current node C, and the positional relationship Axis as arguments (steps S215 to S218).
[0153]
If the expression Cond is not a join expression (step S213), the procedure createCand is called with the expression Cond, the current node C, and the positional relationship Axis as arguments (step S219).
[0154]
(3) When node S is a simple repeat instruction
When S is a simple repeat instruction (for example, an “if” instruction), in addition to the path expression pattern, a comparison expression between a path expression and a constant is an object for generating an insertion candidate. For example, a comparison expression such as “@ point = 3” applies to this.
[0155]
FIG. 24 shows processing when S is an “if” instruction. The conditional expression obtained from the “test” attribute is set to Cond (step S221). This Cond is checked, and if it is not the above target (step S222), the process ends without generating an insertion candidate. If it matches, it is checked whether it is a path expression or a comparison expression (step S223).
[0156]
When Cond is a path expression (step S223), the procedure createCand is called with the expression Cond, the current node C, and the positional relationship Axis as arguments, as in the case of the repeat instruction (step S224).
[0157]
If Cond is a binary comparison expression (step S223), the process proceeds to step S225, where “path expression operator constant” is converted to “path expression [. Operator constant]”. For example, if the conditional expression is “@ point = 3”, it is converted to “@point [. = 3]”. Thereafter, the procedure createCand is called with the converted Cond, current node C, and positional relationship Axis as arguments (step S224).
[0158]
(4) Generating candidates that satisfy the path expression (function createCand)
The process of the procedure createCand will be described with reference to the flowchart shown in FIG. First, the node test (NodeTest) and the predicate (Predicate) at the head of the path expression are separated (step S231). If the node test is an element name, the element is generated and set as a root element R as an insertion candidate (step S232). When the predicate P exists (step S233, step S234), a node T corresponding to the element or attribute in the predicate is generated (step S236, step S237), and added to the element R as a child or attribute (step S238). .
[0159]
For example, if the conditional expression is “book [review]” <book><review/></book> ”is generated as an insertion candidate, and when the conditional expression is“ book [@ point = 3] [review] ” <book point = 3><review/></book> ”is generated as an insertion candidate.
[0160]
If the node test is an attribute name, the attribute is generated and set as the insertion candidate node R (step S232).
[0161]
When the predicate P exists (step S234), it is assumed that the node R has a value that satisfies the condition only in the case of a comparison expression between the value of the attribute itself and a constant (steps S235 and S240). For example, when the conditional expression is “@point [. = 3]”, the “point” attribute is set as an insertion candidate, and the value is set to “3”.
[0162]
The insertion candidate R, current node C, and positional relationship Axis generated by the above procedure are sent to the candidate selection unit 9 (step S241).
[0163]
As a more preferable form of the procedure createCand, when the node S is a “value-of” instruction, a form of setting the value of the node R is possible. When the value of the node R is specified by the presence of the predicate, the value is used, and when the value is not specified, the element name or attribute name of the node R is used as the value.
[0164]
Thereby, the value of the node R is displayed by the “value-of” command, and the change of the display document due to the insertion of the insertion candidate can be actually confirmed on the screen.
[0165]
[Edit screen]
There may be a plurality of insertion candidates obtained by the branch search unit 7 and the insertion candidate generation unit 8. The candidate selection unit 9 displays the obtained candidates, generates a screen for selecting a desired candidate from them, and obtains the user's selection via the display unit 1 and the input unit 2.
[0166]
The simplest form of display of insertion candidates is a form in which an area corresponding to each insertion candidate is displayed and each candidate is displayed in a general text format of an XML document.
[0167]
FIG. 26 shows an example of a display example of this type of insertion candidate. In this form, the user selects an insertion candidate using the element name and attribute name of the XML document as the judgment material. In the example of FIG. 26, the display area (corresponding to the “TD” node in the display document) in the lower right blank cell in the table is specified as the insertion position in FIG. 10, and the specified display node is newly inserted. In this example, after specifying “child” as the positional relationship with the display node, a window R1 for displaying each insertion candidate in a general text format of the XML document is displayed.
[0168]
In this example, it is understood that a new branch process may be generated by the “value-of” instruction of the entry number “25” in the conversion log of FIG. Therefore, as the insertion position of the new branch process, the log entry with the entry number “25” and the information “child” representing “child” as the positional relationship between the log entry and the new branch process are paired. The data is sent to the insertion candidate generation unit 8 (step S112 in FIG. 13).
[0169]
The insertion candidate generation unit 8 generates an insertion candidate that satisfies the conditional expression “@point” of the branch instruction “value-of” that generates the new branch processing in the XSLT document. The insertion position in the XML document of the insertion candidate corresponds to the position where the positional relationship with the XML node that is the target of the branch instruction “value-of” is “child”. In this case, the XML node that is the target of the branch instruction “value-of” is the XML node having the node number “7” in FIG. 2, and the positional relationship with this node is “child” (or the insertion candidate is the attribute node). In this case, an insertion candidate such as “attribute”) is generated.
[0170]
In this case, each insertion candidate generated by the insertion candidate generation unit 8 and the insertion position in the XML document of each insertion candidate are passed to the candidate selection unit 9 (step S251 in FIG. 28). That is, as an insertion candidate = “point” attribute (value is a character string “point”) and an insertion position in the XML document of the insertion candidate, current node = node number “7” (/ books [1] / book [2 ]), The positional relationship between the current node and the insertion candidate = child “child” is sent.
[0171]
In the candidate selection part 9, the window R1 which displays each insertion candidate produced | generated by the insertion candidate production | generation part 8 and the insertion position of each insertion candidate is produced | generated, and it displays on the display part 1 (step S252-step S254).
[0172]
In this example, since there is only one insertion candidate, only the area corresponding to this insertion candidate is displayed on the display screen of FIG.
[0173]
As a more preferable display form of insertion candidates, a form in which each insertion candidate is temporarily inserted into an XML document, converted into an HTML document using an XSLT document, and a preview is displayed on an editing screen is possible. FIG. 27 shows a display example of this form.
[0174]
As shown in FIG. 26, after the insertion candidate is displayed in the window R1 (step S254 in FIG. 28), when the user moves the mouse pointer to the desired insertion candidate, the conversion result of the XML document in which the corresponding insertion candidate is temporarily inserted is displayed. As shown in FIG. 27, a preview is displayed.
[0175]
Furthermore, when the user performs a determination operation such as clicking the mouse on a desired insertion candidate displayed in the window R1, the selection of the insertion candidate is confirmed.
[0176]
In the example of FIG. 27, when the user moves the pointer to the insertion candidate displayed in the window R1 (step S255 in FIG. 28), the candidate selection unit 9 inserts the insertion candidate (candidate = “point” attribute (value is a character string). “Point”) and the insertion position of the insertion candidate in the XML document, the position of the XML node (/ books [1] / book [2]) corresponding to the node number “7”, the node, and the insertion candidate Based on the relation = “child (attribute)”, an insertion candidate (candidate = “point” attribute (value is a character string “point”) is inserted into a copy (provisional document) of an XML document stored in the document storage unit 3. Is inserted into the insertion position where the positional relationship between the XML node (/ books [1] / book [2]) corresponding to the node number “7” and the insertion candidate = “children (attribute)”. A copy of the XML document with the URL inserted is converted to a display document using the XSLT document, and the conversion result Is displayed on the display unit 1 instead of the current display document (steps S256 to S258) As a result, as shown in FIG. A character string “@point” that is the value of the candidate “point” attribute is displayed.
[0177]
When the user performs a determination operation such as clicking the mouse on a desired insertion candidate displayed in the window R1, the selection of the insertion candidate is confirmed (step S259). In this case, the data update unit 10 On the other hand, the determined insertion candidate and its insertion position are passed (step S260).
[0178]
For example, in the case of FIG. 27, an insertion candidate (candidate = “point” attribute (value is a character string “point”) and an insertion position in the XML document of the insertion candidate, node number “7” (/ books [1] / book [2]), the positional relationship between the node and the insertion candidate = “child (attribute)” is passed to the data updating unit 10.
[0179]
In the data update unit 10, an insertion candidate (candidate = “point” attribute (value is a character string “point”)) is added to the XML document stored in the document storage unit 3 and a node (/ books [1] / book [2]) and the insertion candidate is inserted at an insertion position where “children (attributes)”.
[0180]
Thereafter, the conversion processing unit 4 converts the updated XML document into a display document using the XSLT document (records a conversion log at that time) and displays the display document on the display unit 1 as described above. .
[0181]
When the mouse pointer is moved to an area corresponding to another insertion position on the display screen without performing the determination operation, a new process is started from the branch search unit 7 to switch the display contents of the insertion candidates. Forms are also possible.
[0182]
As described above, according to the XML document editing apparatus of the first embodiment, the user inserts a new display node on the display document (the currently displayed display node, the display node, and the display node). XML document that searches for a branch instruction in the XSLT document that generates the new display node and generates the new display node by branch processing using the branch instruction. A new XML node is generated as an insertion candidate, and an insertion position in the XML document of the insertion candidate is obtained. An insertion candidate is an XML node that is a target of the searched branch instruction or a child node (attribute of an XML node that is a target of a branch process already generated by the XML node that is the target of the searched branch instruction. Node), the immediately preceding sibling node, and the immediately following sibling node.
[0183]
By previewing a display document obtained as a result of inserting each insertion candidate at each insertion position in the XML document, the user can obtain an editing result of the XML document that actually brings a result desired by the user from the plurality of insertion candidates. Insertion candidates to be selected can be selected.
[0184]
The insertion candidate generation unit 8 can generate and present insertion candidates that change the display of the position specified by the user. The user can edit the document data only by the relationship between the position on the screen after conversion by the style sheet (for example, the XML document) and the data without being aware of the tree structure, element name, and attribute name of the XML document.
[0185]
(Second Embodiment)
In the XML document editing apparatus according to the first embodiment, when an insertion position for inserting a new display node in a display document is designated, the display node currently displayed on the display screen and the new insertion are displayed. The positional relationship (“child”, “next”) with the node is specified.
[0186]
However, with such an insertion position designation method, a display node that is not displayed on the screen cannot be designated as the insertion position. For example, in a table displayed with a “TABLE” element in a display document (HTML document), when it is desired to add another line below a certain line, a “TR” node representing the new line is designated on the screen. It is not possible.
[0187]
In addition, when a “TD” node is added after a “TD” node representing a cell in a display document (as a sibling node), it is displayed “right” on the screen, whereas “TR” representing a row. When the “TR” node is added after the “node” (as a sibling node), it is displayed “down” on the screen. Therefore, the user who knows the display rule of HTML can designate “right” and “bottom” on the screen as “next” as a positional relationship in the sense of adding sibling nodes on HTML, but does not know the display rule. For the user, there is a gap between the operation and the recognition of the edit menu.
[0188]
As described above, the insertion position desired by the user on the display on the actual display screen and the insertion position in the structure of the HTML document are not necessarily clear.
[0189]
Therefore, in the XML document editing apparatus according to the second embodiment, in order to solve the above problem, as an insertion position designation method, the insertion position designated by the user on the display screen is processed in the XML document editing apparatus. The insertion position conversion unit 11 converts the insertion position into a suitable insertion position.
[0190]
FIG. 29 shows a configuration example of the XML document editing apparatus according to the second embodiment. The same parts as those in FIG. 1 are denoted by the same reference numerals, and only different parts will be described. That is, in FIG. 29, it further includes an insertion position conversion unit 11 and a conversion rule storage unit 12 that stores conversion rules used in the insertion position conversion unit 11.
[0191]
The insertion position conversion unit 11 uses the conversion rule stored in the conversion rule storage unit 12 while the insertion position input by the user obtained from the input unit 2 is passed to the context search unit 6. The position is converted into an insertion position suitable for processing in the XML document editing apparatus. Then, using the insertion position obtained by the insertion position conversion unit 11, each component such as the context search unit 6, branch search unit 7, insertion candidate generation unit 8, candidate selection unit 9, etc. The same processing operation as that of the XML document editing apparatus is performed. The rest is the same as the XML document editing apparatus of the first embodiment described above.
[0192]
For the user, when specifying the insertion position on the display screen on which the display document is displayed, it is necessary to specify any display area currently displayed on the display screen and use the display area as a base point. It is natural to specify on the right or bottom side. Accordingly, after the display document is displayed in step S2 of FIG. 7, in step S3, when the user designates a certain display area (ie, display node) on the display screen as the insertion position of a new display node, a new one is displayed. An edit menu for designating the positional relationship between the display node and the display area as a positional relationship on the screen such as “inner”, “right”, and “down” is displayed. .
[0193]
For example, as shown in FIG. 30, when the lower left cell in the table displayed on the display screen (displaying the display document) is selected, the editing menu is displayed. According to this edit menu, “inner” when the selected cell is used as a base point and the inside of the cell is set as the insertion position, and “right” when a new cell is inserted on the right side of the cell. ) ”And“ down ”when a new row is inserted below the cell can be selected. Assume that the user selects “down” from the edit menu. In this case, from the input unit 2, the specified display node (the display node with the node number “8” in the HTML document in FIG. 4) and the specified positional relationship “down” are inserted as user-specified insertion positions. The set is passed to the insertion position conversion unit 11.
[0194]
Upon receiving the user-specified insertion position information (for example, the set of the display node Bin and the positional relationship Ain as described above), the insertion position conversion unit 11 receives each conversion rule stored in the conversion rule storage unit 12. By referring to the condition described in the condition part, a conversion rule whose received user-specified insertion position matches the condition is acquired.
[0195]
According to the conversion rule, the insertion position specified by the user is converted into insertion position information (a set of display node and positional relationship) used in processing within the apparatus, and sent to the context search unit 6. Subsequent processing is the same as in the first embodiment.
[0196]
As in the above example, when the display node “TD” is specified and “down” is specified as the positional relationship, the insertion position for inserting a new row below the cell, that is, the display The positional relationship “next” between the node “TR” and the display node and the new display node is converted.
[0197]
The conversion rule stored in the conversion rule storage unit 12 applied in this case is, for example, a condition (display node “TD”, positional relationship “down”) → an insertion position after conversion (a parent node of a specified display node) "TR" node, positional relationship "next"). As the insertion position after conversion, the element name of the display node and the positional relationship between the display node and the new display node are designated.
[0198]
When the insertion position input by the user matches the condition part of the conversion rule, the insertion position conversion unit 11 sends the converted (display node, positional relationship) to the context search unit 6. For example, in the case of the above example, the TR node including the designated “TD” and the positional relationship “next”, that is, (TR, next) are sent to the context search unit 11.
[0199]
As another example, when the user designates the display node “TD” and designates “right” as the positional relationship, the conversion rule applied to this is (TD, right) → (TD, next). Yes, according to this conversion rule, when the user designates a certain TD node in the table as the insertion position and designates “right” as the positional relationship, the context search unit 6 receives the designated TD node as the insertion position. Then, “next” is sent as the positional relationship between the TD node and the new display node.
[0200]
When there are a plurality of matching rules, all the conversion result pairs of the respective rules are sent to the context search unit 6. The context search unit 6, the branch search unit 7, and the insertion candidate generation unit 8 perform processing on each set. The insertion candidate selection unit 8 adds all insertion candidates generated by these processes to the selection menu.
[0201]
If there is no matching rule, the following default conversion rule is applied.
[0202]
(*, Right) → (*, next)
(*, Down) → (*, next)
(*, Inner) → (*, child)
“*” Specified in Bin represents an arbitrary element (node).
[0203]
As another form of the conversion rule, an XPath path pattern and a path expression can be expressed as designation of insertion positions before and after conversion. This form of conversion rule is
It takes the form of conditions (path pattern Pin, positional relationship Ain) → (path expression Pout, positional relationship Aout).
[0204]
To determine whether the set of user-specified insertion positions (display node Borg, positional relationship Aorg) matches the condition part of the conversion rule, the display node corresponding to Borg matches the path pattern Pin of the conversion rule. If Aorg matches Ain of the conversion rule, it is determined that they match. When the conversion rule is matched, the positional relationship after conversion is Aout. The display node after conversion is the node Bout included in the node set as a result of evaluating Pout using Borg as the context node. After conversion, a set of (Bout, Aout) is sent to the context search unit.
[0205]
When there are a plurality of Bouts, all pairs of Bout and Aout are sent to the context search unit 6 as in the case where there are a plurality of matching rules.
[0206]
For example, the conversion rule of (TD | TH, down) → (parent :: TR, nextSibling) specifies a TD node representing a cell in a table or a TH node representing a heading character as an insertion position, and positional relationship If “down” is designated as “”, the condition part of the conversion rule is matched. After the conversion, the parent node of the TD node or TH node designated by the user as the display node Bout and “next” as the positional relationship Aout are sent to the context search unit 6. This is a rule that expects the next row to be inserted if you specify below a column in the table.
[0207]
In FIG. 30, when the display node (the display node with the node number “8” in the HTML document in FIG. 4) and the positional relationship “down” are designated as the insertion position by the user, the above conversion rule (condition (display (display)) Node “TD”, positional relationship “down”) → (display node “TR”, positional relationship “next”)). Therefore, the designated display node is converted to the display node having the node number “7” in the HTML document of FIG. 4 and the positional relationship is converted to “next”. Then, the converted insertion position is sent to the context search unit 6. By the processing of the context search unit 6, branch search unit 7, and insertion candidate generation unit 8, “ <book /> ”, XML node C = node number“ 7 ”as the insertion position of the insertion candidate in the XML document, and Axis =“ nextSibling ”as the positional relationship between the XML node C and the insertion candidate. Sent to 9.
[0208]
When the insertion candidate is inserted into a copy of the XML document (that is, the third “book” element is inserted into the XML document in FIG. 2) and a preview is displayed (steps S251 to S258 in FIG. 28). An example of the screen display is shown in FIG.
[0209]
As described above, according to the second embodiment, it is possible to convert the insertion position desired by the user on the actual display screen to the insertion position in the document structure of the HTML document, which is easy for the user to understand. The insertion position can be designated on the display screen in a form that is easy to instruct.
[0210]
In addition, when the user specifies the insertion position, as described above, the positional relationship between the display node serving as the base point among the currently displayed display nodes and the display node is specified, but this is not a limitation. . That is, if the above conversion rule is used, the insertion position can be designated by designating a desired point or region on the display screen. The conversion rule in this case is that the specified display area is a condition, and the user-specified insertion position that matches this condition is the positional relationship between the converted display node corresponding to the display area and the new display node. It is specified to convert to.
[0211]
Further, when it is necessary to set a display node that is not displayed on the screen as the insertion position, an operation of setting another display node displayed on the screen as the insertion position can be used instead.
[0212]
The method of the present invention described in the embodiment of the present invention can be realized as a program that can be executed by a computer, and this program can be executed as a magnetic disk (flexible disk, hard disk, etc.), optical disk (CD-ROM, DVD). It is also possible to store and distribute in a recording medium such as a semiconductor memory.
[0213]
Further, the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
[0214]
【The invention's effect】
As described above, according to the present invention, a desired new display element can be displayed on the display screen of a display document obtained as a result of converting a structured document having a predetermined document structure such as an XML document using a style sheet. It is possible to insert a new element for generating the new display element into the XML document at the insertion position on the display document simply by designating the insertion position.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration example of an XML document editing apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram showing an example of an XML document to be edited.
FIG. 3 is a diagram illustrating an example of an XSLT document as a style sheet.
FIG. 4 is a diagram illustrating an example of a display document.
FIG. 5 is a diagram showing a display example of a display document.
FIG. 6 is a diagram showing an example of a conversion log.
7 is a flowchart for explaining the processing operation of the XML document editing apparatus in FIG. 1;
FIG. 8 is a diagram showing another example of a conversion log.
FIG. 9 is a diagram showing still another example of the conversion log.
FIG. 10 is a diagram showing a screen display example for a user to specify an insertion position of a new display node on a display screen of a display document. FIG. 10A is a display serving as a base point of the insertion position by a mouse pointer. A screen display example when a node is designated is shown, and FIG. 5B shows a screen display example when a positional relationship between a base point display node and a new display node by a mouse pointer is designated.
FIG. 11 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit, and is designated as an insertion position. This The processing operation for obtaining from the conversion log the insertion position of a new branch process that may generate a new display node whose positional relationship with the display node of the base point becomes a child node “child” is shown.
FIG. 12 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit.
FIG. 13 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit.
FIG. 14 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit.
FIG. 15 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit.
FIG. 16 is a conversion log to be searched for explaining the processing operation of the branch search unit 7 when the sibling node “next” is specified as the positional relationship with the display node of the base point specified as the insertion position; FIG.
FIG. 17 is a conversion log to be searched for explaining the processing operation of the branch search unit 7 when the sibling node “next” is specified as the positional relationship with the display node of the base point specified as the insertion position; FIG.
FIG. 18 is a flowchart for explaining the search processing operation of a new branch process of the branch search unit, and generates a new display node whose positional relationship with the display node of the base point designated as the insertion position is a sibling node. The processing operation for obtaining the insertion position of a possible new branch process from the conversion log is shown.
FIG. 19 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit.
FIG. 20 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit.
FIG. 21 is a flowchart for explaining the search processing operation of a new branch process of the branch search unit.
FIG. 22 is a flowchart for explaining the processing operation of the insertion candidate generation unit.
FIG. 23 is a flowchart for explaining the processing operation of the insertion candidate generation unit.
FIG. 24 is a flowchart for explaining the processing operation of the insertion candidate generation unit.
FIG. 25 is a flowchart for explaining the processing operation of the insertion candidate generation unit.
FIG. 26 is a diagram showing a display example of a selection menu generated by a candidate selection unit.
FIG. 27 is a diagram showing a display example of a selection menu generated by a candidate selection unit.
FIG. 28 is a flowchart for explaining the processing operation of the candidate selection unit.
FIG. 29 is a diagram showing a configuration example of an XML document editing apparatus according to a second embodiment of the present invention.
FIG. 30 is a diagram showing a screen display example for the user to specify the insertion position of a new display node on the display screen of the display document.
FIG. 31 is a diagram showing a screen display example for the user to specify the insertion position of a new display node on the display screen of the display document.
FIG. 32 is a diagram showing a display example of insertion candidates.
FIG. 33 is a diagram for explaining a search processing operation of a new branch process of the branch search unit, and a diagram for explaining a positional relationship of entries Es, entries En, and Eb on the conversion log.
FIG. 34 is a diagram for explaining a search processing operation of a new branch process of the branch search unit, and a diagram for explaining a positional relationship of entries Es, entries En, and Eb on the conversion log.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Display part, 2 ... Input part, 3 ... Document storage part, 4 ... Conversion processing part, 5 ... Intermediate storage part, 6 ... Context search part, 7 ... Branch search part, 8 ... Insertion candidate production | generation part, 9 ... Candidate Selection unit, 10... Data update unit, 11... Insertion position conversion unit, 12.

Claims (6)

複数の要素を含む文書構造を有する第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む当該第1の文書の文書構造とは異なる文書構造を有する表示文書に変換するための複数の命令文を含む第2の文書を記憶する第1の記憶手段と、
前記第1の文書を前記第2の文書を用いて前記表示文書に変換するとともに、前記第2の文書中の複数の命令文の実行順序に従って、各命令文と当該命令文の対象となった前記第1の文書中の要素との対応関係と、前記複数の命令文のうち表示要素を生成するための分岐処理を発生する命令文により発生された当該分岐処理と当該分岐処理の対象となる前記第1の文書中の要素との対応関係と、当該分岐処理により生成される各表示要素と当該表示要素を生成した当該分岐処理中に実行される命令文との対応関係とを示す変換ログを生成する変換手段と、
前記変換ログを記憶する第2の記憶手段と、
前記表示文書を表示する第1の表示手段と、
この第1の表示手段で表示された前記表示文書に対し、少なくとも当該表示文書中の複数の表示要素のうちの1つの第1の表示要素を指定する指定手段と、
前記第1の表示要素を生成した前記第2の文書中の命令文の前記変換ログ中での実行位置を基に、前記変換ログから当該第1の表示要素の子要素あるいは兄弟要素を生成する分岐処理を発生させる前記第2の文書中の第1の命令文を検索する検索手段と、
前記第1の命令文で指定される条件を満たす、前記第1の文書中の新たな要素を生成する生成手段と、
この生成手段で生成された新たな要素を、前記第1の文書中に挿入する挿入候補として表示する第2の表示手段と、
この第2の表示手段で表示された挿入候補のうち選択された挿入候補を、前記第1の文書中の前記複数の要素のうち、前記第1の命令文あるいは当該第1の命令文により発生した前記分岐処理の対象の要素の子要素あるいは兄弟要素となる位置へ挿入する挿入手段と、
を具備したことを特徴とする文書編集装置。
A first document having a document structure including a plurality of elements and a document structure different from the document structure of the first document including a plurality of display elements generated corresponding to any of the plurality of elements. First storage means for storing a second document including a plurality of statements for conversion into a display document;
The first document is converted into the display document using the second document, and each command statement and the command statement are targeted according to the execution order of the plurality of command statements in the second document. Corresponding relationship with the elements in the first document and the branch process generated by the statement that generates the branch process for generating the display element among the plurality of statements, and the target of the branch process A conversion log indicating a correspondence relationship between the elements in the first document and a correspondence relationship between each display element generated by the branch process and a statement executed during the branch process that generated the display element Conversion means for generating
Second storage means for storing the conversion log;
First display means for displaying the display document;
Designating means for designating at least one first display element among a plurality of display elements in the display document for the display document displayed by the first display means;
A child element or sibling element of the first display element is generated from the conversion log based on the execution position in the conversion log of the command statement in the second document that generated the first display element. Search means for searching for a first command statement in the second document that causes branch processing ;
Generating means for generating a new element in the first document that satisfies a condition specified by the first command statement ;
Second display means for displaying new elements generated by the generating means as insertion candidates to be inserted into the first document;
The second display insertion candidate inserted candidate sac Chi selection is displayed by a means, among the plurality of elements in the first document, the first instruction or the first instruction Inserting means for inserting into a position to be a child element or sibling element of the target element of the branch processing generated by
A document editing apparatus comprising:
前記新たな要素を前記第2の表示手段で挿入候補として表示するときには、前記第1の文書をコピーした仮文書中に当該新たな要素を挿入し、当該新たな要素の挿入された仮文書を前記第2の文書で変換した結果得られた表示文書をプレビューとして表示し、
当該新たな要素が前記第1の文書に挿入すべき挿入候補として選択されたときに、前記挿入手段で前記第1の文書中に挿入されることを特徴とする請求項1記載の文書編集装置。
When displaying the new element as an insertion candidate on the second display means, the new element is inserted into the temporary document copied from the first document, and the temporary document with the new element inserted is inserted. Displaying a display document obtained as a result of conversion by the second document as a preview;
2. The document editing apparatus according to claim 1, wherein when the new element is selected as an insertion candidate to be inserted into the first document, the new element is inserted into the first document by the inserting unit. .
前記指定手段は、
前記表示文書上での新たな表示要素の挿入位置を入力する入力手段と、
前記挿入位置を基に、前記第1の表示要素と、前記新たな表示要素が当該第1の表示要素の子要素であるか兄弟要素であるかを決定する手段と、
を具備したことを特徴とする請求項1記載の文書編集装置。
The designation means is:
Input means for inputting an insertion position of a new display element on the display document;
Means for determining, based on the insertion position, the first display element and whether the new display element is a child element or a sibling element of the first display element;
The document editing apparatus according to claim 1, further comprising:
前記検索手段は、
前記第1の表示要素を生成した前記第2の文書中の命令文前記変換ログ中での実行位置を基点として、当該第1の表示要素の子要素あるいは兄弟要素である新たな表示要素を生成する新たな分岐処理の前記変換ログ中での挿入位置を求めるとともに、当該新たな分岐処理を発生させる前記第1の命令文を求めることを特徴とする請求項記載の文書編集装置。
The search means includes
As the base for the execution position in the conversion log statements in the first and the second document to generate the display elements, a new display element which is a child element or sibling element of the first display element together determine the insertion position in the generated new branch processing the converted log for document editing apparatus according to claim 1, wherein the determining the first instruction to generate the new branch processing.
複数の要素を含む文書構造を有する第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む当該第1の文書の文書構造とは異なる文書構造を有する表示文書に変換するための複数の命令文を含む第2の文書を記憶する第1記憶手段と、
第2の記憶手段と
表示手段と
入力手段と、
前記第1の文書を編集するための制御を行う編集制御手段と、
を備えた文書編集装置における文書編集方法において、
前記編集制御手段が前記第1の文書を前記第2の文書を用いて前記表示文書に変換するとともに、前記第2の文書中の複数の命令文の実行順序に従って、各命令文と当該命令文の対象となった前記第1の文書中の要素との対応関係と、前記複数の命令文のうち前記表示要素を生成するための分岐処理を発生する命令文により発生された当該分岐処理と当該分岐処理の対象となる前記第1の文書中の要素との対応関係と、当該分岐処理により生成される各表示要素と当該表示要素を生成した当該分岐処理中に実行される命令文との対応関係を変換ログとして前記第2の記憶手段に記憶する変換ステップと、
前記編集制御手段が、前記表示文書を前記表示手段で表示する第1の表示ステップと、
前記表示手段で表示された前記表示文書に対し、前記入力手段で入力された前記表示文書上での新たな表示要素の挿入位置を基に、前記編集制御手段が、少なくとも当該表示文書中の複数の表示要素のうちの1つの第1の表示要素を決定するステップと、
前記編集制御手段が、前記第1の表示要素を生成した前記第2の文書中の命令文の前記変換ログ中での実行位置を基に、前記変換ログから当該第1の表示要素の子要素あるいは兄弟要素を生成する分岐処理を発生させる前記第2の文書中の第1の命令文を検索する検索ステップと、
前記編集制御手段が、前記第1の命令文で指定される条件を満たす、前記第1の文書中の新たな要素を生成する生成ステップと、
前記編集制御手段が、前記生成ステップで生成された新たな要素を、前記第1の文書中に挿入する挿入候補として前記表示手段で表示する第2の表示ステップと、
前記編集制御手段が、前記第2の表示ステップで表示された挿入候補のうち選択された挿入候補を、前記第1の文書中の前記複数の要素のうち、前記第1の命令文あるいは当該第1の命令文により発生した前記分岐処理の対象の要素の子要素あるいは兄弟要素となる位置へ挿入する挿入ステップと、
を有することを特徴とする文書編集方法。
A first document having a document structure including a plurality of elements and a document structure different from the document structure of the first document including a plurality of display elements generated corresponding to any of the plurality of elements. First storage means for storing a second document including a plurality of statements for conversion into a display document ;
A second storage means ;
Display means ;
Input means;
Editing control means for performing control for editing the first document;
In a document editing method in a document editing apparatus comprising:
The editing control means converts the first document into the display document using the second document, and each instruction sentence and the instruction sentence according to the execution order of the plurality of instruction sentences in the second document. The branch processing generated by the statement that generates the branch processing for generating the display element among the plurality of statements, and the correspondence relationship with the element in the first document that is the target of Correspondence relationship between elements in the first document to be subjected to branch processing, and correspondence between each display element generated by the branch processing and a statement executed during the branch processing that generated the display element A conversion step of storing the relationship in the second storage means as a conversion log ;
A first display step in which the editing control means displays the display document on the display means ;
Based on the insertion position of a new display element on the display document input by the input unit with respect to the display document displayed by the display unit, the editing control unit includes at least a plurality of the display documents in the display document. Determining a first display element of one of the display elements;
Based on the execution position in the conversion log of the command statement in the second document in which the editing control means has generated the first display element, the child element of the first display element from the conversion log Alternatively, a search step of searching for a first statement in the second document that generates a branch process that generates a sibling element ;
A generating step for generating a new element in the first document, wherein the editing control means satisfies a condition specified by the first command statement ;
A second display step in which the editing control means displays the new element generated in the generating step on the display means as an insertion candidate to be inserted into the first document;
Said editing control means, said second display insertion candidate inserted candidate sac Chi selection is displayed in step, among the plurality of elements in the first document, the first statement or An insertion step of inserting into a position to be a child element or a sibling element of the target element of the branch process generated by the first statement ;
A document editing method characterized by comprising:
コンピュータを、
複数の要素を含む文書構造を有する第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む当該第1の文書の文書構造とは異なる文書構造を有する表示文書に変換するための複数の命令文を含む第2の文書を記憶する第1の記憶手段、
前記第1の文書を前記第2の文書を用いて前記表示文書に変換するとともに、前記第2の文書中の複数の命令文の実行順序に従って、各命令文と当該命令文の対象となった前記第1の文書中の要素との対応関係と、前記複数の命令文のうち表示要素を生成するための分岐処理を発生する命令文により発生された当該分岐処理と当該分岐処理の対象となる前記第1の文書中の要素との対応関係と、当該分岐処理により生成される各表示要素と当該表示要素を生成した当該分岐処理中に実行される命令文との対応関係とを示す変換ログを生成する変換手段、
前記変換ログを記憶する第2の記憶手段、
前記表示文書を表示する第1の表示手段
この第1の表示手段で表示された前記表示文書に対し、少なくとも当該表示文書中の複数の表示要素のうちの1つの第1の表示要素を指定する指定手段、
前記第1の表示要素を生成した前記第2の文書中の命令文の前記変換ログ中での実行位置を基に、前記変換ログから当該第1の表示要素の子要素あるいは兄弟要素を生成する分 岐処理を発生させる前記第2の文書中の第1の命令文を検索する検索手段、
前記第1の命令文で指定される条件を満たす、前記第1の文書中の新たな要素を生成する生成手段、
この生成手段で生成された新たな要素を、前記第1の文書中に挿入する挿入候補として表示する第2の表示手段、
この第2の表示手段で表示された挿入候補のうち選択された挿入候補を、前記第1の文書中の前記複数の要素のうち、前記第1の命令文あるいは当該第1の命令文により発生した前記分岐処理の対象の要素の子要素あるいは兄弟要素となる位置へ挿入する挿入手段、
として機能させるための文書編集プログラム。
Computer
A first document having a document structure including a plurality of elements and a document structure different from the document structure of the first document including a plurality of display elements generated corresponding to any of the plurality of elements. First storage means for storing a second document including a plurality of statements for conversion into a display document ;
The first document is converted into the display document using the second document, and each command statement and the command statement are targeted according to the execution order of the plurality of command statements in the second document. Corresponding relationship with the elements in the first document and the branch process generated by the statement that generates the branch process for generating the display element among the plurality of statements, and the target of the branch process A conversion log indicating a correspondence relationship between the elements in the first document and a correspondence relationship between each display element generated by the branch process and a statement executed during the branch process that generated the display element Conversion means for generating
Second storage means for storing the conversion log;
First display means for displaying the display document;
The relative first said display document displayed by the display means, designating means for designating one of the first display element of the plurality of display elements of at least the display in the document,
A child element or sibling element of the first display element is generated from the conversion log based on the execution position in the conversion log of the command statement in the second document that generated the first display element. retrieval means for retrieving the first instruction of the second in a document to generate the branch processing,
Generating means for generating a new element in the first document that satisfies a condition specified by the first command statement ;
Second display means for displaying new elements generated by the generating means as insertion candidates to be inserted into the first document ;
The second display insertion candidate inserted candidate sac Chi selection is displayed by a means, among the plurality of elements in the first document, the first instruction or the first instruction Insertion means for inserting into a position that becomes a child element or sibling element of the element subject to branch processing generated by
Document editing program to function as
JP2003063736A 2003-03-10 2003-03-10 Document editing apparatus, document editing method, and document editing program Expired - Fee Related JP3828499B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003063736A JP3828499B2 (en) 2003-03-10 2003-03-10 Document editing apparatus, document editing method, and document editing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003063736A JP3828499B2 (en) 2003-03-10 2003-03-10 Document editing apparatus, document editing method, and document editing program

Publications (2)

Publication Number Publication Date
JP2004272684A JP2004272684A (en) 2004-09-30
JP3828499B2 true JP3828499B2 (en) 2006-10-04

Family

ID=33125242

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003063736A Expired - Fee Related JP3828499B2 (en) 2003-03-10 2003-03-10 Document editing apparatus, document editing method, and document editing program

Country Status (1)

Country Link
JP (1) JP3828499B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2006051954A1 (en) * 2004-11-12 2008-05-29 株式会社ジャストシステム Document processing apparatus and document processing method
JP2007179353A (en) * 2005-12-28 2007-07-12 Star Micronics Co Ltd Printing system, print data supply device, method for controlling print data supply device and program
US9535883B2 (en) * 2014-10-24 2017-01-03 Dropbox, Inc. Modifying native document comments in a preview

Also Published As

Publication number Publication date
JP2004272684A (en) 2004-09-30

Similar Documents

Publication Publication Date Title
JP4413286B2 (en) How to unify edge data structures
US8805861B2 (en) Methods and systems to train models to extract and integrate information from data sources
JP4656868B2 (en) Structured document creation device
US8078962B2 (en) Apparatus and method for generating web site navigations
AU2018253637B2 (en) Interactive tutorial integration
US20070204215A1 (en) Device for analyzing log files generated by process automation tools
US20170351656A1 (en) Method of preparing documents in markup languages
CN107608960A (en) A kind of method and apparatus for naming entity link
CN113177168B (en) Positioning method based on Web element attribute characteristics
Azir et al. Wrapper approaches for web data extraction: A review
JP3797821B2 (en) Ontology construction support device
JPWO2006051954A1 (en) Document processing apparatus and document processing method
JP2005227851A (en) Method and device for structured data storage
JP3828499B2 (en) Document editing apparatus, document editing method, and document editing program
JPWO2006051955A1 (en) Server apparatus and namespace issuing method
JP2005352612A (en) Device for supporting program development, and method for displaying variable name list
US20090287994A1 (en) Document processing device and document processing method
CN116186125A (en) Automatic chart generation system
CN116628303A (en) Semi-structured webpage attribute value extraction method and system based on prompt learning
JPWO2006051956A1 (en) Server apparatus and search method
CN114218515B (en) Web digital object extraction method and system based on content segmentation
CN111753042A (en) Artificial intelligence-based auxiliary writing system
US20100138735A1 (en) Document processing device
JPH09245052A (en) Structured document processor
JP2003248690A (en) Document processing device and method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060123

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060403

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060706

LAPS Cancellation because of no payment of annual fees