JP2004272684A - Document editing device, document editing method and document editing program - Google Patents

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

Info

Publication number
JP2004272684A
JP2004272684A JP2003063736A JP2003063736A JP2004272684A JP 2004272684 A JP2004272684 A JP 2004272684A JP 2003063736 A JP2003063736 A JP 2003063736A JP 2003063736 A JP2003063736 A JP 2003063736A JP 2004272684 A JP2004272684 A JP 2004272684A
Authority
JP
Japan
Prior art keywords
display
document
node
new
branch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003063736A
Other languages
Japanese (ja)
Other versions
JP3828499B2 (en
Inventor
Hiroshi Yao
浩 矢尾
Haruhiko Toyama
春彦 外山
Satoshi Shirai
智 白井
Masaru Ishimaru
大 石丸
Tatsunori Kanai
達徳 金井
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

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method and a device, capable of inserting a new element into an XML document on the basis of an insertion position specified on a display document of the XML document. <P>SOLUTION: The display document obtained by converting a first document by use of a second document is displayed. When at least a first display element is designated so as to insert the new display element that becomes a child element or a sibling element of the first display element inside the display document, a first instruction statement capable of producing the new display element from the second document is retrieved, and the new element that is the child element or the sibling element of the first element inside the first document that is a target of branch processing for producing the first instruction statement or the display element generated by the first instruction statement, satisfying a condition specified by the first instruction statement is produced. <P>COPYRIGHT: (C)2004,JPO&NCIPI

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]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to, for example, a method, apparatus, and program for performing editing for inserting a new element into an XML document via a display document obtained as a result of converting the XML document into an XSLT document.
[0002]
[Prior art]
Since an XML document describes data in a tree structure, a flexible data structure can be defined as compared with a tabular worksheet or a relational database.
[0003]
Further, since the grammar of the text format is defined as a standard, the user can directly edit the data of the text format. However, although human readability is ensured, it cannot be said that information stored in an XML document is easy to grasp. This is because the correspondence between the start tag and the end tag is checked, and the text description is unnecessarily long, and the listability is poor.
[0004]
The same is true when displaying in tree format instead of text format. This is because, although the data structure has various meanings, if they are uniformly displayed in the same tree format, their meanings cannot be easily distinguished at a glance.
[0005]
To edit the XML data, there are methods of (1) using a general text editor, (2) using an editing application dedicated to a certain data, and (3) using a general-purpose XML data editing application.
[0006]
In the dedicated application, the display method and the editing method can be created according to the data, so that it is easy to use and the efficiency such as the operation speed is good. However, the XML document is characterized in that the data structure can be flexibly designed, and is suitable for use as a format when an individual easily handles data. These data structures vary widely, and sophisticated programming techniques are required to create dedicated applications tailored to each.
[0007]
A general-purpose XML data editing application is generally for editing data in a display format provided by the application, and is often converted to a tree format or a table format and displayed.
[0008]
When a style sheet is used, various displays can be made by converting data. XSLT is defined as a standard as a style sheet technique 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, by converting the structure of the document, a format that does not display unnecessary data, a format that displays data that is to be compared, or data that is to be viewed at the same time is displayed adjacently. And so on.
[0009]
In order to edit the original XML data on the display of the HTML after the XSLT conversion, it is necessary to hold the correspondence between the HTML nodes and the nodes of the original XML data.
[0010]
In order to convert an XML document into an XSLT document and edit the original XML document via an HTML display document, information on an original XML node is embedded in a display node (for example, see Non-Patent Document 1).
[0011]
When adding new data on the HTML display after the 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 the element to be inserted and the insertion direction. However, such information is 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 the XSLT conversion. This is because element names and attribute names are not always displayed directly on the converted display, and the tree structure of the original XML data may be different from the tree structure of the converted HTML.
[0012]
In existing XML document editing, there are some which can select an insertion candidate in a menu format so as not to directly input an element name or an attribute name. For example, there are those that classify by node type and display all nodes in a selection menu in a list, and those that limit the nodes that are displayed in a list so as to conform to a schema or type definition.
[0013]
However, they still need to be aware of the tree structure and the 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 a structure is converted and displayed using a style sheet, the data is converted and displayed so that the user can grasp 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 involving a change in the structure of the original XML data, such as insertion of new data, the user is aware of the structure of the original XML data, despite looking at the converted HTML tree structure. It was necessary to specify the insertion position and the insertion node.
[0017]
As described above, conventionally, a structured document having a predetermined document structure, such as an XML document, is displayed via a display document obtained as a result of conversion using a style sheet. However, since the document structure of the display document is different from that of the original XML document, in particular, editing of inserting a new element into the XML document cannot be easily performed on the display document. there were.
[0018]
Thus, the present invention specifies a desired new display element insertion position on a 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 an object of the present invention to provide a document editing method, apparatus, and program that can insert a new element for generating a new display element into an XML document at an insertion position on the display document.
[0019]
[Means for Solving the Problems]
The present invention provides (a) a first document including a plurality of elements and a plurality of command statements for converting into a display document including a plurality of display elements generated corresponding to any of the plurality of elements. (B) converting the first document into the display document using the second document, displaying the display document, and (c) displaying the displayed document. In order to insert a new display element that is a child element or a sibling element of the first display element, which is one of the plurality of display elements in the display document, at least the first display element is specified, d) searching the second document for a first statement that can generate the new display element, and (e) retrieving the first statement or the display element generated by the first statement. The plurality of elements in the first document to be subjected to branch processing for generation Generating a new element that is a child element or a sibling element of the first element, which is one of them, and satisfies the condition specified by the first statement, and (f) the generated new element Are displayed as insertion candidates to be inserted into the first document, and (g) a selected insertion candidate among the displayed insertion candidates is 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]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0022]
In the following description, the case where the data to be edited 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. A document (display data) is called a display document, and an example in which an HTML document or an SVG document is generated as the display document will be described. Nodes (elements) in each document are called "XML nodes", "XSLT nodes", and "display nodes".
[0023]
(1st Embodiment)
FIG. 1 shows an example of the configuration 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]
The conversion log includes, in the order of the XSLT nodes executed in the process of the conversion processing unit 4, the XSLT node, the XML node corresponding to the XSLT node (that is, the current node), and the display node output by the XSLT node. Is recorded.
[0028]
Here, for example, taking a case where an XML document as shown in FIG. 2 is converted into a display document as shown in FIG. 4 using the XSLT document as shown in FIG. 3, an XSLT document and a conversion log according to the present embodiment will be described. A brief description will be given. FIG. 6 shows an example of the conversion log in this example. In each of FIGS. 2 to 4, the leftmost number (for example, 1: 2,...) Is a number (node number) used as an identifier for specifying each element in each document. Elements are assigned in the order of appearance in each document. The leftmost number (for example, 1 :, 2 :,...) Of each entry (one line of record information) in the conversion log in FIG. 6 is an identifier for identifying each entry, and is a processing order in the conversion processing. (Entry number). 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 described in the XSLT document for converting the XML document into the display document include: (1) which node in the given XML document is the conversion source, and (2) which node is the conversion destination display document. It specifies whether such a node is generated or added. To specify these two, XSLT uses an “xsl: template” element. The specification (1) is specified 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. In addition, the node of the display document generated for an element satisfying the condition specified by the “match” attribute in the XML document, that is, the node enclosed by the “xsl: template” tag It is described in. It can be said that the processing procedure for generating (converting) a node on the display document is described in a portion surrounded by the “xsl: template” tag.
[0030]
Then, the “xsl: apply-templates” element is used to make the display data of the conversion destination have 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”. I have. In the “xsl: template” element, the “xsl: apply-templates” element of the node number “3” in FIG. 3 uses the “select” attribute among the child elements of the element including “books” in the XML document. The result of converting an element satisfying the specified condition (ie, an element including “book”, for example) using another “xsl: template” element (element of node number “4”) is <TABLE></ TABLE > To be embedded between.
[0032]
The “xsl: apply-templates” instruction is executed for a node that satisfies the condition specified by the “select” attribute in accordance with a specified processing procedure (a process for generating a node or a process for not generating a node). In this case, if there are a plurality of nodes satisfying the condition, the specified processing procedure is repeatedly executed by the number of nodes.
[0033]
The XSLT defines an “xsl: if” instruction in addition to the “xsl: apply-templates” instruction. In this instruction, when the condition specified by the “test” attribute is satisfied, The specified processing procedure (a process for generating a node or a process for not generating a node in some cases) is executed. In the case of the “xsl: if” instruction, the designated processing procedure is executed only once.
[0034]
As described above, for a node in the XML document that satisfies the specified condition, the process shifts to a predetermined process for generating a node on the display data, and the predetermined process is executed only once or repeatedly plural times. Here, the instruction to be executed is referred to as a branch instruction. Here, shifting to a predetermined process (branching process) is also referred to as branching.
[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 a “xsl: apply-templates” instruction. A branch instruction that repeats execution of a predetermined process by the number of nodes satisfying the condition existing in the XML document is called a repeat instruction. Examples of the repeat instruction include an “xsl: apply-templates” instruction, an “xsl: for-each” instruction, an “xsl: value-of” instruction, and the like.
[0036]
A further description 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 is a display device of a computer on which the XML document editing device operates. The display document generated by the conversion processing unit 4 is drawn on the editing screen according to the display rules. For example, if 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 a user operation. A pointing device represented by a mouse corresponds to this. In each of the following editing operations, it is used when the user selects a display node on a display document or a function on an edit menu in the edit screen.
[0039]
The context search unit 6 receives the insertion position of the new display node on the display document (the positional relationship between the display node and the display node and the new display node) from the input unit 2 and refers to the conversion log to Based on the display node specified as the insertion position, a log entry, a current node, and an XSLT node in the conversion log corresponding to the display node are specified.
[0040]
The branch search unit 7 receives the log entry, the current node, and the XSLT node specified by the context search unit 6 based on the display node and the positional relationship specified by the user as the insertion position, and receives the specified insertion position. First, 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 generator 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 to the editing target XML document that satisfies the condition is generated, and the insertion position of the insertion candidate in the XML document is determined.
[0042]
When receiving 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 specified 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 operation of XML document editing device]
The 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 progress of the conversion process is recorded as a conversion log. The conversion log indicates when a branch is caused by each branch instruction in the XSLT document (branch position on the conversion log), and where the contents of the branch processing by the branch are in the execution progress of the series of conversion processing. Recorded so that it can be easily understood.
[0046]
(Step S2) The display document is drawn on the display unit 1.
[0047]
(Step S3) An insertion position (for inserting new display data) is specified by the user on the display screen of the display document displayed by the display unit 1. Here, the insertion position of the display node that does not exist in the current display document is specified. To specify the insertion position of the new display node, for example, the 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 a certain cell on a table displayed on a display screen, a display node (for example, a “TD” element) that displays the cell and the data displayed therein are displayed. The positional relationship on the display document with the new display node is a subsumption relationship (the new display node corresponds to a child node of the display node that displays the cell). Such a positional relationship is referred to herein as “child”. When data is to be inserted after a certain cell on a table displayed on the display screen or after a certain row, a display node that displays the cell or the row (for example, a “TD” element, The new display node displayed after the “TR” element is a node at the same hierarchical level in the tree structure, and the positional relationship on the displayed document is a sibling relationship. Here, it is called “next” or “nextSibling”.
[0049]
In this way, the user specifies the display node as the insertion position and specifies the positional relationship with the specified display node.
[0050]
(Step S4) The context search unit 6 refers to the conversion log and generates the display node specified as the insertion position on the display screen, that is, the log entry, that is, the XSLT document that generates the specified display node A node in the XML document (XSLT node) and a node in the XML document (XML node), that is, a current node are obtained.
[0051]
(Step S5) The branch search unit 7 generates a new display node at the specified insertion position based on the positional relationship specified as the insertion position with the log entry obtained from the conversion log as the base point. Find a branch instruction in the XSLT document. Note that there may be one or more 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 that causes the branch processing is obtained.
[0052]
(Step S6) For each of the obtained one or a plurality of branch instructions, the insertion candidate generation unit 8 selects a candidate XML node in the XML document that is to be processed by the branch instruction and satisfies the condition of the branch instruction. (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, and the XML node The position relationship with the candidate) corresponds to the entry retrieved by the branch retrieval unit 7 and the positional relationship between the entry and a new branch process. However, if the insertion candidate is an attribute node, the above positional relationship is not necessary, and it is sufficient to know which XML node in the XML document should be inserted. Therefore, in this case, the insertion position of the insertion candidate is 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.
[0053]
(Steps S7 to S8) In the candidate selection unit 9, the display node corresponding to each of the insertion candidates generated by the insertion candidate generation unit 8 is additionally displayed on a display screen, and the generated plurality of insertion candidates are displayed. A selection screen is presented to the user, and a selection screen for allowing the user to select one of the generated plurality of insertion candidates is generated and displayed.
[0054]
(Steps S9 to S10) Among the presented insertion candidates, the data update 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, conversion log, context search unit 6, branch search unit 7, insertion candidate generation unit 8, and candidate selection unit 9 in FIG. 1 will be described in detail.
[0056]
[Conversion log]
The conversion log includes the XSLT node executed in the process of the conversion process, the XML node corresponding to the XSLT node (that is, the current node), and the display node output by the XSLT node, if any. 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, an entry is created in the order in which the XSLT nodes are executed in the conversion process, and the executed XSLT node, the current node when the XSLT node is executed, and the display node output when the XSLT node is executed, respectively Is stored in the entry.
[0058]
As a form of the 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, numbers indicating the order of appearance of each node in a document are 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 order of appearance 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 format of appearance order + attribute name.
[0059]
As another form of the identification information of each node, there is a form (second form) in which the positions of the nodes on the path from the document root to the designated node in each level are sequentially described. For example, the node position of the node number “8” (the “title element” of the second “book” element in the XML document of FIG. 2 is the position of the node (“books” element) of the node number “1” at the highest level. It is the first child node of the second child node (“book” element) of the two child nodes, and is described as follows according to the notation of XPath (XML Path Language).
“/ Node () [1] / node () [2] / node () [1]”
Furthermore, the notation can be omitted as follows to reduce the size of the log. "1.2.1"
The advantage of the second embodiment is that the calculation of the position information and the specific processing amount of the node can be reduced as compared with the embodiment using the order of appearance in the document.
[0060]
In addition, there is no need to record the identification information of the node 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 identification information of each node (first form). 3) is also possible.
[0061]
The conversion log includes, in addition to identification information of various nodes corresponding to each entry, dynamic history structure information of an execution sequence, which is a history (execution sequence of a branch process) corresponding to a process (branch process) executed by a branch instruction. 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 the nested structure and information indicating which execution series each entry belongs to. From this information, an execution sequence in which a process corresponding to each entry is executed, an “xsl: apply-templates” instruction that instantiates a template, an “xsl: apply-templates” instruction, an “xsl: for-each” instruction, etc. The range of each iterative process can be specified in the instruction for performing the iterative process.
[0062]
In the conversion log shown in FIG. 6, as dynamic branch structure information, the nested structure of the execution sequence of branch processing is expressed by indentation. That is, the entry corresponding to the branch instruction is recorded as the parent node, and the branch generated by the branch instruction, that is, the branch processing, is recorded as its child node. Further, 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. Based on the relationship between the child node and the parent node on the tree structure, it is determined which branch processing is caused by which branch instruction. 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 processing is recorded as a child of the “branch” entry.
[0064]
When the branch instruction is a repetition instruction, a branch is generated for each node that specifies the condition of the node to be processed by the repetition instruction, for example, for each node that matches the path expression specified in the “select” attribute. In this case, a “branch” entry is recorded for each repetition processing).
[0065]
The current node corresponding to each "branch" entry is not the current node at the time of execution of the repetitive instruction, but the current node after instantiating the template. That is, the processing target node that satisfies the condition 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” instruction corresponding to the entry with the entry number “5” in the conversion log, the repetition processing is performed on the element that matches 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". The repetition process for this "book" element is recorded in the "branch" entries of entry numbers "6" and "17" in the conversion log in FIG.
[0067]
As another form of the conversion log, a form in which all information is not recorded in one log but divided into a plurality of correspondence tables is also possible. The conversion log does not record the identification information of the corresponding XSLT node and 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 still another form of the conversion log, a form in which a log entry corresponding to a display node or identification information of an XSLT node is directly embedded in a display node in a display document is also possible. FIG. 8 shows an example of a display document of this mode. 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 namespace.
[0069]
As another form of the conversion log, a form according to XML grammar is also possible. FIG. 9 shows a description example of the conversion log in this mode. In this example, each entry of the conversion log in the form shown in FIG. 6 is an XML element, and the XSLT node, current node, and display node identification information corresponding to each entry are expressed as attributes. Further, the dynamic branch structure represented by indentation in the form shown in FIG. 6 is represented by an XML tree structure.
[0070]
[Specify insertion position]
When the display document is generated by the conversion processing unit 4, the display document is displayed on the display unit 1 and the operation of the user is awaited. Here, the user specifies the insertion position on the display document via the display unit 1 and the input unit 2.
[0071]
An 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. FIG. 5 shows a display example of the display document 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 (a display node and a positional relationship).
[0072]
In step S3 in FIG. 7, the user moves the mouse pointer over a display area of a certain display node and clicks. In addition, the inside of the display area of a certain display node or the color of the frame is temporarily changed to indicate that the focus is on, the focus is moved to another display node (display area) with the cursor key, and the enter key ( For example, a form in which the insertion position is determined by an enter key) is also possible.
[0073]
When the user determines the display node, the user specifies the positional relationship between the display node and a new display node. As described above, it is preferable that at least two types of positional relationships, “child” and “next”, can be selected.
[0074]
For example, as shown in FIG. 10A, it is assumed that a display area of a blank cell at the lower right of the table is specified as the insertion position. At this time, a menu for specifying 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 the area has been designated. Further, similarly to the specification of the insertion position, a mode in which the focus is moved to each area using the cursor key to specify the positional relationship is also possible. The display node as the insertion position and the positional relationship thus obtained 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 a display area of a blank cell at the lower right of the table as an insertion position, and sets a positional relationship of FIG. It is assumed that “child” is specified as shown in FIG.
[0076]
[Context search section]
Upon receiving the positional relationship with the display node specified as the insertion position, the context search unit 6 specifies the entry of the conversion log that generated the display node, the current node, and the XSLT node.
[0077]
When the conversion log is in the form of FIG. 6, first, the identification information of the display node specified as the insertion position is obtained. In this embodiment, the order in which the nodes appear in the display document is calculated. Next, an entry having the identification information of the display node that matches the acquired identification information is searched for and specified from the conversion log.
[0078]
As shown in FIG. 8, in the case where the entry number of the conversion log is embedded in the display document, the identification information (here, the entry number) of the entry embedded in the display node specified as the insertion position is used. It suffices to acquire and specify the conversion log entry corresponding to the identification information.
[0079]
Next, the identification information of each node recorded in the specified entry is obtained, and the XSLT node is specified from the XSLT document, and the current node is specified 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 displaying this cell is the node number of FIG. This is a display node of “10”. Accordingly, 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 specified display node is an XSLT node with the node number “8”, and is generated when the XML node with the node number “7” is the current node.
[0081]
The obtained entry of the conversion log, the XSLT node, and the current node are passed to the branch search unit 7 together with the display node specified as the insertion position and the positional relationship.
[0082]
[Branch search section]
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 specified 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 whose positional relationship with the display node D is in the positional relationship specified as the insertion position is obtained from the conversion log (this is determined by the new branch process). Search for the insertion position.) When the insertion position of the new branch process in the conversion log is obtained, the entry corresponding to the branch instruction that causes the branch process is placed in the conversion log in the root direction of the node corresponding to the entry corresponding to the branch process ( (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 the dynamic nested structure of the execution sequence 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), an XSLT that outputs a child node of the display node D in addition to the child node of the XSLT node S Node may be present. Even if it is a descendant node that is not a direct child node of the XSLT node S, a display node output by a descendant node that does not sandwich an output instruction in each layer from the XSLT node S is a child node of the display node D. Also, when there is an “xsl: apply-templates” instruction or an “xsl: call-template” instruction 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 display node to be output 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 be present. For example, if the sibling node immediately after the XSLT node S is not an output instruction, it is necessary to check its descendant nodes. 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. Similarly to the case of the positional relationship “child”, when another template is instantiated, that template is also searched.
[0086]
[Search for Insertion Position of New Branch Process when Position Relationship is Designated 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, an analysis procedure of an entry (function searchChild) 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 into the argument Es, and the procedure searchChild is called (step S101 in FIG. 11).
[0088]
(2) function searchChild
An XSLT node S (hereinafter simply referred to as a 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 (repeated instruction / simple repeated instruction / branch instruction) ).
[0089]
When the node S is a repeat instruction (step S103), the processing operation shown in FIG. 13 is performed, and when the node S is a simple branch instruction (step S104), the processing operation shown in FIG. 14 is performed. Otherwise, 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 repetition process can be generated before, during, and after the repetition process (branch process) corresponding to the "branch" entry. Here, it is assumed that a new repetition process is generated before the first repetition process and after the last repetition process.
[0091]
When a new repetition process is generated before the first repetition process, information indicating a “branch” entry of the first child of the log entry assigned to Es as an insertion position of the new repetition process (new entry) (This is expressed as “Es.firstChild”) and information indicating “the immediately preceding sibling” as a positional relationship between the “branch” entry of the first child and the new repetition processing (this is expressed as “previousSibling”) Are sent to the insertion candidate generating unit 8 (step S106). In this case, since the new repetition processing (branch processing) 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 processing. “Es.firstChild” is information including information “Es” notifying the log entry including the branch instruction.
[0092]
When a new repetition process is to be generated after the last repetition, information indicating the "branch" entry of the last child of the log entry assigned to Es is set as the insertion position of the new repetition process (new entry). (This is expressed as “Es.lastChild”) and information indicating “immediate sibling” as a positional relationship between the “branch” entry of the last child and the new repetition processing (this is expressed as “nextSibling”) Are sent to the insertion candidate generating unit 8 (step S107). Also in this case, since the new repetition processing (branch processing) is generated by the XSLT node (repetition instruction) included in the entry currently assigned to Es, the XSLT node generates the new branch processing. This is the branch instruction to be executed. “Es.firstChild” is information including information “Es” notifying the log entry including the branch instruction.
[0093]
Thereafter, the procedure "searchChild" is recursively called using the "branch" entries ("Es.firstChild" and "Es.lastChild") of the child of Es as the arguments Es. When the recursive call for all “branch” entries is completed, the recursive call for Es is completed and the procedure returns to the original procedure (steps S108 to S111).
[0094]
If Es does not have a child "branch" entry (step S105), the condition for generating a new repetitive process may be considered. That is, the information (Es) representing the Es as the insertion position of the new repetition process (new entry) and the information (“Kids”) representing the “child” as the positional relationship between the log entry assigned to the Es and the new repetition process Here, it is sent to the insertion candidate generating unit 8 (step S112). Also in this case, since a new repetition process (branch process) is generated by the XSLT node (repetition instruction) included in the entry currently assigned to Es, the XSLT node causes the branch to generate the new branch process. Instruction. After that, the recursive call for Es ends, and the procedure returns to the original procedure.
[0095]
(4) When the node S is a simple branch instruction
As shown in FIG. 14, first, it is determined 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 "searchChild" is recursively called (step S123), using the "branch" entry Eb of the child of Es as an argument Es (step S122). When the recursive call for Eb ends, the recursive call for Es ends, and the procedure returns to the original procedure.
[0096]
If the log entry assigned to Es does not have a child "branch" entry (step S121), conditions for generating a new branch process may be considered. That is, information “Es” representing the Es as the insertion position of the new branch processing, and information representing “child” as a positional relationship between the log entry substituted for the Es and the new branch processing (here, “child”). ) Are sent to the insertion candidate generating unit 8 (step S124). In this case, the new (branch processing) is generated by the XSLT node (simple branch instruction) included in the entry currently substituted for Es, and therefore, the XSLT node uses the branch instruction that generates the new branch processing. is there. After that, the recursive call for Es ends, and the procedure returns to the original procedure.
[0097]
(5) When the node S is not a repeat instruction or a simple branch instruction
As shown in FIG. 15, first, the entry Ec corresponding to the XSLT node which 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), if another template is instantiated in the branch, it is necessary to check not the child XSLT node of the node S but the child node of the instantiated template. Therefore, if the first child entry of Es is an entry corresponding to template (step S133), the first child entry of Es (corresponding to template) is newly set as Es (step S134). Then, the XSLT node (template) corresponding to Es is set to S, and the sibling entry (corresponding to the first child of template) immediately after Es is set to Ec (step S134). If the first child entry of Es is not the entry corresponding to 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 processing (step S136), the recursive call for Es is terminated and the procedure returns to the original procedure.
[0100]
After Ec is determined (step S136), sibling entries (following-sibling) after Ec are sequentially examined in the conversion log, and the following processing is performed for each of them.
[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 as a direct child node of S. If C is not a child node of S (step S138), the next sibling entry is set to Ec (step S141), the process returns to step S136, and the process is repeated.
[0102]
If C is a child node of S (step S138), if C is not an output instruction (step S139), it is necessary to further examine its children, so the procedure searchChild is recursively called with Ec as the argument Es (step S142). ). If C is an output instruction (step S139), the process proceeds to step S140.
[0103]
If C is not the last child of S (step S140), the next sibling entry is set to 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 check for subsequent sibling entries, so the recursive call for Es ends and returns to the original procedure.
[0105]
By the above procedure, the insertion position (log entry and the log entry) on the conversion log of a 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 branching process) can be sent to the insertion candidate generating unit 8. Thereby, the insertion candidate generating unit 8 instructs the branch instruction in the XSLT document to cause the new branch processing (in this case, the XSLT node included in Es is the branch instruction in the XSLT document to cause the new branch processing). Can be notified. In the case of the above-described embodiment, as described above, information for notifying the branch instruction is added to the log entry notified as the insertion position on the conversion log of the new branch processing.
[0106]
[Search for Insertion Position of New Branch Process when Positional Relationship is Designated as "next"]
Next, the processing operation of the branch search unit 7 when “next” is specified as the positional relationship with the display node D will be described. First, in this case, the pattern of the conversion log to be searched will be described with reference to FIGS.
[0107]
In the conversion log shown in FIG. 16A, the entry E (entry entry) of the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “1”, and in the backward direction, the repeat instruction There is a log entry “apply-templates” corresponding to. The next “branch” entry is a child of this “apply-templates” and is the first iteration (branch). in this case,
Pattern 1: A position before the first branch process of the repetitive instruction (the entry number “3” in FIG. 16A) (before the entry number “3” in FIG. 16A) is set as the insertion position of the new branch process. . At this time, the branch instruction that causes the new branch processing (the branch instruction that generates a new display node) is the “apply-templates” instruction.
[0108]
Pattern 2: The search for the insertion position of the new branch process is continued in the first branch process of the repetitive instruction (entry numbers “3” to “6” in FIG. 16A). At this time, in FIG. 16A, the entry number “3” is set as the target entry.
[0109]
FIG. 16B shows a case where an entry E (attention entry) of the conversion log corresponding to “PPP” as the display node D is an entry with the entry number “1”, and a log entry corresponding to the repeat instruction in the backward direction. A conversion log in which “apply-templates” exists but whose “branch” entry corresponding to the branch processing by the repetition instruction does not exist as a child thereof. in this case,
Pattern 3: A new branch process is inserted as a child corresponding to the repetition instruction (in FIG. 16B, between entry numbers “2” and “3”). At this time, the branch instruction that causes the new branch processing is the “apply-templates” instruction.
[0110]
Pattern 4: The repetition instruction is ignored, and the subsequent entry (the entry number “2” in FIG. 16B) is set as the target entry, and the search for the insertion position of the branch processing is continued.
[0111]
In FIG. 16C, when the entry E (target entry) of the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “5”, the insertion position of the new branch processing from this entry Has been started, but the branch processing “branch” entry that generated the “PPP” element has been completed in this entry. 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 the entry number “3” in FIG. 16C). At this time, the branch instruction that causes the new branch processing is the branch instruction that has generated the current branch processing (entry numbers “3” to “5” in FIG. 16C), and is the same as that in FIG. ) Is an “apply-templates” instruction with entry number “2”.
[0112]
Pattern 6: A new branch process (entry numbers “6” to “9” in FIG. 16C) following the current branch process (entry numbers “3” to “5” in FIG. 16C) The search for the insertion position of the branch processing is continued. At this time, in FIG. 16C, the entry number “6” is set as the target entry.
[0113]
In FIG. 16C, when the entry E (attention entry) of the conversion log 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 of the branch processing. In this case,
Pattern 7: Searching for the insertion position of a new branch process using the entry after the repetition instruction (entry number “2” in FIG. 16C) (entry number “10” in FIG. 16C) as the target entry continue.
[0114]
In the conversion log shown in FIG. 17A, the entry E (entry entry) of the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “1”, and is a simple branch in the backward direction. The log entry “if” (entry number “2”) corresponding to the instruction exists. The subsequent “branch” entry with entry number “3” indicates that the condition of the “if” instruction with entry number “2” has been satisfied and the branch processing has actually occurred on the current node. in this case,
Pattern 8: The search for the insertion position of the new branch process is continued in the branch process of the simple branch instruction. At this time, in FIG. 17A, the entry number “3” is set as the target entry.
[0115]
In the conversion log shown in FIG. 17B, the entry E (entry entry) of the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “1”, and is a simple branch in the backward direction. If there is a log entry “if” (entry number “2”) corresponding to the instruction, but the condition of the “if” instruction is not satisfied and branch processing has not occurred (the child of the “if” entry is “ "branch" entry does not exist). in this case,
Pattern 9: Insert a new branch process that satisfies the condition of the simple branch instruction as a child corresponding to the simple branch instruction (between entry numbers “2” and “3” in FIG. 17B). At this time, the branch instruction that causes the new branch processing is the “if” instruction of the simple branch instruction (entry number “2” in FIG. 16C).
[0116]
Pattern 10: The search for the insertion position of the branch processing is continued with the subsequent entry (entry number “3” in FIG. 17B) as the target entry, ignoring the simple branch instruction.
[0117]
In the conversion log shown in FIG. 17C, the entry E (attention entry) of the conversion log corresponding to “PPP” as the display node D is the entry with the entry number “4”, and a new branch process is performed from this entry. The search for the insertion position has started, but this entry ends the branch process “branch” entry that generated the “PPP” element. in this case,
Pattern 11: Searching 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]
FIGS. 18 to 21 are flowcharts for explaining the insertion position of a new branch process on the conversion log and the processing operation when searching for a branch instruction corresponding to each of the above patterns.
[0119]
The entry Es in the flowchart represents an entry serving as a search starting point (the noted entry), and the node S represents an XSLT node corresponding to the entry Es. In the following description, the positional relationship between the entry Es, the entry En, and the Eb on the conversion log will be described with reference to FIGS.
[0120]
(1) Start search
First, a log entry of the conversion log received from the context search unit 6 is Es, and an XSLT node corresponding to Es is a node S.
[0121]
(2) Identification of En
The entry En corresponding to the XSLT node executed after 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 of Es (that is, Es and En have a positional relationship as shown in FIG. 33A), and (a2) En. An XSLT node N corresponding to (contained in En) is a sibling of an XSLT node S (contained in) corresponding to Es (S and N have the same parent). A search is made 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]
When Es is a “branch” entry (step S151), when another “template” is instantiated in the branching process corresponding to the “branch” entry, not the child XSLT node of the node S but the instantiated template You need to look at the child nodes.
[0125]
Therefore, if the first child entry of Es (Es.firstChild) is a “template” entry (step S157), a sibling entry immediately after the first child entry of Es (the “template” entry) (the first of the “template” entry) Child entry) Es. firstChild. Nextsibling is set 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 the “template” entry (step S157), the first child entry of Es (the first child entry of the branch instruction) Es. FirstChild is set to En (step S159). FIG. 33C shows the positional relationship between Es and En at this time.
[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, when 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, if the type of the node N is a repetition instruction, the process proceeds to the process of the flowchart shown in FIG. If the node N is not a repetition instruction, the process proceeds to step S162. If the node N is a simple branch instruction in step S162, the process proceeds to the processing of the flowchart shown in FIG. Otherwise, the process ends.
[0130]
(4) When node N is a repeat instruction (see FIG. 20)
The process proceeds to step S181 in FIG. 20, and first, it is determined whether En has a “branch” entry as a child. When Es has “branch” entries (step S181), a new repetition can be generated before the repetition processing corresponding to those “branch” entries (corresponding to the pattern 1). Therefore, the process proceeds to step S182, where the information (“En.firstChild”) indicating the head “branch” entry of En and the head “branch” entry and the new repetition process are set as insertion positions of the new repetition process. A pair of information “previousSibling” representing “immediate sibling” as a positional relationship is sent to the insertion candidate generating unit 8. In this case, the branch instruction that causes the new repetition processing is the XSLT node N corresponding to En. “En.firstChild” is information including information “En” for notifying a log entry including the branch instruction. Thereafter, the process returns to step S151 in FIG. 18 (corresponding to the pattern 2) with the “branch” entry of the first child of En as Es.
[0131]
If Es does not have a "branch" entry (step S181), a new repetition process corresponding to the repetition instruction of the node N is generated (corresponding to the pattern 3). For this purpose, in step S184, information “En” representing En and information “child” representing “child” as a positional relationship between the En and the new repetition process are combined as an insertion position of the new repetition process. And sends it to the insertion candidate generator 8. In this case, the branch instruction that causes the new repetition processing is the XSLT node N corresponding to En. Thereafter, En is set to Es, and the process returns to step S151 in FIG. 18 (corresponding to the pattern 4).
[0132]
(5) When the node N is a simple branch instruction (see FIG. 21)
The process advances to step S191 in FIG. 21 to check whether En has a "branch" entry as a child. If 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 described above).
[0133]
If En does not have a “branch” entry (step S191), a new branch process corresponding to the simple branch instruction of the node N is generated (corresponding to the pattern 9). For this purpose, 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 generating unit 8. In this case, the branch instruction that causes the new branch processing is the XSLT node N corresponding to En. Thereafter, the process proceeds to step S194, where En is set to Es, and the process returns to step S151 in FIG. 18 (corresponding to the pattern 10).
[0134]
(6) When En does not exist
If En does not exist in steps S153 and S160 in FIG. 18, the process proceeds to step S171 in FIG. Here, when the branch processing (current branch processing) including the entry corresponding to Es (entry entry) corresponding to Es has been completed (that is, in the conversion log, Es is shown in FIGS. 34A to 34C). Is performed at the position as shown in FIG.
[0135]
If the parent of Es (Es. ParentNode) is the root (root), that is, the last entry at the highest level of the conversion log (step S171), the processing ends. Otherwise (step S171), as shown in FIG. 34A, the “branch” entry (ie, Es' parent node Es.parentNode) corresponding to the branch process including Es is set to Eb, and the branch process is performed. The entry corresponding to the instruction (ie, the parent node Eb.parentNode of Eb) is set to En, and the XSLT node corresponding to En is set to N (step S172).
[0136]
When the node N is a repetition instruction (step S173), a new repetition process can be generated as a sibling node of Eb (corresponding to the pattern 5). Therefore, in step S174, information “Eb” representing Eb is inserted as a new insertion position of the repetitive processing, and “nextSibling” representing “next sibling” as a positional relationship between the Eb and the new repetition processing. To the insertion candidate generating unit 8. In this case, the branch instruction that causes the new branch processing is the node N corresponding to Eb and En having a positional relationship as shown in FIG.
[0137]
Further, as shown in FIG. 34 (b), if the sibling entry (Eb. Nextsibling, entry number "6") exists immediately after Eb (entry number "3") (step S175), the entry is Is repeated. 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 repetition processing. Then, En is set as new Es (step S177), and the process returns to step S151 in FIG. 18 (corresponding to the pattern 7).
[0139]
If the node N is a simple branch instruction (step S178), the process returns to step S151 in FIG. 18 with En as Es (corresponding to the pattern 11).
[0140]
By the above procedure, the insertion position (log entry and the log entry and the new log entry and the new log entry) in the conversion log of the new branching process that generates a new display node that is a sibling node of the display node specified as the insertion position. (The positional relationship with the branching process) can be sent to the insertion candidate generating unit 8. As a result, the insertion candidate generating unit 8 can be notified of the branch instruction in the XSLT document that causes the new branch processing. In the case of the above-described embodiment, as described above, information for notifying the branch instruction is added to the log entry notified as the insertion position on the conversion log of the new branch processing.
[0141]
[Insert candidate generation unit]
As described above, the branch search unit 7 inserts a new branch process into the conversion log (an insertion position in the conversion log serving as a reference and the positional relationship between the entry and the new branch process: “previousSibling”, “nextSibling”, “nextSibling”). child ") and the branch instruction of the XSLT node that causes the new branch processing.
[0142]
Specifically, (1) an XSLT node (branch instruction) for generating a new branch process for generating a new display node to be inserted into a display document, and an XML node and an XML document which are targets of the XSLT node Positional relationship with the new element to be inserted ("previousSibling" when the new element corresponds to the sibling node immediately before the XML node, "nextSibling" when the new element corresponds to the sibling node immediately after the XML node, and 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 XML node that is subject to the branching process generated by the above, and a new element to be inserted into the XML document Positional relationship (the same way, "previousSibling", "nextSibling", "child") is obtained.
[0143]
Therefore, the insertion candidate generation unit 8 performs a new branch process to be inserted at the insertion position in the conversion log obtained by the branch search unit 7 (the positional relationship between the entry on the conversion log and the entry and the new branch process). 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 in the XML document is set so as to have the above-described positional relationship with the node serving as the base point in the XML document. Position. That is, when the information shown in the above (1) is obtained, the XML node serving as the base point is an XML node that is a target of a branch instruction (XSLT node) that generates a new branch process for generating the insertion candidate. When the information shown in (2) above has been obtained, the XML node serving as the base point has already been generated by an XSLT node (branch instruction) that generates a new branch process for generating the insertion candidate. A document structure of an XML document which is an XML node subjected to branch processing and whose positional relationship between the base XML node and the insertion candidate is any of "previousSibling", "nextSibling", and "child" The upper position. Here, the above positional relationship (“previousSibling”, “nextSibling”, “child”) is modeled on Xpath, and is also referred to as “axis”.
[0144]
First, the insertion candidate generation unit 8 generates an insertion candidate that satisfies the condition specified by the branch instruction that generates a new branch process to be inserted at the insertion position determined by the branch search unit 7. If the branch instruction is a repeat instruction, a condition (conditional expression) is specified by the “select” attribute, and if the branch instruction is a simple branch instruction, a condition (conditional expression) is specified by the “test” attribute.
[0145]
Here, as a simple example, only a case where a path expression representing a node in a conditional expression represents a relative path from the current node and does not include an axis other than the child axis or the attribute axis.
[0146]
When a predicate is specified, only the case where the content of the predicate is the above-described 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]”, and “book [$ point = 3]” apply to this. On the other hand, “book / title”, “book [.// review]”, etc. are excluded from the target.
[0147]
Next, the processing operation of the insertion candidate generating unit 8 will be described with reference to the flowchart shown in FIG.
[0148]
(1) Processing start
In FIG. 22, first, an entry E corresponding to a 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 for the XSLT node corresponding to E, and C is acquired for 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 repetition instruction (step S204), the processing shifts to the processing of the flowchart shown in FIG. 23, and when S is a simple branch instruction (step S205), the processing shifts to the processing of the flowchart shown in FIG. Otherwise, the process ends.
[0150]
(2) When node S is a repeat instruction
When S is a repetition instruction, in addition to the above-described path expression patterns, the combined expressions of those path expressions are also targets for generating insertion candidates. For example, a join expression such as “title | review” applies to this.
[0151]
FIG. 23 shows the processing when S is a repeat instruction. The conditional expression obtained from the “select” attribute is set as Cond (step S211). This Cond is checked, and if the Cond is not the target (step S212), the process ends without generating an insertion candidate. If a combined expression is obtained (step S213), the individual combined path expressions are extracted (step S214).
[0152]
The procedure createCand is called using each path expression as Exp, and using 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 using the expression Cond, the current node C, and the positional relationship Axis as arguments (step S219).
[0154]
(3) When the node S is a simple repeat instruction
When S is a simple repetition instruction (for example, an “if” instruction), in addition to the above-described path expression pattern, a comparison expression between the path expression and a constant is set as an insertion candidate. For example, a comparison formula such as “$ point = 3” applies to this.
[0155]
FIG. 24 shows a process when S is an “if” instruction. The conditional expression obtained from the "test" attribute is set as Cond (step S221). The Cond is checked, and if the Cond is not the target (step S222), the process ends without generating an insertion candidate. If they match, it is checked whether it is a pass expression or a comparison expression (step S223).
[0156]
When the 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 (step S224), as in the case of the repetition instruction.
[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, when the conditional expression is “$ point = 3”, the expression is converted to “$ point [. = 3]”. Thereafter, the procedure createCand is called using the converted Cond, the current node C, and the positional relationship Axis as arguments (step S224).
[0158]
(4) Generation of candidates satisfying the path expression (function createCand)
The process of the procedure createCand will be described with reference to the flowchart shown in FIG. First, a head node test (NodeTest) and a predicate (Predicate) 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 of an insertion candidate (step S232). If 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, when the conditional expression is “book [review]”, a tree “<book><review / >></book>” is generated as an insertion candidate. When the conditional expression is “book [@ point = 3] [review]”, a tree “<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 an insertion candidate node R (step S232).
[0161]
If the predicate P exists (step S234), it is assumed that the node R has a value satisfying the condition only in the case of a comparison expression between the value of the attribute itself and a constant (step S235, step S240). For example, when the conditional expression is “$ point [. = 3]”, the “point” attribute is set as an insertion candidate and its 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 in which the value of the node R is set is possible. If the value of the node R is specified by the presence of the predicate, the value is used. If the value is not specified, the element name or attribute name of the node R is used as the value.
[0164]
As a result, the value of the node R is displayed by the “value-of” instruction, and the change of the displayed 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 a user's selection via the display unit 1 and the input unit 2.
[0166]
The simplest form of displaying an insertion candidate is a form in which an area corresponding to each insertion candidate is displayed, and each candidate is displayed therein in a general text format of an XML document.
[0167]
FIG. 26 shows an example of a display example of the insertion candidates of this mode. In this embodiment, the user selects an insertion candidate using the element name and the attribute name of the XML document as a judgment material. In the example of FIG. 26, the display area (corresponding to the “TD” node in the display document) of the cell in the lower right of the table in the table is specified as the insertion position in FIG. 10, and a new insertion is performed with the specified display node. This is an example in which after specifying “child” as a positional relationship with a display node, a window R1 for displaying each insertion candidate in a general text format of an 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 in FIG. Therefore, a log entry with an entry number “25” is inserted as the insertion position of the new branch processing, and information “child” representing “child” as a positional relationship between the log entry and the new branch processing is paired. This is sent to the insertion candidate generating 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 causes the new branch processing in the XSLT document. The insertion position of the insertion candidate in the XML document corresponds to the position where the positional relationship with the XML node targeted for the branch instruction “value-of” is “child”. In this case, the XML node to be subjected to the branch instruction “value-of” is the XML node with the node number “7” in FIG. 2, and the positional relationship with this node is “child” (or the insertion candidate is an attribute node). In the case of (1), an insertion candidate that becomes “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 the insertion candidate = “point” attribute (the value is a character string “point”), and as the insertion position of the insertion candidate in the XML document, the current node = the node number “7” (/ books [1] / book [2] ]), The positional relationship between the current node and the insertion candidate = child “child” is sent.
[0171]
The candidate selection unit 9 generates a window R1 that displays each insertion candidate generated by the insertion candidate generation unit 8 and the insertion position of each insertion candidate, and displays the window R1 on the display unit 1 (Steps S252 to 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 the insertion candidate, a form in which each insertion candidate is temporarily inserted into an XML document, converted into an HTML document by an XSLT document, and a preview is displayed on an editing screen is possible. FIG. 27 shows a display example of this mode.
[0174]
As shown in FIG. 26, after displaying the insertion candidate in the window R1 (step S254 in FIG. 28), when the user moves the mouse pointer to a 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]
Further, when the user performs a determination operation such as a mouse click on a desired insertion candidate displayed in the window R1, the selection of the insertion candidate is determined.
[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 sets the insertion candidate (candidate = “point” attribute (the value is a character string “Point”) and the XML node (/ books [1] / book [2]) corresponding to the node number “7” as the insertion position in the XML document of the insertion candidate and the position of the node and the insertion candidate Based on the relationship = “child (attribute)”, the insertion candidate (candidate = “point” attribute (value is a character string “point”) is added to the copy (temporary document) of the XML document stored in the document storage unit 3. At 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 = “child (attribute)”. The copy of the inserted XML document is converted into a display document using the XSLT document, and the display document as a result of the conversion is displayed on the display unit 1 instead of the current display document (steps S256 to S258). As a result, as shown in FIG. 27, a character string “$ point” which is the value of the “point” attribute of the insertion candidate is displayed in the blank cell at the lower right of the table.
[0177]
When the user performs a determination operation such as a mouse click on a desired insertion candidate displayed in the window R1, the selection of the insertion candidate is determined (step S259). In this case, the data updating unit 10 Then, the determined insertion candidate and the 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 a node number “7” (/ books [1]) are set as an insertion position of the insertion candidate in the XML document. / Book [2]) and the positional relationship between the node and the insertion candidate = “child (attribute)” are passed to the data updating unit 10.
[0179]
The data updating unit 10 inserts an insertion candidate (candidate = “point” attribute (value is a character string “point”) into the XML document stored in the document storage unit 3 with a node (/) corresponding to the node number “7”. (books [1] / book [2]) and the insertion candidate are inserted at the insertion position where the positional relationship = “child (attribute)”.
[0180]
After that, the conversion processing unit 4 converts the updated XML document into a display document using the XSLT document (at this time, records a conversion log), and displays the display document on the display unit 1 as described above. .
[0181]
If the mouse pointer is moved to an area corresponding to another insertion position on the display screen without performing the determination operation, the branch search unit 7 starts a new process and switches the display contents of the insertion candidate. 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 insertion position (the currently displayed display node, the display node, (Positional relationship with a new display node), an 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 branching processing using the branch instruction A new XML node is generated as an insertion candidate, and an insertion position of the insertion candidate in the XML document is obtained. The insertion candidate is an XML node that is the target of the searched branch instruction, or a child node (attribute of the XML node that is the target of the branch processing 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 are inserted into the XML document.
[0183]
By previewing the display document obtained as a result of inserting each insertion candidate at the respective insertion position in the XML document, the user can obtain the editing result of the XML document that actually gives the desired result from the plurality of insertion candidates. To be inserted can be selected.
[0184]
The insertion candidate generator 8 can generate and present an insertion candidate that changes 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 and the data after the conversion by the style sheet (for example, the XML document) without being aware of the tree structure, the element names, and the attribute names of the XML document.
[0185]
(Second embodiment)
In the XML document editing apparatus according to the first embodiment, when designating an insertion position for inserting a new display node in a display document, the display node currently displayed on the display screen and the new insertion node The positional relationship with the node ("child", "next") has been specified.
[0186]
However, with such an insertion position specification method, a display node that is not displayed on the screen cannot be specified as an insertion position. For example, in a table displayed by a “TABLE” element in a display document (HTML document), when another line is to be newly added below a certain line, a “TR” node representing this new line is specified on the screen. It is not possible.
[0187]
Also, when adding a “TD” node (as a sibling node) after a “TD” node representing a cell in a display document, it is displayed “right” on the screen, whereas “TR” representing a line is displayed. When a “TR” node is added after the “” node (as a sibling node), it is displayed as “below” on the screen. Therefore, a user who knows the display rules of HTML can specify “right” and “down” on the screen as “next” as a positional relationship in the sense of adding a sibling node on HTML, but does not know the display rules. 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 actual display on the display screen and the insertion position in the structure of the HTML document are not always clear.
[0189]
Therefore, in the XML document editing apparatus according to the second embodiment, in order to solve the above-mentioned problem, as a method of designating the insertion position, the insertion position specified by the user on the display screen is processed in the XML document editing apparatus. It has an insertion position conversion unit 11 that 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, FIG. 29 further includes an insertion position conversion unit 11 and a conversion rule storage unit 12 that stores conversion rules used by 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, and the input insertion is performed. The position is converted to an insertion position suitable for processing in the XML document editing device. The context search unit 6, branch search unit 7, insertion candidate generation unit 8, candidate selection unit 9 and the like use the insertion position obtained by the insertion position conversion unit 11 to execute the first embodiment described above. A processing operation similar to that of the XML document editing apparatus of the embodiment is performed. Otherwise, the configuration is the same as that of the XML document editing apparatus according to the first embodiment.
[0192]
When the user specifies the insertion position on the display screen on which the display document is displayed, the user specifies one of the display areas currently displayed on the display screen and determines whether or not the display area is based on the display area. It is natural to specify on the right or below. Therefore, after displaying the display document in step S2 of FIG. 7, when the user specifies a certain display area (that is, a display node) on the display screen as the insertion position of the new display node in step S3, Display an edit menu for designating the positional relationship between the appropriate display node and the display area by the positional relationship on the screen, such as “middle (inner)”, “right” (right), and “down”. .
[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 edit menu is displayed. According to this edit menu, “inner” when the selected cell is the base point and the insertion position is within the cell, and “right” when a new cell is inserted to the right of the cell. )), And “down” when a new row is inserted below the cell. It is assumed that the user has selected "down" from this edit menu. In this case, from the input unit 2, the specified display node (the display node of the node number “8” in the HTML document of FIG. 4) and the specified positional relationship “down” are set as the insertion positions specified by the user. A pair is passed to the insertion position conversion unit 11.
[0194]
Upon receiving the user-specified insertion position information (for example, as described above, a pair of the display node Bin and the positional relationship Ain), the insertion position conversion unit 11 converts each of the conversion rules stored in the conversion rule storage unit 12. By referring to the condition described in the condition part, a conversion rule in which the received insertion position specified by the user 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 a display node and a positional relationship) used in the processing in the apparatus, and is 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, an insertion position for inserting a new row below the cell, that is, the display position This is converted into the positional relationship "next" between the node "TR" and the display node and the new display node.
[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 the specified display node). ("TR" node, positional relationship "next"). As the insertion position after the conversion, the element name of the display node and the positional relationship between the display node and a new display node are specified.
[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 specifies the display node “TD” and specifies “right” as the positional relationship, the conversion rule applied to this is (TD, right) → (TD, next). According to this conversion rule, when the user specifies a certain TD node in the table as the insertion position and specifies "right" as the positional relationship, the context search unit 6 determines that the specified TD node is the insertion position. , “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 sets of conversion results of each rule are sent to the context search unit 6. The context search unit 6, branch search unit 7, and insertion candidate generation unit 8 perform processing on each set. The insertion candidate selection unit 8 adds all the insertion candidates generated in those processes to the selection menu.
[0201]
If no matching rule exists, the following default conversion rules apply.
[0202]
(*, Right) → (*, next)
(*, Down) → (*, next)
(*, Inner) → (*, child)
“*” Specified in Bin indicates 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 the insertion position before and after the conversion. This form of conversion rule is
The condition (path pattern Pin, positional relationship Ain) → (path expression Pout, positional relationship Aout) is used.
[0204]
Whether the set of user-specified insertion positions (display node Borg, positional relationship Aorg) matches the condition part of the conversion rule is determined by determining whether the display node corresponding to Borg matches the path pattern Pin of the conversion rule, When Aorg matches Ain of the conversion rule, it is determined that there is a match. If the conversion rule matches, the positional relationship after the conversion is Aout. The converted display node is a node Bout included in a node set obtained by evaluating Pout using Borg as a context node. After the conversion, the (Bout, Aout) pair 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, in the conversion rule of (TD | TH, down) → (parent :: TR, nextSibling), the user specifies a certain TD node representing a cell in a table or a TH node representing a heading character as an insertion position, and specifies a positional relationship. When "down" is specified as the value, the condition part of the conversion rule is matched. After the conversion, the parent node of the TD node or the 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 to insert the next row when you specify below a certain 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 conversion rule (condition (display Node “TD”, positional relationship “down”) → (display node “TR”, positional relationship “next”)). Therefore, the designated display node is converted into the display node with the node number “7” in the HTML document of FIG. 4, and the positional relationship is converted into “next”. The converted insertion position is sent to the context search unit 6. As a result of the processing of the context search unit 6, the branch search unit 7, and the insertion candidate generation unit 8, "<book />" is set as the insertion candidate R, and the XML node C = node number "7" is set as the insertion position of the insertion candidate in the XML document. Axis = “nextSibling” is sent to the candidate selection unit 9 as the positional relationship between the XML node C and the insertion candidate.
[0208]
When the insertion candidate is inserted into a copy of the XML document (that is, the third “book” element is inserted in the XML document in FIG. 2), and a preview is displayed (steps S251 to S258 in FIG. 28) 32 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 into the insertion position in the document structure of the HTML document, which is easy for the user to understand. The insertion position can be specified on the display screen in a form that is easy to specify.
[0210]
When the user specifies the insertion position, as described above, the positional relationship between the display node serving as the base point and the display node among the currently displayed display nodes is specified, but the present invention is not limited to this. . That is, if the above conversion rule is used, it is possible to specify the insertion position by specifying a desired point or area on the display screen. In this case, the conversion rule is that the specified display area is a condition, and the user-specified insertion position that matches this condition is determined by the positional relationship between the converted display node corresponding to the display area and the new display node. It is specified to be converted 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 embodiments of the present invention can be realized as a program that can be executed by a computer, and can be implemented by using a magnetic disk (flexible disk, hard disk, or the like) or an optical disk (CD-ROM, DVD). And the like, and stored in a recording medium such as a semiconductor memory for distribution.
[0213]
Further, the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the gist thereof at the stage of implementation. Various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all the components shown in the embodiment. Further, components of different embodiments may be appropriately combined.
[0214]
【The invention's effect】
As described above, according to the present invention, a desired new display element is displayed on a 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. By simply designating the insertion position of a new element, a new element for generating the new display element can be inserted into the XML document at the insertion position on the display document.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration example of an XML document editing device 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 view showing an example of an XSLT document as a style sheet.
FIG. 4 is a diagram showing 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.
FIG. 7 is a flowchart for explaining the processing operation of the XML document editing device of 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.
10A and 10B are diagrams illustrating an example of a screen display on which a user specifies an insertion position of a new display node on a display screen of a display document, and FIG. 10A illustrates a display serving as a base point of an insertion position using a mouse pointer. An example of a screen display when a node is designated is shown, and FIG. 2B shows an example of a screen display when a positional relationship between a display node at a base point and a new display node is designated by a mouse pointer.
FIG. 11 is a flowchart for explaining a search processing operation of a new branch process of the branch search unit, and a new display node whose child node “child” has a positional relationship with a display node of a base point specified as an insertion position; The processing operation for obtaining the insertion position of a new branching process that may generate a. From the conversion log 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 a processing operation of the branch search unit 7 when a sibling node “next” is specified as a positional relationship with a display node of a base point specified as an 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 a search processing operation of a new branch process of the branch search unit, and generates a new display node whose positional relationship with a display node of a base point specified as an 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 a search processing operation of a new branch process of the branch search unit.
FIG. 22 is a flowchart illustrating a processing operation of an insertion candidate generation unit.
FIG. 23 is a flowchart illustrating a processing operation of an 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 illustrating a processing operation of an 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 illustrating a processing operation of a candidate selection unit.
FIG. 29 is a diagram showing a configuration example of an XML document editing device according to a second embodiment of the present invention.
FIG. 30 is a view showing an example of a screen display on which a user specifies an insertion position of a new display node on a display screen of a display document.
FIG. 31 is a view showing an example of a screen display for a user to specify an insertion position of a new display node on a display screen of a 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 is a diagram for explaining a positional relationship of entries Es, En, and Eb in a conversion log.
FIG. 34 is a diagram for describing a search processing operation of a new branch process of the branch search unit, and is a diagram for describing a positional relationship of entries Es, En, and Eb on a conversion log.
[Explanation of symbols]
REFERENCE SIGNS LIST 1 display unit 2 input unit 3 document storage unit 4 conversion processing unit 5 intermediate storage unit 6 context search unit 7 branch search unit 8 insertion candidate generation unit 9 candidate Selection unit, 10 data update unit, 11 insertion position conversion unit, 12 conversion rule storage unit.

Claims (7)

複数の要素を含む第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む表示文書に変換するための複数の命令文を含む第2の文書を記憶する記憶手段と、
前記第1の文書を前記第2の文書を用いて前記表示文書に変換する変換手段と、
前記表示文書を表示する第1の表示手段と、
この第1の表示手段で表示された前記表示文書中の複数の表示要素のうちの1つである第1の表示要素の子要素あるいは兄弟要素となる新たな表示要素を挿入するために、少なくとも前記第1の表示要素を指定する指定手段と、
前記第2の文書から、前記新たな表示要素を生成し得る第1の命令文を検索する検索手段と、
前記第1の命令文あるいは当該第1の命令文により発生した前記表示要素を生成するための分岐処理の対象となる前記第1の文書中の前記複数の要素のうちの1つである第1の要素の子要素あるいは兄弟要素であって、前記第1の命令文で指定される条件を満たす新たな要素を生成する生成手段と、
この生成手段で生成された新たな要素を、前記第1の文書中に挿入する挿入候補として表示する第2の表示手段と、
この第2の表示手段で表示された挿入候補のうち、選択された挿入候補を前記第1の文書に挿入する挿入手段と、
を具備したことを特徴とする文書編集装置。
A first document including a plurality of elements and a second document including 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 are stored. Storage means for performing
Conversion means for converting the first document into the display document using the second document;
First display means for displaying the display document;
In order to insert a new display element which is a child element or a sibling element of the first display element which is one of the plurality of display elements in the display document displayed by the first display means, Designating means for designating the first display element;
Search means for searching the second document for a first statement that can generate the new display element;
A first command sentence or one of the plurality of elements in the first document to be subjected to a branching process for generating the display element generated by the first command sentence; Generating means for generating a new element that is a child element or a sibling element of the element and satisfies a condition specified by the first statement;
Second display means for displaying the new element generated by the generation means as an insertion candidate to be inserted into the first document;
Insertion means for inserting the selected insertion candidate from among the insertion candidates displayed on the second display means into the first document;
A document editing device comprising:
前記変換手段で前記第1の文書を前記表示文書に変換する際には、前記第2の文書中の複数の命令文の実行順序に従って、各命令文と当該命令文の対象となった前記第1の文書中の要素との対応関係と、前記複数の命令文のうち前記分岐処理を発生する命令文により発生された当該分岐処理と当該分岐処理の対象となる前記第1の文書中の要素との対応関係と、当該分岐処理により生成される各表示要素と当該表示要素を生成した当該分岐処理中に実行される命令文との対応関係を変換ログとして記録する記録手段と、
をさらに具備し、
前記検索手段は、前記変換ログを参照して、前記第1の表示要素の子要素あるいは兄弟要素となる前記新たな表示要素を生成する、前記第2の文書中の第1の命令文を検索することを特徴とする請求項1記載の文書編集装置。
When the first document is converted into the display document by the conversion means, each command statement and the target statement of the command statement are executed in accordance with the execution order of the plurality of command statements in the second document. A corresponding relationship with an element in one document, the branch processing generated by a statement that causes the branch processing among the plurality of statements, and an element in the first document to be subjected to the branch processing. Recording means for recording, as a conversion log, a correspondence relationship between each of the display elements generated by the branch processing and a command sentence executed during the branch processing that generated the display element;
Further comprising
The search means searches for a first command sentence in the second document that generates the new display element that is a child element or a sibling element of the first display element with reference to the conversion log. 2. The document editing apparatus according to claim 1, wherein
前記新たな要素を前記第2の表示手段で挿入候補として表示するときには、前記第1の文書をコピーした仮文書中に当該新たな要素を挿入し、当該新たな要素の挿入された仮文書を前記第2の文書で変換した結果得られた表示文書をプレビューとして表示し、
当該新たな要素が前記第1の文書に挿入すべき挿入候補として選択されたときに、前記挿入手段で前記第1の文書中に挿入されることを特徴とする請求項1記載の文書編集装置。
When the new element is to be displayed as an insertion candidate on the second display means, the new element is inserted into the temporary document in which the first document is copied, and the temporary document into which the new element is inserted is displayed. Displaying a display document obtained as a result of conversion with 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 insertion unit. .
前記指定手段は、
前記新たな表示要素の挿入位置を入力する入力手段と、
前記挿入位置を基に、前記第1の表示要素と、前記新たな表示要素が当該第1の表示要素の子要素であるか兄弟要素であるかを決定する手段と、
を具備したことを特徴とする請求項1記載の文書編集装置。
The designation means includes:
Input means for inputting an insertion position of the new display element;
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 device according to claim 1, further comprising:
前記検索手段は、
前記変換ログ中の前記第1の表示要素を生成する前記第2の文書中の第2の命令文が実行されたときを基点として、前記新たな表示要素を生成する分岐処理の前記変換ログ中の挿入位置を求めるとともに、当該新たな分岐処理を発生させる前記第1の命令文を求めることを特徴とする請求項2記載の文書編集装置。
The search means,
In the conversion log of the branching process for generating the new display element, starting from when the second command sentence in the second document for generating the first display element in the conversion log is executed. 3. The document editing apparatus according to claim 2, wherein an insertion position of the first command sentence is determined, and the first command sentence causing the new branch processing is determined.
複数の要素を含む第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む表示文書に変換するための複数の命令文を含む第2の文書を記憶手段に記憶するステップと、
前記第1の文書を前記第2の文書を用いて前記表示文書に変換する変換ステップと、
前記表示文書を表示する第1の表示ステップと、
この第1の表示ステップで表示された前記表示文書中の複数の表示要素のうちの1つである第1の表示要素の子要素あるいは兄弟要素となる新たな表示要素を挿入するために、少なくとも前記第1の表示要素を指定する指定ステップと、
前記第2の文書から、前記新たな表示要素を生成し得る第1の命令文を検索する検索ステップと、
前記第1の命令文あるいは当該第1の命令文により発生した前記表示要素を生成するための分岐処理の対象となる前記第1の文書中の前記複数の要素のうちの1つである第1の要素の子要素あるいは兄弟要素であって、前記第1の命令文で指定される条件を満たす新たな要素を生成する生成ステップと、
この生成ステップで生成された新たな要素を、前記第1の文書中に挿入する挿入候補として表示する第2の表示ステップと、
この第2の表示手段で表示された挿入候補のうち、選択された挿入候補を前記第1の文書に挿入する挿入ステップと、
を有することを特徴とする文書編集方法。
A first document including a plurality of elements and a second document including 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 are stored. Storing in the means;
A conversion step of converting the first document into the display document using the second document;
A first display step of displaying the display document;
In order to insert a new display element that is a child element or a sibling element of the first display element that is one of the plurality of display elements in the display document displayed in the first display step, A designation step of designating the first display element;
A search step of searching the second document for a first statement that can generate the new display element;
A first command sentence or one of the plurality of elements in the first document to be subjected to a branching process for generating the display element generated by the first command sentence; Generating a new element that is a child element or a sibling element of the element and satisfies the condition specified by the first statement;
A second display step of displaying the new element generated in the generation step as an insertion candidate to be inserted into the first document;
Inserting an insertion candidate selected from the insertion candidates displayed on the second display means into the first document;
A document editing method comprising:
複数の要素を含む第1の文書と、当該複数の要素のいずれかに対応して生成される複数の表示要素を含む表示文書に変換するための複数の命令文を含む第2の文書を記憶手段に記憶するステップと、
前記第1の文書を前記第2の文書を用いて前記表示文書に変換する変換ステップと、
前記表示文書を表示する第1の表示ステップと、
この第1の表示ステップで表示された前記表示文書中の複数の表示要素のうちの1つである第1の表示要素の子要素あるいは兄弟要素となる新たな表示要素を挿入するために、少なくとも前記第1の表示要素を指定する指定ステップと、
前記第2の文書から、前記新たな表示要素を生成し得る第1の命令文を検索する検索ステップと、
前記第1の命令文あるいは当該第1の命令文により発生した前記表示要素を生成するための分岐処理の対象となる前記第1の文書中の前記複数の要素のうちの1つである第1の要素の子要素あるいは兄弟要素であって、前記第1の命令文で指定される条件を満たす新たな要素を生成する生成ステップと、
この生成ステップで生成された新たな要素を、前記第1の文書中に挿入する挿入候補として表示する第2の表示ステップと、
この第2の表示手段で表示された挿入候補のうち、選択された挿入候補を前記第1の文書に挿入する挿入ステップと、
をコンピュータに実行させる文書編集プログラム。
A first document including a plurality of elements and a second document including 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 are stored. Storing in the means;
A conversion step of converting the first document into the display document using the second document;
A first display step of displaying the display document;
In order to insert a new display element that is a child element or a sibling element of the first display element that is one of the plurality of display elements in the display document displayed in the first display step, A designation step of designating the first display element;
A search step of searching the second document for a first statement that can generate the new display element;
A first command sentence or one of the plurality of elements in the first document to be subjected to a branching process for generating the display element generated by the first command sentence; Generating a new element that is a child element or a sibling element of the element and satisfies the condition specified by the first statement;
A second display step of displaying the new element generated in the generation step as an insertion candidate to be inserted into the first document;
Inserting an insertion candidate selected from the insertion candidates displayed on the second display means into the first document;
A document editing program that causes a computer to execute.
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 true JP2004272684A (en) 2004-09-30
JP3828499B2 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006051954A1 (en) * 2004-11-12 2006-05-18 Justsystems Corporation Document processing device 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
JP2017538193A (en) * 2014-10-24 2017-12-21 ドロップボックス, インコーポレイテッド Fixed native document comments in preview

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006051954A1 (en) * 2004-11-12 2006-05-18 Justsystems Corporation Document processing device 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
US7961341B2 (en) 2005-12-28 2011-06-14 Star Micronics Co., Ltd. Print system, print data supplying device, and method for supplying print data to printer
JP2017538193A (en) * 2014-10-24 2017-12-21 ドロップボックス, インコーポレイテッド Fixed native document comments in preview
US10198406B2 (en) 2014-10-24 2019-02-05 Dropbox, Inc. Modifying native document comments in a preview

Also Published As

Publication number Publication date
JP3828499B2 (en) 2006-10-04

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
US20120095801A1 (en) Analogy based workflow identification
US20070204215A1 (en) Device for analyzing log files generated by process automation tools
JP3779431B2 (en) Relational database management device, intermediate link table automatic creation processing method, and program storage medium
JPWO2007020850A1 (en) Information processing method, information processing apparatus, and information processing program
JP4247135B2 (en) Structured document storage method, structured document storage device, structured document search method
JP3797821B2 (en) Ontology construction support device
CN114020246A (en) Navigation caliper H5 page layout method, device, equipment and medium
CN103514289A (en) Method and device for building interest entity base
JPWO2006051954A1 (en) Document processing apparatus and document processing method
US7496571B2 (en) Method for performing information-preserving DTD schema embeddings
JPH10105551A (en) Method for connecting 1st and 2nd clauses as one part of unification of 1st graph while using processor
CN116186125A (en) Automatic chart generation system
JPWO2006051955A1 (en) Server apparatus and namespace issuing method
CN111753042A (en) Artificial intelligence-based auxiliary writing system
JP3828499B2 (en) Document editing apparatus, document editing method, and document editing program
CN115982390B (en) Industrial chain construction and iterative expansion development method
JP4309818B2 (en) Structured document management device, search device, storage method, search method, and program
JPWO2007052680A1 (en) Document processing apparatus and document processing method
CN107491524B (en) Method and device for calculating Chinese word relevance based on Wikipedia concept vector
JPWO2006137564A1 (en) Document processing device
JPH09245052A (en) Structured document processor
JP2003248690A (en) Document processing device and method
JP4983060B2 (en) Common format creation program

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