JP4018528B2 - Document processing apparatus, document processing method, and program - Google Patents
Document processing apparatus, document processing method, and program Download PDFInfo
- Publication number
- JP4018528B2 JP4018528B2 JP2002378445A JP2002378445A JP4018528B2 JP 4018528 B2 JP4018528 B2 JP 4018528B2 JP 2002378445 A JP2002378445 A JP 2002378445A JP 2002378445 A JP2002378445 A JP 2002378445A JP 4018528 B2 JP4018528 B2 JP 4018528B2
- Authority
- JP
- Japan
- Prior art keywords
- document
- data
- display
- action
- structured document
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Digital Computer Display Output (AREA)
- Document Processing Apparatus (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、複数の構成要素からなる階層化されたデータ構造をもつ構造化文書を処理対象とする構造化文書処理方法及び装置に関する。
【0002】
【従来の技術】
近年、インターネット技術、特にWeb技術が普及し、HTML(Hyper TextMarkup Language)で記述された文書は、OSやWebブラウザの種類にかかわらずどこでも閲覧できるようになった。
【0003】
また、HTML文書中に、計算機上での処理手順が記述されたプログラムを埋め込み、対応しているWEBブラウザを用いることで、文書を閲覧するだけではなく、ユーザとの双方向なやりとりを行うアプリケーションを実現することができる。
【0004】
さらに、計算機器の多様化により、WEBブラウザが動作するプラットホームはパソコンだけでなく、PDAや携帯電話にまでひろがっており、HTMLの閲覧方法も多様になってきている。
【0005】
そして、HTML文書では、文章と、スタイル情報(フォントサイズ、フォント種類、文字の色、背景の色、テーブルの幅などの画面への表示の仕方に関係する情報)とが混在しており、また、文章中のテキストを囲うタグは画面上での構造に関する情報しかもてないため、HTML文書の内容は計算機で利用する情報としては活用しづらかった。このため、意味を持たせたタグでテキストを囲って構造化する技術である構造化文書技術の一つとして、XML(Extensible Markup Language)が標準化され、広く使われるようになった(例えば、非特許文献1参照)。
【0006】
一方、XML文書そのものは人間にとって読みづらいため、XML文書を、スタイル情報を追加するなどしたHTML文書に変換することによって、見やすい形に整形した上で、Webブラウザ上で閲覧可能にする、スタイル技術の1つとして、XSLT(XSL Transformation)が開発され、標準化された(例えば、非特許文献2参照)。
【0007】
また、変換時に整形すると同時にWEBアプリケーションとしての動作を表すプログラムを付加するXSLTを使用することで、XML文書からWEBアプリケーションを生成することも可能になる。
【0008】
XSLTは、XMLで記述されたXML文書を変換するためのプログラム言語であり、XSLTで記述されたXSLT文書を実行し、XML文書を変換するプログラムは、XSLTプロセッサと呼ばれ、そして、XSLTプロセッサを内蔵したWebブラウザが現在普及しつつある。
【0009】
WEBトップアプリケーションでは最終的には、▲1▼表示するデータ、▲2▼レイアウト/みため(デザイン)▲3▼動作(プログラム)が渾然一体となったHTMLファイルを作成する必要がある。
【0010】
これらの要素を独立して作成する方法として、先に述べたXSLTを用いる方法もある。
【0011】
しかし、依然として、▲2▼レイアウト/みためと、▲3▼動作が交じり合った変換ルールを記述する必要がある。
【0012】
上記の原因により、従来技術では次のような問題点がある。
【0013】
(1)アプリケーション作成時及び変更時に、デザイン及びプログラムに関する知識が要求される。
【0014】
通常は、WEBアプリケーションではデータ、デザイン、(動作)プログラムが、XSLT技術を使った場合でもデザインと(動作)プログラムが依存しあっているために、デザインまたはプログラム要素の作成/変更する場合に両者の知識が必要となる。また、構造的に異なる作成者がデザインとプログラムを担当することも難しい。
【0015】
従来のWEBは閲覧が中心なため、デザイナには複雑な動作記述は要求されず、XSLT技術を用いて動作プログラムを含んだデザイン部分をデザイナに任せることも可能だったが、複雑に動作するWEBトップアプリケーションを構築する際には、XSLTを記述するのに必要なプログラム面の知識が増大する。
【0016】
(2)レイアウトだけを取り替えることができない。
【0017】
さらに、同じWEBアプリケーションを表示領域の異なるデバイス(PDA、携帯電話、PC等)に表示する場合、表示レイアウトを変更する必要があるが、その際にも、レイアウトのみを変更することができない。XSLTの技術を用いて、データからレイアウトと動作を独立させた場合でも、変更後のレイアウトを記述するXSLTにも、元のXSLTファイルに含まれている動作部分を適切に含めなければいけない。
【0018】
(3)動作だけを取り替えることができない
例えば、管理権限の違いでユーザに許可したい処理がことなる場合、動作だけを入れ替えられれば、単純な動作の切り替えのみで、複数の操作権限をもつユーザに対してアプリケーションを提供できる。
【0019】
しかし、上記と同じ理由で、扱うデータ、レイアウトはそのままで、動作だけを入れ替えることができない。
【0020】
【非特許文献1】
Extensible Markup Language (XML), W3C Recommendation, [online]2000.10.6, [平成11年11月29日検索]、インターネット<URL://www.w3.org/TR/ REC-xml>
【0021】
【非特許文献2】
XSL Transformation (XSLT), W3C Recommendation, [online]1999.11.16, [平成11年11月29日検索]、インターネット<URL://www.w3.org/TR/xslt>
【0022】
【発明が解決しようとする課題】
このように、従来は、XSLT文書の記述のうち、レイアウトに関する記述部分とプログラムに関する記述部分とをそれぞれ別個に作成して(別文書として作成して)、これら2つの文書をもとに、XML文書を動作付きの表示用HTML文書に変換する事ができないという問題点があった。
【0023】
そこで、本発明は、上記問題点に鑑み、XML文書を表示用にデータ整形するための規則と、当該XML文書の構成要素にプログラムを付加するための規則とを、それぞれ別個に記述して、これら2種類の規則から、当該XML文書を表示用の動作付き構造化文書に変換することのできる構造化文書処理方法および装置を提供することを目的とする。これによって、レイアウト記述者と、動作記述者を分割でき、また、レイアウトのみを取り替えることが可能になる。結果的に作成コストが軽減される。
【0024】
【課題を解決するための手段】
本発明は、(a)データ要素を含むデータ構造化文書と、(b)前記データ構造化文書中の処理対象のデータ要素を、前記データ構造化文書を表示するための表示用文書中の表示要素として出力するための出力命令を含む第1のスタイル文書と、(c)前記データ構造化文書中の動作付加対象のデータ要素を特定するための条件と、当該動作付加対象のデータ要素に所望の動作を付加するためのプログラムとを含む動作記述文書と、
を入力し、
前記第1のスタイル文書中の各出力命令を、当該出力命令と、当該出力命令の処理対象となるデータ要素の前記データ構造化文書中における位置データを求めるための位置抽出命令とを含む出力命令要素に置き換えることにより、第2のスタイル文書を生成し、
前記第2のスタイル文書を用いて前記データ構造化文書から、前記出力命令要素の前記出力命令の処理対象のデータ要素及び当該データ要素の前記位置データを含む参照付き表示要素を有する中間表示用文書を生成し、
前記動作記述文書を用いて、前記中間表示用文書中の参照付き表示要素のうち、前記位置データにより特定されるデータ要素が、前記条件を満たす動作付加対象のデータ要素である参照付き表示要素を、当該動作付加対象のデータ要素と前記プログラムとを含む動作付き表示要素に置き換えて、動作付き表示用文書を生成することにより、XML文書などの構造化文書(例えば、データXML文書に対応する)を表示用にデータ整形するための規則(例えば、第1のXSLT文書に対応する)と、当該XML文書の構成要素にプログラムを付加するための規則(例えば、動作XML文書に対応する)とを、それぞれ別個に記述して、これら2種類の規則から、XML文書(データXML文書)を表示用の動作付き構造化文書(例えば、動作付き文書)に変換することができる。
【0026】
【発明の実施形態】
以下、本発明の実施形態について図面を参照して説明する。
【0027】
図1は、本実施形態に係る構造化文書処理システムの構成例を示す。
【0028】
図1に示すように、本システムでは、第1の計算機1と第2の計算機2がネットワーク3で接続されて構成されている。
【0029】
第1の計算機1は、Webサーバ11として機能し、第2の計算機2は、Webブラウザ21として機能するように構成されている。第1の計算機1上のWebサーバ11と第2の計算機2上のWebブラウザ21との間では、データであるデータXML文書101と、スタイルXSLT文書102、動作XML文書103とが送受信される。
【0030】
ユーザが、第2の計算機2のWebブラウザ21上で(該Webブラウザ21に搭載された)構造化文書処理装置22を操作することにより、ネットワーク3とWebサーバ11とを介して、第1の計算機1に配置されたXML文書101とXSLT文書102を閲覧し、編集できるようになっている。
【0031】
なお、ネットワーク3は、有線ネットワークであっても、無線ネットワークであっても、有線の部分と無線の部分とを含むネットワークであってもよい。また、ネットワーク3は、インターネットであってもよいし、家庭網や企業網であってもよいし、通信事業者網であってもよいし、Webサーバがインターネット上にあり、WebブラウザがLAN上にあるようなものであってもよい。
【0032】
また、図1ではWebブラウザ21を有する第2の計算機2が1台のみ示されているが、Webブラウザ21を有する第2の計算機2と同様のものが複数台、ネットワーク3に接続されていてもよい。
【0033】
また、第1の計算機1のWebサーバ11とXML文書101とXSLT文書102とを第2の計算機2に配置し、第1の計算機1とネットワーク3が省略された構成も可能である。
【0034】
また、第2の計算機2は、CPUを内蔵する携帯電話端末やネットワーク家電等であってもよい。
【0035】
なお、以下で説明する各機能や各処理は、所定のソフトウェアがコンピュータ及び周辺機器を制御することで実現されるものとして、各機能や各処理に対応する仮想的回路ブロックを想定して説明しており、各ブロックに対して、各ハードウェア要素やソフトウェア要素が必ずしも1対1に対応しなくても構わない。また、以下で説明する各機能や各処理の全部又は一部を(あるいは以下で説明する各機能や各処理を搭載したWebブラウザ自体を)半導体チップなどのハードウェアで構成することも可能である。
【0036】
さて、構造化文書編集装置22では、対象となるXML文書(データXML文書)を、所定のXSLT文書をもとに、表示用の他の構造化文書(後述する、参照付き中間文書、動作付き文書)に変換するが、変換後の構造化文書としては種々の形態が使用可能であり、例えば、XHTML(The Extensible Hyper Text Markup Language)文書、SVG(Standard Vector Graphics)文書、MathML(Mathematical Markup Language)文書、他のXML文書(例えば元のXML文書に修正が加えられたもの)などがある。変換後の構造化文書(参照付き中間文書、動作付き文書)として、どのようなものを使用するかについては、例えば、当該Webブラウザがどのような構造化文書をサポートしているかによって決定される。なお、XHTMLの規格については、例えばhttp://www.w3.org/TR/xhtml1/に、SVGの規格については、例えばhttp://www.w3.org/TR/SVG/、MathMLの規格については、例えばhttp://www.w3.org/TR/REC-MathMLにそれぞれ詳しい。
【0037】
以下では、変換後の構造化文書(参照付き中間文書、動作付き文書)として、HTML文書を用いるものとして説明する。
【0038】
以下の説明において、HTML文書やXML文書やXSLT文書等の構造化文書中の「ノード」とは、タグやテキストや属性などのことを指し、「タグ」とは例えば「<>」で囲まれた部分、すなわち、図3や後に示す図6中の<Folder>や<TABLE>などの部分を指す。ノードは構造化文書を構成する構成要素であり、1つの構成要素は、少なくとも1つの構成要素を包含することもあり、これは、包含する方の構成要素(ノード)を「親」とすると、包含される方の構成要素(ノード)は、その「子」という関係にあるともいえる。
【0039】
本実施形態では、データ(コンテンツデータ)の記述されているデータXML文書と、当該データXML文書のレイアウトのための変換規則の記述されたXSLT文書(本実施形態では、第1のスタイルXSLT文書と呼ぶ)と、当該データXML文書中の所定の構成要素に動作を付加するための変換規則の記述された動作XML文書とを処理対象として、最終的に、所定の構成要素に処理プログラム(予め用意されたアプリケーションプログラムを起動するためのプログラムであってもよいし、アプリケーションプログラムそのものであってもよい)が埋め込まれた表示用のHTML文書としての動作付きHTML文書(動作付き文書)を作成する。
【0040】
(1)従来のXSLT技術によるXML文書を表示用のHTML文書に変換する手法
ここで、本実施形態の説明を行う前に、XML文書をXSLT文書により動作付きのHTML文書に変換する手法、すなわち、Webブラウザ190上で動作する構造化文書処理装置について説明する。
【0041】
図21は、従来の構造化文書処理装置の機能ブロック図である。従来の手法では、例えば、Webサーバから提供される、データ(コンテンツ)の記述されたXML文書(以下、データXML文書文書)191は、XSLTプロセッサ193により、動作付きHTML文書194に変換され、この動作付きHTML文書194は表示部197により所定の表示装置に表示される。このとき、動作付きHTML文書194への変換方法(変換規則)は、例えばWebサーバから提供される、XSLT文書192にすべて記述されている。
【0042】
なぜならば、データXML文書へのレイアウトのための規則と、データXML文書へのプログラム埋め込みのための記述部分を分離しても、どちらかでデータXML文書を変換した時点で、さらにもう片方を用いて変換する際に必要となる、データXML文書の構造が変換され失われてしまい、変換規則が適用できない可能性があるからである。すなわち、両者の変換規則をデータXML文書にだけ依存させて記述したいが、どちらかの変換を行った時点で、データXML文書の構造が失われ、そのままではどちらの変換規則も使えなくなってしまう可能性があるのである。
【0043】
なお、XSLTプロセッサ193を、Webブラウザ190上に配置し、Webブラウザ190で動作付きHTML文書194に変換して表示する構成の他に、XSLTプロセッサ193を、Webサーバ側の計算機上に配置して、Webサーバ上で動作付きHTML文書194への変換を行い、Webブラウザ190に変換後の動作付きHTML文書194を送信する構成もある。
【0044】
いずれにしてもこれら従来は、データXML文書から動作付きのHTML文書194を得るためには、データXML文書の所定の構成要素にアプリケーションプログラムあるいはアプリケーションプログラムを起動するためのプログラムを埋め込むための記述と、データを整形するレイアウトのための規則を記述とを融合した、1つのXSLT文書192を用いていた。そして、XSLTプロセッサ190で一括してプログラムの埋め込みとレイアウトのためのデータ整形を行っていた。
【0045】
すなわち、XSLT文書192を作成するためには、レイアウトのデザインをするための知識とプログラムを作成、変更等するための知識を兼ね備えたユーザのみにできる高度な技術を要していた。
【0046】
従来の手法では、データXML文書へのプログラムの埋め込みのための記述部分とレイアウトのための規則を記述した部分とをそれぞれ別個に作成しても、動作付きのHTML文書194を作成することはできない。
【0047】
また、レイアウト部分のみ、あるいは、動作部分のみを変更することができない。これは、データ(コンテンツ)と動作は同じだが、異なるレイアウトをとりたい場合、例えば、デスクトップパソコンや携帯電話やPDAなど性能や機能などの種別の異な計算機それぞれに適したレイアウトを選択したい場合等に、わざわざ種別の異なる各計算機毎に、レイアウトだけでなく、動作の部分も含んだものを作成しなければならなかった。
【0048】
しかし、XSLT文書の記述のうち、レイアウトに関する記述部分とプログラムに関する記述部分とをそれぞれ別個に作成して、データXML文書を動作付き文書に変換する事ができるようになれば、作業分担が行える上、レイアウトだけの変更や、プログラムやプログラムを埋め込む箇所などの構成要素の動作だけの変更などが容易に行える。
【0049】
(2)構造化文書処理装置の構成について
本実施形態の説明に戻り、本実施形態に係る構造化文書処理装置について説明する。
【0050】
図2は、本実施形態に係る構造化文書処理装置22の構成例を示したもので、XSLTプロセッサ124と、XSLT変換部122と、動作付加変換部126と、表示部127と操作入力部131と処理関数保持部132とから構成されている。
【0051】
図21に示した従来システムでは、データ(コンテンツ)の記述されたXML文書を、当該XML文書中の特定の構成要素に動作を付加するための変換規則と、当該XML文書のレイアウトのための変換規則の記述とが含まれているXSLT文書を基に、動作付きのHTML文書を変換するようになっていたが、図2に示すように、構造化文書処理装置22では、データ(コンテンツ)の記述されたXML文書125(以下、データXML文書125)を、当該データXML文書125の構成要素に動作を付加する(埋め込む)ためのXML文書128(以下、動作XML文書128)と、当該データXML文書125のレイアウトのための変換規則を記述したXSLT文書121(以下、第1のXSLT文書121)とを基に動作付きHTML文書130に変換するようになっている。
【0052】
そのために、図2に示す構造化文書処理装置22では、第1のXSLT文書121を第2のXSLT文書(後述)123に変換するためのXSLT変換部122と、第2のXSLT文書を用いて、レイアウトのためにデータ整形のされたデータXML文書、すなわち、参照付き中間文書129に対し、動作XML文書128を用いてプログラムを付加する(埋め込む)ための動作付加変換部126を有している。
【0053】
第1のXSLT文書121には、データXML文書中の所定の構成要素に含まれるデータ(例えば、タグ名や属性値や、構成要素の値などで、ここでは、これらをノード値と呼ぶ)を表示要素(画面構成要素)として表示するためのHTML文書中の構成要素に変換する命令(例えば、ここでは、ノード値出力命令と呼ぶ)に対応する構成要素が含まれている。
【0054】
XSLT変換部122では、第1のXSLT文書121中の、このノード値出力命令に、当該ノード抽出命令で処理対象となるデータXML文書125中の構成要素(ノード)の位置(処理対象となるデータのデータXML文書125中の位置)を抽出するための命令を付加する(埋め込む)ことにより、第2のXSLT文書123を生成する。
【0055】
参照付き中間文書129には、上記第1のXSLT文書(第2のXSLT文書)中のノード値出力命令で生成されたノードに、当該ノード値出力命令で処理対象となったデータXML文書125中のノード(データ)の位置を表した参照データ(位置データ)を付加した(埋め込んだ)、参照付きノードが含まれている。
【0056】
データXML文書125は、コンテンツデータの記述されたXML文書であり、例えば、図1の第2の計算機2のブラウザ21のプログラムが生成したものや、図1のWebサーバ11から取得したものである。データXML文書125の一例を図3に示す。ただし、データXML文書125の内容は、ユーザの操作により変化する場合もある。
【0057】
第1のXSLT文書121は、データXML文書125あるいは、これ以外のXML文書のレイアウトを定義するもので、例えば図1のWebサーバ11から取得される。第1のXSLT文書121の一例を図5に示す。
【0058】
XSLT変換部122は、第1のXSLT文書121を入力として、当該第1のXSLT文書121を第2のXSLT文書123へ変換する。この第2のXSLT文書123はXSLTプロセッサ124に渡される。
【0059】
なお、図2では、XSLT変換部122をXSLTプロセッサ124と同じ第2の計算機2に設けた場合を示しているが、XSLT変換部122は、Webサーバ11として機能する第1の計算機1に設けてもよい。また、Webブラウザ21上のスクリプトなどで実現してもよい。
【0060】
XSLTプロセッサ124は、データXML文書125を、第2のXSLT文書123に記載されている命令にしたがって変換し、参照付き中間文書129を生成する。参照付き中間文書129は、動作付加変換部126に渡される。
【0061】
XSLTプロセッサ124の仕様は、例えば、標準化団体であるW3Cで規格化されたものに従って構わない(具体的には、例えば、Webブラウザ21に付属する機能などで実現される)。
【0062】
動作XML文書128は、データXML文書125中の動作を付加するデータを指定するための(検索するための)条件を記述した部分と、当該データに対して付加する動作(プログラム)を記述した構造化文書である。
【0063】
動作付加変換部126は、参照付き中間文書129を、動作XML文書128に記述されている規則(命令文として表されている)にしたがって、動作付き文書130に変換するものである。
【0064】
表示部127は、Webブラウザ21にもともと備わる機能により実現されるもので、ディスプレイなどに上記動作付き文書130を表示する表示画面を生成するものである。
【0065】
操作入力部131は、マウス、キーボードなどの各入力装置を介してユーザからの入力を受け付けるところである。例えば、ディスプレイに表示された動作付き文書130の動作の付加されている箇所を当該操作入力部131にて指示されると、当該動作付き文書130内の当該プログラムを起動させる。これは、例えば、Webブラウザ21に組み込みのイベント機構で実現することができる。
【0066】
処理関数保持部132は、動作付き文書130中の所定の構成要素に付加されている動作記述(プログラム)により起動されるプログラムを保持する。例えば、ブラウザ21内に読み込まれたプログラム群で実現される。
【0067】
なお、ブラウザ21内からプログラムを呼び出せるならば、処理関数保持部132は、ブラウザ21の外におかれていてもよい。
【0068】
(3a)第2のXSLT文書と、XSLTプロセッサについて
第2のXSLT文書123は、それ自体、XSLTの規格に従うもので、XSLT変換部122で第1のXSLT文書121の一部を別の命令に置き換えたものである。
【0069】
ここで、XSLT文書のデータ構造と、XSLTプロセッサ124の動作について説明する(これらは、基本的には、W3Cで定められた規格に従うものである)。
【0070】
図4は、XSLT文書のデータ構造を示したものである。
【0071】
XSLT文書301は、少なくとも1つのXSLTテンプレート302で構成され、各XSLTテンプレート302は、条件部303と出力部304で構成されている。出力部304は、少なくとも1つの出力命令305から構成されている場合と、出力命令305が存在しない場合とがある。
【0072】
XSLTプロセッサ124は、入力されたデータXML文書125中のノードを順に調べ、各ノードがXSLTテンプレート302の条件部303に記述された条件に適合するかどうかを調べる。条件に適合した場合、出力部304の出力命令にしたがって、当該ノードをXML文書やHTML文書等の所定の構造化文書(本例では、HTML文書)のノードに変換して、出力に追加していく。データXML文書125中の全てのノードを調べ終るまで上記の手順を繰り返す。
【0073】
XSLTの出力命令には、入力されたXML文書125中のノードに含まれるデータ(例えば、テキスト値)を出力する命令がある。以下、この命令を「ノード値出力命令」と呼ぶ。具体的には、XSLTの命令の図5に示すような、「xsl:value−of」という命令401〜403などがある。もちろん、ノード値出力命令には、「xsl:value−of」以外にも存在するが、ここでは、一例として、このノード値出力命令を用いる。
【0074】
図5は、図2に示したXML文書に適用する、第1のXSLT文書121の具体例を示したものである。
【0075】
図5に示した第1のXSLT文書121を、そのまま(第2のXSLT文書123に変換することなく)、図2に示したデータXML文書に適用すると(XSLTプロセッサ124の処理により)、図6に示したような、図2に示したデータXML文書中の所定の構成要素に含まれるデータを表示するための(レイアウトのための整形のなされた)HTML文書が得られる。図6に示したHTML文書の画面表示例を図10に示す。
【0076】
XSLT変換部122は、第1のXSLT文書をXSLTプロセッサ124に入力する前に、その前処理として、主に、入力された第1のXSLT文書121の出力命令のうち、上記ノード値出力命令を一連の命令に置き換えるための処理を行う。
【0077】
図5の各ノード値出力命令401〜403に対応する構成要素(ノード)は、それぞれ、図7(a)〜(c)に示す命令群411〜413に置き換えられて、第2のXSLT文書12が得られる。
【0078】
第2のXSLT文書123とは、具体的には、図5に示した第1のXSLT文書中の各ノード値出力命令401〜403を、それぞれ、図7(a)〜(c)に示す命令群411〜413に置き換えたものである。
【0079】
XSLT変換部122において、図5に示した第1のXSLT文書の各ノード値出力命令401〜403を、それぞれ、図7(a)〜(c)に示す命令群411〜413で置き換えられることにより生成された、第2のXSLT文書123を用いると、XSLTプロセッサ124では、データXML文書125を図9に示すような、HTML文書としての参照付き中間文書129(以下、簡単に中間文書と呼ぶこともある)に変換する。
【0080】
ここで、第2のXSLT文書中の上記3つの命令群411〜413のうちの命令群411を例にとり、図8を参照して上記命令群について説明する。命令群411は、4つの命令421〜424から構成されている。
【0081】
図8の命令421は、ノード値出力命令により生成されるノードであることを参照付き中間文書129上で特定するための特定のタグ<SPAN>を生成するための命令であり、この命令により、参照付き中間文書129中では、ノード値出力命令で生成されたノードが特定のタグ「<SPAN></SPAN>」で囲まれる。
【0082】
図8の命令422は、当該ノード値出力命令により、処理対象とされる、データXML文書125中のノードの位置を求めるための命令である。具体的には、当該命令は、処理対象のデータXML文書125中のノードの位置を当該データXML文書125の先頭から数える命令である「xsl:number」と、その値を変数(“xpath”)に代入して次の命令(ここでは、命令423)で参照できるようにする「xsl:variable」命令からなる。
【0083】
図8の命令423は、命令421で生成される<SPAN>タグに、命令422で求めた値(変数(“xpath”)に代入されている値)を、属性値として追加する「xsl:attribute」命令である。この変数“xpath”の値が後述する参照データ(位置データ)である。
【0084】
図8の命令424は、第1のXSLT文書121中の当該ノード値出力命令そのものである。すなわち、図5のノード値出力命令401に対応する。
【0085】
なお、第2のXSLT文書123の記述方法は、上記の他にも種々のものが可能である。
【0086】
(3b)XSLT変換部の処理動作
図2のXSLT変換部122の処理動作について、図17に示すフローチャートを参照して説明する。
【0087】
XSLT変換部122は、第1のXSLT文書121を受け取ると、図17に示す手順を実行し、第2のXSLT文書123を出力し、XSLTプロセッサ124へ、当該第2のXSLT文書123を渡す。
【0088】
この手順では、まず、XSLT変換部122は、入力された第1のXSLT文書121中のノードを1つ読み込む(ステップS1)。
【0089】
続いて、読み込んだノードの種類によって処理を分岐させる(ステップS2)。この結果、第1のXSLT文書121にそれ以上読み込むノードがなければ処理を終了する(ステップS3)。
【0090】
また、ステップS2の判定において、当該ノードの種類がノード値出力命令でない場合には、当該ノードをそのまま出力に追加する(ステップS4)。そして、ステップS1に戻り、第1のXSLT文書121中の次のノードを読み込む処理に戻る。
【0091】
一方、ステップS2の判定において、ノードの種類が、図5に示すノード値出力命令401〜403のようなノード値出力命令である場合には、当該ノード値出力命令に代えて、それぞれ、図7(a)〜(c)に示す命令群411〜413を出力に追加する(ステップS5〜ステップS9)。
【0092】
このステップS5〜ステップS9の処理動作について、図8に示す命令群411(図7(a))を出力する場合を例にとり説明する。
【0093】
すなわち、ノードの種類がノード値出力命令401である場合には、まず、第1の命令421としての開始タグ(<SPAN>)を出力に追加し(ステップS5)、第2の命令422を出力に追加し(ステップS6)、第3の命令423を出力に追加し(ステップS7)、当該ノード値出力命令(第4の命令424)をそのまま出力に追加する(ステップS8)。最後に、第1の命令421としての終了タグ(</SPAN>)を出力に追加する(ステップS9)。
【0094】
ステップS5〜ステップS9にて、ノード値出力命令401に代わり、図8に示す命令群411(図7(a))が出力に追加されると、再びステップS1に戻り、スタイルXSLT文書121中の次のノードを上記同様にして処理する。
【0095】
このようにして、図5に示したような第1のXSLT文書の全てのノードに対し、上記ステップS2〜ステップS9の処理が終了すると、図5に示した第1のXSLT文書中の各ノード値出力命令401〜403を、それぞれ、図7(a)〜(c)に示す命令群411〜413に置き換えられた第2のXSLT文書123が生成される。
【0096】
(4)参照付き中間文書について
参照付き中間文書129には、第2のXSLT文書中のノード値出力命令で生成されたノードに、当該ノード値出力命令で処理対象となったデータXML文書125中のノードの位置を表した参照データを付加した(埋め込んだ)、参照付きノードが含まれている。すなわち、表示部127上で表示画面を構成する画面構成要素と、当該画面構成要素に対応する元のデータXML文書125中のノードとを対応付けるための参照データ(当該画面構成要素に対応するデータXML文書125中のノードへの参照データ)が含まれている。
【0097】
参照データとは、スタイルXSLT文書121中のノード値出力命令の処理対象となるデータXML文書125のノードの位置を表しているデータで、前述の変数“xpath”の値に対応する。
【0098】
例えば、図5に示した第1のXSLT文書から生成された、第2のXSLT文書123を用いると、XSLTプロセッサ124では、データXML文書125を、図9に示すような参照付き中間文書129(以下、中間文書と呼ぶ)に変換する。
【0099】
図9に示すように、中間文書129には、第1のXSLT文書121中のノード値出力命令により生成された、<SPAN>タグで囲まれたノード431〜434が存在している。このノード431〜434をそれぞれ、ここでは参照付きノード431〜434と呼ぶ。
【0100】
各参照付きノード431〜434に含まれるテキスト値(例えば、参照付きノード432の場合、<SPAN>タグで囲まれている「document.txt」)は、画面上に実際に表示されるデータであるが、<SPAN>タグの属性を表している部分は、表示部127が解釈するだけで、実際には表示されない。
【0101】
各参照付きノード431〜434の参照データは、「xpath=」で表されているもので、参照付きノード431の参照データは、「1.@href」であり、参照付きノード432の参照データは、「1.1@name」であり、参照付きノード433の参照データは、「1.12@name」であり、参照付きノード434の参照データは、「1.3@name」である。
【0102】
図10は、図9に示した中間文書129の画面表示例を示しており、表示部127で、図9に示した中間文書129を表示した場合を示している。
【0103】
図10に示す中間文書129は、動作が付加されていない点を除けば、動作付き文書130と同様であり、また、図6に示したHTML文書の表示例と同様である。
【0104】
各参照付きノード431〜434には、前述したように、第1のXSLT文書121中のノード値出力命令の処理対象となったデータXML文書125のノードの位置を表した参照データ(当該データXML文書125の先頭のノードから数えて何番目にあるかを表しているデータで、前述の変数“xpath”の値に対応する)を含む。
【0105】
この参照データは、データXML文書125中のノードの個数を数えたものを符号化したものであってもよいし、XPathを用いて参照データを表してもよい。図9中ので「“1.@href”」が前者の例であり、データXML文書125中のノードを各階層ごとにかぞえたもの又は属性名を表すアットマーク「@」を、ピリオド「.」で連結した文字列としたものである。例えば、「1.2.@href」は、データXML文書中の第1階層の1番目のノード(<Folder>)の、2番目の子どものノード(2番目の<File>)の、属性hrefを指し示すことを意味する。
【0106】
なお、中間文書129中で、参照データを保持する方法としては、上記のようなタグや属性値を用いる方法の他に、HTMLのコメントとして追加する方法もある。
【0107】
(5a)動作付き文書について
次に、動作付き文書130について説明する。
【0108】
動作付き文書130は、表示部127上で表示画面を生成するためのデータと、表示されるデータ(表示要素)に対応付けられた(プログラム)が含まれている。図13に、この動作付き文書の一例を示す。
【0109】
図13は、図3のデータXML文書125と図5のスタイルXSLT文書121と、図12の動作XML文書128とから生成される、動作付きの(プログラムを含む)HTML文書である。
【0110】
図14は、図13に示した動作付き文書130の画面表示例であり、表示部127で図13に示した動作付き文書130を基に、表示画面を生成して、ディスプレイに表示した例を示している。
【0111】
図13の点線で囲まれたノード701〜704は、図9に示した参照付き中間文書中の参照付きノードを、図12に示した動作XML文書128の記述に従って、動作の付加されたノード、すなわち、動作付きノードである。
【0112】
ノード701〜704のそれぞれは、動作XML文書128の動作テンプレート中の出力部の記述に従って、参照付き中間文書129(あるいは、参照付き中間文書129とデータXML文書125)とから生成されたものである。
【0113】
図13のノード702の実線で囲まれた部分710は、操作入力部131からのユーザによる操作(例えば、マウスによるクリック操作)により、処理関数保持部132に保持されている処理プログラム(FileOpen)を呼び出して起動させるためのプログラムである。この呼び出しは、例えば、ブラウザ組み込みの機能で実現される。
【0114】
ここで呼び出す「FileOpen」というプログラムは処理関数保持部132に格納されている。
【0115】
(5b)動作XML文書と、動作付加変換部について
まず、動作XML文書128について説明する。
【0116】
図11は、動作XML文書128のデータ構造を示したものである。
【0117】
図11において、動作XML文書501は、少なくとも1つの動作テンプレート502で構成され、各動作テンプレート502は、条件部503と出力部504で構成されている。出力部504は、少なくとも1つの出力命令505から構成されている場合と、出力命令505が存在しない場合とがある。
【0118】
図12は、動作XML文書128の一具体例を示したものである。
【0119】
条件部503には、データXML文書125中の動作を付加するノード(ノードに含まれるデータ)に対する条件が記述され、動作付加変換部126での処理時に、この条件部503に記述された条件と、参照付き中間文書129中の参照付きノードの参照データにより特定されるデータXML文書125中のノードとが比較される。そして、データXML文書125中の当該ノードが条件部503に記述された条件に合うときには、当該動作テンプレート中の出力部504に記述されている動作を、当該参照付き中間文書129中の参照付きノードに付加する。例えば、出力部504の記述に従って、データXML文書125中のノードを基に動作付きノードを生成し、これで当該参照付きノードを書き換える。
【0120】
動作テンプレート502の出力部504に含まれる出力命令505は、XSLT文書中のノード値出力命令と同様な命令であり、動作付加変換部126における処理中に、データXML文書125から値を取得し、出力する。
【0121】
なお、動作テンプレート502を、図9に示すようなXML文書として保持する代わりに、条件部503とデータXML文書125から値を出力するテンプレートの組を表として保持していてもよい。
【0122】
次に、動作付加変換部126の処理動作について、図18に示すフローチャートを参照して説明する。
【0123】
動作付加変換部126は、データXML文書125と参照付き中間文書129と、動作XML文書128を受け取り、図18に示す手順を実行して、動作付き文書130を出力する。この動作付き文書130は、表示部127に渡される。
【0124】
まず、動作付加変換部126は、入力された参照付き中間文書1201からノードを1つ読み込む(ステップS21)。
【0125】
続いて、当該読み込んだノードの種類によって処理を分岐させる(ステップS22)。この結果、参照付き中間文書129に、これ以上読み込むノードがなければ処理を終了する(ステップS23)。
【0126】
ステップS22の判定において、当該読み込んだノードが、参照付きノードでない場合には、入力されたノードをそのまま出力に追加する(ステップS30)。そして、ステップS21に戻り、参照付き中間文書129中の次のノードを読み込む処理に戻る。
【0127】
一方、ステップS22の判定において、当該読み込んだノードが、参照付きノードである場合には、その中の参照データにより特定されるデータXML文書125中のノードを取り出す(ステップS25)。続いて、動作XML文書125から動作テンプレートを1つ取り出し(ステップS26)、当該取り出した動作テンプレート中の条件部503に記述された条件に、ステップS25で取り出されたノードが一致するか否かを調べる(ステップS28)。条件に合う場合には、当該動作テンプレート中の出力部504に記述されているプログラムに対応する記述を、当該参照付き中間文書129中の参照付きノードに付加すべく、出力部504の記述に従って、データXML文書125中のノードを基に動作付きノードを生成し、これで当該参照付きノードを書き換える。すなわち、当該参照付きノードに代えて動作付きノードを出力に追加する(ステップS29)。そして、ステップS1に戻り、参照付き中間文書129中の次のノードを読み込む。
【0128】
ステップS28において、条件に合わない場合には、再びステップS26へ戻り、動作XML文書125から次の動作テンプレートを1つ取り出す。このとき、取り出す動作テンプレートがなければ(ステップS27)、当該ノードがそのまま出力される(ステップS30)。そして、ステップS1に戻り、参照付き中間文書129中の次のノードを読み込む。
【0129】
なお、動作テンプレート502の出力部504の命令に、データXML文書125だけでなく、参照付き中間文書129に対する命令を加え、ステップS29において、動作付きノードを生成する際には、データXML文書125中のノードだけではなく、参照付き中間文書129から読み込まれたノードも用いるように変更し、動作XML文書128とデータXML文書125から生成されるノードだけではなく、参照付き中間文書129内のノードも利用して出力ノードを生成してもよい。あるいは、動作付きノードを生成する際には、データXML文書125中のノードに代えて、参照付き中間文書129から読み込まれたノードを用いるように変更し、動作XML文書128と参照付き中間文書129内のノードを利用して出力ノードを生成してもよい。
【0130】
また、参照付き中間文書129を生成する際に、参照付きノードに、データXML文書125のノードへの参照データだけでなく、どのようなXSLT命令で変換されたかの情報を当該参照データとともに保持させるようにし、動作テンプレート502の条件部503に、データXML文書125中の動作を付加するノードに対する条件だけでなく、どのようなXSLT命令で変換されたのかを表した情報も条件として記述し、ステップS28においてそれらを判定材料にしてもよい。
【0131】
(6)動作付き文書の動きについて
図13に示した動作付き文書130の動作付きノードには、参照付き中間文書129にはなかったアプリケーションとしての働きが付加されている。
【0132】
動作付加変換部130で生成された図13に示した動作付き文書130は、表示部127によりディスプレイに表示される。ユーザは、操作入力部131からマウス等を用いて当該表示画面上の動きの付加されている画面構成要素を操作(例えば、マウスクリック)する。
【0133】
図10は、図9に示した参照付き中間文書129のブラウザ上での表示例であり、図14は、図13に示した動作付き文書130のブラウザ上での表示例である。
【0134】
図14において、表示画面上の領域751は、図13の動作付きノード701に対応する画面構成要素であって、HTMLタグの<INPUT>で表現されるテキストボックスが挿入されている。表示画面上の領域752は、図13の動作付きノード702に対応する画面構成要素であって、所定のユーザ操作(ここでは、ワンクリック操作)をきっかけにして処理を実行するプログラムが埋め込まれている。表示画面上の領域753は、図13の動作付きノード703に対応する画面構成要素であって、所定のユーザ操作(ここでは、ワンクリック操作)をきっかけにして処理を実行するプログラムが埋め込まれている。表示画面上の領域754は、図13の動作付きノード704に対応する画面構成要素であって、所定のユーザ操作(ここでは、ワンクリック操作)をきっかけにして処理を実行するプログラムが埋め込まれている。
【0135】
例えば、ユーザがマウスで上記領域のいずれかをクリックすると、操作入力部131は、動作付き文書130上の当該領域に対応する動作付きノードに通知を行い、これにより当該ノードに埋め込まれたプログラムが呼び出される。すなわち、図14の表示画面上の領域752〜753のいずれかがクリックされると、当該領域に対応する動作付きノードに埋め込まれているFileOpen関数が駆動される。また、図14の表示画面上の領域754がクリックされると、当該領域に対応する動作付きノードに埋め込まれているDirMove関数が駆動される。また、図14の表示画面上の領域751のテキストボックス中の文字は編集することができ、ユーザが当該テキストボックス中でキーを押し下げた場合にはeditDirectory関数が呼び出される。
【0136】
以上の、FileOpen、DirMove,EditDirecotyのような関数は、処理関数保持部132に保持されており、それぞれ、例えば、ファイルを読み込む、ディレクトリを変更してデータXML文書を更新する、といった機能を有する。
【0137】
また、動作付き文書130に付加される(埋め込まれる)プログラムとしては、上記のように、処理関数保持部132に保持されている任意のプログラムを呼び出すプログラムであってもよい。
【0138】
処理関数保持部132には、例えば、データXML文書125、第1のXSLT文書121、動作XML文書128を更新する機能を含んでもよく、また、任意の処理を行う関数を保持することができる。
【0139】
なお、付加されたプログラムは、必ずしも、処理関数保持部132に保存されている関数などのアプリケーションプログラムを呼び出すプログラムである必要はなく、動作付き文書130に付加されたプログラム自体がアプリケーションプログラムであってもよい。
【0140】
(7)参照データの他の記憶例
第1のXSLT文書121中の各ノード値出力命令で処理対象となるデータXML文書125中のノードの位置と、当該ノード値出力命令で出力された中間文書129中のノードの位置とを対応付けるためには、必ずしも、上記のような参照データを参照付き中間文書129の中に埋め込む必要はない。
【0141】
第1のXSLT文書121中の各ノード値出力命令で処理対象となるデータXML文書125中のノード(の位置)と、当該ノード値出力命令で出力された中間文書129中のノード(の位置)との対応関係は、参照付き中間文書129とは別個記憶するようにしてもよい。
【0142】
この場合、当該対応関係は、図15に示すようなテーブルで保持してもよい。中間文書129中、データXML文書125中のノード位置を表すために、XPathを用いてもよいし、単に文書の先頭から何番目のノードであるかを表したものでもよい。また、文書の階層構造に従って、各階層毎に、その階層の先頭からノードを数えて、それを適当な区切り文字(例えば「.」)で区切ることにより表してもよい。例えば、あるノードが第1階層の第1番目のノードの下位階層の2番目のノードである場合は、「1.2」と表す。
【0143】
図16は、図15に示したようなテーブルで、上記対応関係を記憶する場合の構造化文書処理装置の構成例を示したものである。
【0144】
なお、図16において、図2と同一部分には同一符号を付し、異なる部分についてのみ説明する。
【0145】
すなわち、図16では、2つのXSLTプロセッサ124a、124bを有し、一方のXSLTプロセッサ124aでは、データXML文書125を整形したHTML文書141(参照データを含まない中間文書129に対応する)を生成し、他方のXSLTプロセッサ124bでは、上記対応関係を表したデータ(ここでは、テーブル140)を生成する。
【0146】
図16では、XSLTプロセッサを2個用意するものとしたが、1個のみ用意しこれを2つのデータ生成に兼用してもよい(すなわち、実際にプログラム上XSLTプロセッサが2個必要なわけではなく、2組のXML文書とXSLT文書から、表示部127に渡すHTML文書141のノードとデータXML文書125のノードとの対応関係を表したデータの2個のデータが得られればよい)。
【0147】
(8)動作付加変換部の他の処理動作
動作付加変換部126は、実際に動作付き文書130を作成する前に、あらかじめ、参照付きノードに含まれる参照データにより特定される、データXML文書中のノード位置(具体的には、さらに、当該ノードに含まれるプログラムを付加する対象としてのデータ位置)と、当動作XML文書128とから生成される動作付きノードの対応関係を表したテーブル(動作対応テーブル)を作成してもよい。
【0148】
動作対応テーブルの一例を図19に示す。動作対応テーブルとは、参照付き中間文書129中の参照付きノードに含まれている、データXML文書125上のノード位置(と、当該ノードに含まれるプログラムを付加する対象としてのデータ位置)を表した参照データと、当該参照付き中間文書129中の参照付きノードを置き換えるための動作付きノードとを対応させ、テーブルにしたものである。
【0149】
図19のテーブルは、参照付き中間文書129の参照付きノードに含まれる参照データを用いることなく、例えば、図3のデータXML文書125と、図12の動作XML文書128とから生成することもできる。
【0150】
参照データとしては、動作XML文書128の条件部503にあてはまるデータXML文書125中のノード位置(と、当該ノードに含まれるプログラムを付加する対象としてのデータ位置)を記録する。
【0151】
各参照データに対応する動作付きノードは、動作XML文書128の中で、当該参照データに対応するデータXML文書125中のノードが当てはまる条件を記述した条件部503を持つ動作テンプレート502の出力部504に記述されている命令にしたがって、当該参照データにより特定されるデータXML文書125中のノードから生成されるものである。
【0152】
なお、この例では、出力部504に記載されている命令は、XSLT命令に準じてデータXML文書125のノードから、動作付きノードを生成する。これは、図18中のステップS29の動作と同様である。
【0153】
例えば、図3のデータXML文書中の破線で囲まれた部分201は、図12の動作XML文書の2番目の動作テンプレート502にある条件部503に記述されている条件、すなわち、実線で囲まれた部分511で示された条件にあてはまる。図3のデータXML文書中の当該部分201に対応する位置は、ノード「<Directory name=“doc” …>」に含まれ、しかも、「name」という属性にある。従って、この位置は、第1階層の1番目のノードの下位階層(第2階層)の3番目の「@name」に対応するので、参照データとしては、「1.3.@name」となる。従って、図19中の破線で囲まれた部分181で示すように、動作対応テーブルの参照データの欄に「1.3.@name」を記録する。これに対応する、動作付きノードは、図12の実線で囲まれた出力部に記述された命令512に従って、図3のデータXML文書中の破線で囲まれた部分201を含むノードを基に生成される。
【0154】
次に、図19に示した動作対応テーブルを用いた動作付加変換部126の処理動作について、図20に示すフローチャートを参照して説明する。なお、図20において、図18と同一部分には同一符号を付し、異なる部分についてのみ説明する。すなわち、図20では、図18のステップS25〜29が、ステップS45〜ステップS46に置き換わっている。
【0155】
図20では、ステップS21が開始する前に、まず、図19に示すような動作対応テーブルが作成される。
【0156】
動作付加変換部126は、入力された参照付き中間文書1201からノードを1つ読み込み(ステップS21)、当該読み込んだノードの種類が、参照付きノードである場合には、当該参照付きデータに含まれる参照データに対応する(一致する)参照データを動作対応テーブルから検索する(ステップS45)。参照データが動作対応テーブル中にないときは、読み込んだノードをそのまま出力する(ステップS30)。
【0157】
一方、当該参照付きデータに含まれる参照データに対応する(一致する)参照データが動作対応テーブルに存在するときは、当該テーブルの中から当該参照データに対応する動作付加ノードを出力する(ステップS46)。
【0158】
動作付加ノードが出力された場合には、図18と同様にステップS21に戻る。
【0159】
以上説明したように、上記実施形態によれば、構造化文書としての第1の文書(データXML文書)の複数の構成要素のうちの1つである第1の構成要素に含まれる第1のデータを表示するための第2の構成要素を生成するための命令である第1の命令(例えば、第1のXSLT文書に含まれるノード値出力命令に対応する)に、当該第1の命令で処理対象となる第1の文書中の第1のデータの位置を抽出するための第2の命令を付加し、(b)第1の命令を基に、第1の文書の第1の構成要素から第2の構成要素を生成するとともに、第2の命令を基に、第1の文書から第1のデータの位置を参照データとして抽出して、(c)参照データと第2の構成要素とを対応付け(例えば、参照付きノードに対応する)、(d)第1のデータに付加するプログラムを、当該第1のデータの位置を表す参照データに対応付けられた第2の構成要素に付加することにより(例えば、動作付きノードを生成することに対応する)、XML文書などの構造化文書(例えば、データXML文書に対応する)を表示用にデータに整形するための規則(例えば、第1のXSLT文書に対応する)と、当該XML文書の構成要素にプログラムを付加するための規則(例えば、動作XML文書に対応する)とを、それぞれ別個に記述して、これら2種類の規則から、XML文書(データXML文書)を表示用の動作付き構造化文書(例えば、動作付き文書)に変換することができる。
【0160】
また、上記実施形態によれば、WEBトップアプリケーションでの3要素である、データXML文書に対応する「表示するデータ」、第1のXSLT文書に対応する「レイアウト/みため」、動作XML文書に対応する「動作」を独立した文書に定義できる。そのため、動作XML文書を作成するのは、必要なプログラミングの技術を持ったプログラマが、第1のXSLT文書を作成するのはデザイナが、というように、開発者を分けられる。
【0161】
第1のXSLT文書を変更することにより、「レイアウト/みため」だけを変更することができる。動作、表示するデータ(動作XML文書、データXML文書)はそのままで、レイアウトのみを変更できる。
【0162】
動作XML文書を変更することにより、「動作」だけを変更することができる。表示するデータ、レイアウト(データXML文書、第1のXSLT文書)はそのままで、動作だけを変更することができる。
【0163】
本発明の実施の形態に記載した本発明の手法は、コンピュータに実行させることのできるプログラムとして、磁気ディスク(フロッピーディスク、ハードディスクなど)、光ディスク(CD−ROM、DVDなど)、半導体メモリなどの記録媒体に格納して頒布することもできる。
【0164】
なお、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。さらに、上記実施形態には種々の段階の発明は含まれており、開示される複数の構成要件における適宜な組み合わせにより、種々の発明が抽出され得る。例えば、実施形態に示される全構成要件から幾つかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題(の少なくとも1つ)が解決でき、発明の効果の欄で述べられている効果(のなくとも1つ)が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。
【0165】
【発明の効果】
以上説明したように、本発明によれば、構造化文書としての例えばXML文書を表示用にデータ整形するための規則と、当該構造化文書の構成要素にプログラムを付加するための規則とを、それぞれ別個に記述して、これら2種類の規則から、当該構造化文書を表示用の動作付き構造化文書に変換することができる。
【図面の簡単な説明】
【図1】本発明の実施形態に係る構造化文書処理システムの構成例を示す図。
【図2】構造化文書処理装置の構成例を示す図。
【図3】データXML文書の具体例を示す図。
【図4】XSLT文書のデータ構造を示した図。
【図5】第1のXSLT文書の具体例を示す図。
【図6】図3のデータXML文書を図5に示した第1のXSLT文書で変換した結果得られたHTML文書を示した図。
【図7】XSLT変換部で、第1のXSLT文書中のノード値出力命令を置き換える命令群(構成要素)の例を示した図。
【図8】図7(a)に示した命令群を説明するための図。
【図9】参照付き中間文書の具体例を示した図。
【図10】参照付き中間文書の表示例を示した図。
【図11】動作XML文書のデータ構造を説明するための図。
【図12】動作XML文書の具体例を示した図。
【図13】動作付き文書の具体例を示した図。
【図14】動作付き文書の表示例を示した図。
【図15】第1のXSLT文書中の各ノード値出力命令で処理対象となるデータXML文書中のノードの位置と、当該ノード値出力命令で出力された中間文書129中のノードの位置との対応関係の記憶例を示した図。
【図16】構造化文書処理装置の他の構成例を示した図。
【図17】XSLT変換部の処理動作を説明するためのフローチャート。
【図18】動作付加変換部の処理動作を説明するためのフローチャート。
【図19】参照データと動作付きノードとの対応関係を記憶するための動作対応テーブルの一例を示した図。
【図20】動作付加変換部の他の処理動作を説明するためのフローチャート。
【図21】従来の構造化文書処理装置の構成例を示した図。
【符号の説明】
1…第1の計算機
2…第2の計算機
3…ネットワーク
11…Webサーバ
21…Webブラウザ
22…構造化文書処理装置
121…第1のXSLT文書
122…XSLT変換部
123…第2のXSLT文書
124…XSLTプロセッサ
125…データXML文書
126…動作付加変換部
127…表示部
128…動作XML文書
129…参照付き中間文書
130…動作付き文書
131…操作入力部
132…処理関数保持部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a structured document processing method and apparatus for processing a structured document having a hierarchical data structure composed of a plurality of components.
[0002]
[Prior art]
In recent years, Internet technology, especially Web technology has become widespread, and documents described in HTML (Hyper Text Markup Language) can be browsed anywhere regardless of the type of OS or Web browser.
[0003]
In addition, by embedding a program in which the processing procedure on the computer is described in an HTML document and using a compatible WEB browser, the application not only browses the document but also interactively communicates with the user Can be realized.
[0004]
Furthermore, with the diversification of computing devices, the platforms on which WEB browsers operate are expanding not only to personal computers but also to PDAs and mobile phones, and HTML browsing methods are also becoming more diverse.
[0005]
In an HTML document, text and style information (information related to the display method such as font size, font type, character color, background color, table width, etc.) are mixed. Since the tag surrounding the text in the sentence has only information on the structure on the screen, the content of the HTML document is difficult to use as information used by the computer. For this reason, XML (Extensible Markup Language) has been standardized and widely used as one of the structured document technologies, which is a technology for enclosing text with tags with meanings and structuring it (for example, non-documentation). Patent Document 1).
[0006]
On the other hand, since the XML document itself is difficult for humans to read, the XML document is converted into an HTML document to which style information is added, etc. so that it can be viewed on a Web browser after being shaped into an easy-to-read form. As one of these, XSLT (XSL Transformation) has been developed and standardized (see, for example, Non-Patent Document 2).
[0007]
Further, by using XSLT that adds a program that represents operations as a WEB application at the same time as shaping at the time of conversion, a WEB application can be generated from an XML document.
[0008]
XSLT is a program language for transforming an XML document described in XML. A program that executes an XSLT document described in XSLT and converts an XML document is called an XSLT processor. Built-in web browsers are now becoming popular.
[0009]
In the WEB top application, finally, it is necessary to create an HTML file in which (1) data to be displayed, (2) layout / trial (design), and (3) operation (program) are naturally integrated.
[0010]
As a method for creating these elements independently, there is also a method using XSLT described above.
[0011]
However, it is still necessary to describe a conversion rule in which (2) layout / trial and (3) operations are mixed.
[0012]
Due to the above causes, the conventional technique has the following problems.
[0013]
(1) At the time of application creation and modification, knowledge about design and programs is required.
[0014]
Normally, in a WEB application, the data, design, and (operation) program depend on the design and (operation) program even when XSLT technology is used. Knowledge is required. It is also difficult for creators with different structures to handle design and programs.
[0015]
Since the conventional WEB is mainly for browsing, the designer does not require complicated behavioral descriptions, and it is possible to leave the design part including the operation program to the designer using the XSLT technology. When building a top application, knowledge of the program side required to describe XSLT increases.
[0016]
(2) The layout alone cannot be replaced.
[0017]
Furthermore, when the same WEB application is displayed on a device (PDA, mobile phone, PC, etc.) having a different display area, it is necessary to change the display layout. However, only the layout cannot be changed. Even when the layout and the operation are made independent from the data using the XSLT technology, the operation part included in the original XSLT file must be appropriately included in the XSLT describing the layout after the change.
[0018]
(3) Only the operation cannot be replaced
For example, if the processing to be permitted to the user is different due to the difference in management authority, if only the operation is replaced, an application can be provided to a user having a plurality of operation authorities by simply switching the operation.
[0019]
However, for the same reason as described above, the data and layout to be handled are not changed, and only the operation cannot be replaced.
[0020]
[Non-Patent Document 1]
Extensible Markup Language (XML), W3C Recommendation, [online] 2000.10.6, [searched on November 29, 1999], Internet <URL: //www.w3.org/TR/REC-xml>
[0021]
[Non-Patent Document 2]
XSL Transformation (XSLT), W3C Recommendation, [online] 1999.11.16, [Searched on November 29, 1999], Internet <URL: //www.w3.org/TR/xslt>
[0022]
[Problems to be solved by the invention]
As described above, conventionally, in the description of the XSLT document, the description part related to the layout and the description part related to the program are separately created (created as separate documents), and the XML is based on these two documents. There is a problem that the document cannot be converted into a display HTML document with operation.
[0023]
Therefore, in view of the above problems, the present invention separately describes a rule for data formatting of an XML document for display and a rule for adding a program to a component of the XML document, An object of the present invention is to provide a structured document processing method and apparatus capable of converting the XML document into a structured document with operation for display from these two kinds of rules. As a result, the layout writer and the operation writer can be divided, and only the layout can be exchanged. As a result, the production cost is reduced.
[0024]
[Means for Solving the Problems]
The present invention provides: (a) a data structured document including data elements; and (b) display of data elements to be processed in the data structured document in a display document for displaying the data structured document. A first style document including an output command for outputting as an element; (c) a condition for specifying a data element to which an action is to be added in the data structured document; and a desired data element to be the action to be added An operation description document including a program for adding the operation of
Enter
Each output command in the first style document includes an output command and an output command including a position extraction command for obtaining position data in the data structured document of a data element to be processed by the output command Generate a second style document by replacing with an element,
An intermediate display document having, from the data structured document using the second style document, a data element to be processed of the output instruction of the output instruction element and a display element with reference including the position data of the data element Produces
Using the operation description document, among the display elements with reference in the intermediate display document, a display element with reference in which the data element specified by the position data is a data element to be added with the condition that satisfies the condition. By generating a display document with operation by replacing the display element with operation including the data element to which the operation is added and the program, A rule (for example, corresponding to the first XSLT document) for formatting a structured document such as an XML document (for example, corresponding to the data XML document) for display, and a program in a component of the XML document Are added separately (for example, corresponding to the action XML document), and the XML document (data XML document) is displayed from the two types of rules. For example, it can be converted into a document with motion.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0027]
FIG. 1 shows a configuration example of a structured document processing system according to this embodiment.
[0028]
As shown in FIG. 1, the present system is configured by connecting a
[0029]
The
[0030]
The user operates the structured document processing device 22 (installed in the Web browser 21) on the
[0031]
The
[0032]
In FIG. 1, only one
[0033]
In addition, a configuration in which the
[0034]
Further, the
[0035]
Note that each function and each process described below is assumed to be realized by predetermined software controlling a computer and peripheral devices, and a virtual circuit block corresponding to each function and each process is assumed. Each hardware element or software element does not necessarily have a one-to-one correspondence with each block. It is also possible to configure all or some of the functions and processes described below (or the Web browser itself equipped with the functions and processes described below) with hardware such as a semiconductor chip. .
[0036]
In the structured
[0037]
In the following description, it is assumed that an HTML document is used as the converted structured document (intermediate document with reference, document with operation).
[0038]
In the following description, a “node” in a structured document such as an HTML document, an XML document, or an XSLT document refers to a tag, text, an attribute, or the like, and the “tag” is surrounded by, for example, “<>”. 3, that is, a portion such as <Folder> or <TABLE> in FIG. 3 or FIG. 6 to be described later. A node is a constituent element of a structured document, and one constituent element may include at least one constituent element. This means that when a constituent element (node) is set as a “parent”, It can be said that the included component (node) has a relationship of “child”.
[0039]
In this embodiment, a data XML document in which data (content data) is described, and an XSLT document in which conversion rules for layout of the data XML document are described (in this embodiment, a first style XSLT document and And an operation XML document in which a conversion rule for adding an operation to a predetermined component in the data XML document is processed, and finally a processing program (prepared in advance) is stored in the predetermined component. An HTML document with operation (document with operation) is created as an HTML document for display in which the application program may be started or the application program itself may be embedded.
[0040]
(1) A method of converting an XML document by a conventional XSLT technique into an HTML document for display
Before describing the present embodiment, a method for converting an XML document into an HTML document with an operation using an XSLT document, that is, a structured document processing apparatus that operates on the
[0041]
FIG. 21 is a functional block diagram of a conventional structured document processing apparatus. In the conventional method, for example, an XML document (hereinafter referred to as a data XML document document) 191 in which data (content) is provided provided from a Web server is converted into an
[0042]
This is because even if the rule for layout in the data XML document and the description part for embedding the program in the data XML document are separated, the other one is used when the data XML document is converted by either one. This is because the structure of the data XML document, which is necessary for conversion, is converted and lost, and the conversion rule may not be applicable. That is, it is desired to describe both conversion rules depending only on the data XML document, but when either conversion is performed, the structure of the data XML document is lost, and neither conversion rule can be used as it is. There is sex.
[0043]
In addition to the configuration in which the
[0044]
In any case, in order to obtain an
[0045]
In other words, in order to create the
[0046]
In the conventional method, even if a description part for embedding a program in a data XML document and a part describing a rule for layout are separately created, an
[0047]
Also, it is not possible to change only the layout part or the operation part. This is the same as data (content), but when you want a different layout, for example, when you want to select a layout suitable for each type of computer, such as a desktop PC, mobile phone, PDA, etc. Therefore, it was necessary to create not only a layout but also an operation part for each computer of a different type.
[0048]
However, if the description part related to the layout and the description part related to the program can be created separately in the description of the XSLT document and the data XML document can be converted into a document with operation, the work can be shared. In addition, it is possible to easily change only the layout, or change only the operation of components such as a program or a place where the program is embedded.
[0049]
(2) Structure of structured document processing device
Returning to the description of the present embodiment, the structured document processing apparatus according to the present embodiment will be described.
[0050]
FIG. 2 shows a configuration example of the structured
[0051]
In the conventional system shown in FIG. 21, an XML document in which data (content) is described is converted for adding an operation to a specific component in the XML document, and conversion for the layout of the XML document. The HTML document with operation is converted based on the XSLT document including the rule description. As shown in FIG. 2, the structured
[0052]
For this purpose, the structured
[0053]
The
[0054]
In the
[0055]
In the intermediate document with
[0056]
The
[0057]
The
[0058]
The
[0059]
2 shows a case where the
[0060]
The
[0061]
The specification of the
[0062]
The
[0063]
The action
[0064]
The
[0065]
The
[0066]
The processing
[0067]
If the program can be called from within the
[0068]
(3a) About the second XSLT document and the XSLT processor
The
[0069]
Here, the data structure of the XSLT document and the operation of the
[0070]
FIG. 4 shows the data structure of the XSLT document.
[0071]
The
[0072]
The
[0073]
The XSLT output command includes a command for outputting data (for example, a text value) included in a node in the
[0074]
FIG. 5 shows a specific example of the
[0075]
When the
[0076]
Before inputting the first XSLT document to the
[0077]
The constituent elements (nodes) corresponding to the node
[0078]
Specifically, the
[0079]
In the
[0080]
Here, taking the
[0081]
An instruction 421 in FIG. 8 is an instruction for generating a specific tag <SPAN> for specifying on the intermediate document with
[0082]
An
[0083]
The
[0084]
An
[0085]
In addition to the above, various methods can be used for describing the
[0086]
(3b) Processing operation of XSLT converter
The processing operation of the
[0087]
Upon receiving the
[0088]
In this procedure, first, the
[0089]
Subsequently, the process branches depending on the type of the read node (step S2). As a result, if there are no more nodes to be read in the
[0090]
If it is determined in step S2 that the node type is not a node value output command, the node is added to the output as it is (step S4). Then, the process returns to step S1 and returns to the process of reading the next node in the
[0091]
On the other hand, when the node type is a node value output command such as the node value output commands 401 to 403 shown in FIG. 5 in the determination of step S2, the node value output command is replaced with the node value output command shown in FIG.
[0092]
The processing operations in steps S5 to S9 will be described by taking as an example the case where the instruction group 411 (FIG. 7A) shown in FIG. 8 is output.
[0093]
That is, when the node type is the node
[0094]
When the instruction group 411 (FIG. 7A) shown in FIG. 8 is added to the output instead of the node
[0095]
In this way, when the processing of step S2 to step S9 is completed for all nodes of the first XSLT document as shown in FIG. 5, each node in the first XSLT document shown in FIG. A
[0096]
(4) About intermediate documents with reference
In the
[0097]
The reference data is data representing the position of the node of the
[0098]
For example, when the
[0099]
As shown in FIG. 9, the
[0100]
The text value included in each of the nodes with
[0101]
The reference data of each of the nodes with
[0102]
FIG. 10 shows a screen display example of the
[0103]
The
[0104]
As described above, each of the nodes with
[0105]
The reference data may be encoded data obtained by counting the number of nodes in the
[0106]
In addition, as a method of retaining reference data in the
[0107]
(5a) Documents with motion
Next, the document with
[0108]
The action-added
[0109]
13 is an HTML document with operation (including a program) generated from the
[0110]
FIG. 14 is an example of a screen display of the
[0111]
Nodes 701 to 704 surrounded by dotted lines in FIG. 13 are nodes to which operations are added according to the description of the
[0112]
Each of the nodes 701 to 704 is generated from the referenced intermediate document 129 (or the referenced
[0113]
A
[0114]
The program “FileOpen” called here is stored in the processing
[0115]
(5b) Operation XML document and operation addition conversion unit
First, the
[0116]
FIG. 11 shows the data structure of the
[0117]
In FIG. 11, the action XML document 501 includes at least one
[0118]
FIG. 12 shows a specific example of the
[0119]
The
[0120]
An
[0121]
Instead of holding the
[0122]
Next, the processing operation of the operation
[0123]
The action
[0124]
First, the operation
[0125]
Subsequently, the process branches depending on the type of the read node (step S22). As a result, if there are no more nodes to be read in the intermediate document with
[0126]
If it is determined in step S22 that the read node is not a node with reference, the input node is added to the output as it is (step S30). Then, the process returns to step S21, and the process returns to the process of reading the next node in the intermediate document with
[0127]
On the other hand, if it is determined in step S22 that the read node is a node with reference, the node in the
[0128]
If the condition is not met in step S28, the process returns to step S26 again, and one next action template is extracted from the
[0129]
It should be noted that not only the
[0130]
In addition, when generating the
[0131]
(6) About movement of documents with motion
The action-added node of the action-added
[0132]
The action-added
[0133]
FIG. 10 shows a display example of the intermediate document with
[0134]
In FIG. 14, an
[0135]
For example, when the user clicks on any of the above areas with the mouse, the
[0136]
The functions such as FileOpen, DirMove, and EditDirity described above are held in the processing
[0137]
Further, the program added (embedded) to the action-added
[0138]
The processing
[0139]
Note that the added program is not necessarily a program that calls an application program such as a function stored in the processing
[0140]
(7) Other examples of storing reference data
To associate the position of the node in the
[0141]
The node (position) in the
[0142]
In this case, the correspondence relationship may be held in a table as shown in FIG. In the
[0143]
FIG. 16 is a table as shown in FIG. 15 and shows an example of the structure of the structured document processing apparatus in the case of storing the correspondence relationship.
[0144]
In FIG. 16, the same parts as those in FIG. 2 are denoted by the same reference numerals, and only different parts will be described.
[0145]
That is, in FIG. 16, two
[0146]
In FIG. 16, two XSLT processors are prepared. However, only one XSLT processor may be prepared and used for two data generation (that is, two XSLT processors are not actually required in the program). It is only necessary to obtain two pieces of data representing the correspondence relationship between the node of the
[0147]
(8) Other processing operations of the operation addition conversion unit
Before actually creating the action-added
[0148]
An example of the operation correspondence table is shown in FIG. The action correspondence table represents a node position on the data XML document 125 (and a data position to which a program included in the node is added) included in the node with reference in the
[0149]
The table in FIG. 19 can be generated from, for example, the
[0150]
As reference data, a node position (and a data position as a target to which a program included in the node is added) in the
[0151]
The node with an action corresponding to each reference data includes an
[0152]
In this example, the instruction described in the
[0153]
For example, a
[0154]
Next, the processing operation of the operation
[0155]
In FIG. 20, before starting step S21, first, an operation correspondence table as shown in FIG. 19 is created.
[0156]
The action
[0157]
On the other hand, when the reference data corresponding to (matching) the reference data included in the data with reference exists in the operation correspondence table, the operation addition node corresponding to the reference data is output from the table (step S46). ).
[0158]
If the operation addition node is output, the process returns to step S21 as in FIG.
[0159]
As described above, according to the above-described embodiment, the first component included in the first component that is one of the plurality of components of the first document (data XML document) as the structured document. A first instruction (for example, corresponding to a node value output instruction included in the first XSLT document) that is an instruction for generating a second component for displaying data is transferred to the first instruction. A second instruction for extracting the position of the first data in the first document to be processed is added, and (b) the first component of the first document based on the first instruction A second component is generated from the first document, and the position of the first data is extracted from the first document as reference data based on the second instruction. (C) the reference data, the second component, (For example, corresponding to a node with reference), (d) added to the first data Is added to the second component associated with the reference data representing the position of the first data (for example, corresponding to generating a node with an action), and the structure of an XML document or the like For adding a program to a component of the XML document (for example, corresponding to the first XSLT document) and a rule for formatting the document (for example, corresponding to the data XML document) into data for display Rules (for example, corresponding to action XML documents) are described separately, and from these two types of rules, XML documents (data XML documents) are structured documents with actions for display (for example, documents with actions). ).
[0160]
Further, according to the above embodiment, “data to be displayed” corresponding to the data XML document, “layout / trial” corresponding to the first XSLT document, and the operation XML document, which are the three elements in the WEB top application, are used. The corresponding "action" can be defined in an independent document. Therefore, developers can be divided such that a programmer having a necessary programming technique creates an operation XML document, and a designer creates a first XSLT document.
[0161]
By changing the first XSLT document, only the “layout / trial” can be changed. Only the layout can be changed without changing the operation and data to be displayed (operation XML document, data XML document).
[0162]
Only the “action” can be changed by changing the action XML document. Only the operation can be changed without changing the data to be displayed and the layout (data XML document, first XSLT document).
[0163]
The technique of the present invention described in the embodiment of the present invention is a program that can be executed by a computer, such as a magnetic disk (floppy disk, hard disk, etc.), an optical disk (CD-ROM, DVD, etc.), a semiconductor memory, etc. It can be stored in a medium and distributed.
[0164]
In addition, this invention is not limited to the said embodiment, In the implementation stage, it can change variously in the range which does not deviate from the summary. Furthermore, the above embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent elements are deleted from all the constituent elements shown in the embodiment, the problem (at least one of them) described in the column of problems to be solved by the invention can be solved, and the column of the effect of the invention If at least one of the effects described in (1) is obtained, a configuration in which this configuration requirement is deleted can be extracted as an invention.
[0165]
【The invention's effect】
As described above, according to the present invention, for example, a rule for data formatting of an XML document as a structured document for display, and a rule for adding a program to the constituent elements of the structured document, Each structured document can be described separately, and the structured document can be converted into a structured document with operation for display from these two types of rules.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration example of a structured document processing system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a configuration example of a structured document processing apparatus.
FIG. 3 is a diagram showing a specific example of a data XML document.
FIG. 4 is a diagram showing a data structure of an XSLT document.
FIG. 5 is a diagram showing a specific example of a first XSLT document.
6 is a diagram showing an HTML document obtained as a result of converting the data XML document of FIG. 3 with the first XSLT document shown in FIG. 5;
FIG. 7 is a diagram showing an example of an instruction group (component) that replaces a node value output instruction in a first XSLT document by an XSLT conversion unit;
FIG. 8 is a diagram for explaining the instruction group shown in FIG.
FIG. 9 is a diagram showing a specific example of an intermediate document with reference.
FIG. 10 is a diagram showing a display example of an intermediate document with reference.
FIG. 11 is a diagram for explaining the data structure of an operation XML document;
FIG. 12 is a diagram showing a specific example of an operation XML document.
FIG. 13 is a diagram showing a specific example of a document with motion.
FIG. 14 is a view showing a display example of a document with motion.
FIG. 15 shows a position of a node in a data XML document to be processed by each node value output instruction in the first XSLT document and a position of a node in the
FIG. 16 is a diagram showing another configuration example of the structured document processing apparatus.
FIG. 17 is a flowchart for explaining the processing operation of the XSLT conversion unit;
FIG. 18 is a flowchart for explaining the processing operation of the operation addition conversion unit;
FIG. 19 is a diagram showing an example of an operation correspondence table for storing a correspondence relationship between reference data and a node with an operation.
FIG. 20 is a flowchart for explaining another processing operation of the operation addition conversion unit;
FIG. 21 is a diagram showing a configuration example of a conventional structured document processing apparatus.
[Explanation of symbols]
1 ... 1st computer
2 ... Second calculator
3 ... Network
11: Web server
21 ... Web browser
22 ... structured document processing apparatus
121: First XSLT document
122 ... XSLT converter
123 ... the second XSLT document
124 ... XSLT processor
125 ... Data XML document
126 ... Operation addition conversion unit
127 ... display section
128 ... operation XML document
129 ... Intermediate document with reference
130 ... Document with motion
131: Operation input unit
132: Processing function holding unit
Claims (10)
(b)前記データ構造化文書中の処理対象のデータ要素を、前記データ構造化文書を表示するための表示用文書中の表示要素として出力するための出力命令を含む第1のスタイル文書と、
(c)前記データ構造化文書中の動作付加対象のデータ要素を特定するための条件と、当該動作付加対象のデータ要素に所望の動作を付加するためのプログラムとを含む動作記述文書と、
の入力を受け付ける手段と、
前記第1のスタイル文書中の各出力命令を、当該出力命令と、当該出力命令の処理対象となるデータ要素の前記データ構造化文書中における位置データを求めるための位置抽出命令とを含む出力命令要素に置き換えることにより、第2のスタイル文書を生成する第1の生成手段と、
前記第2のスタイル文書を用いて前記データ構造化文書から、前記出力命令要素の前記出力命令の処理対象のデータ要素及び当該データ要素の前記位置データを含む参照付き表示要素を有する中間表示用文書を生成する第2の生成手段と、
前記動作記述文書を用いて、前記中間表示用文書中の参照付き表示要素のうち、前記位置データにより特定されるデータ要素が、前記条件を満たす動作付加対象のデータ要素である参照付き表示要素を、当該動作付加対象のデータ要素と前記プログラムとを含む動作付き表示要素に置き換えて、動作付き表示用文書を生成する第3の生成手段と、
を具備したことを特徴とする文書処理装置。(A) a data structured document including data elements;
(B) a first style document including an output command for outputting a data element to be processed in the data structured document as a display element in a display document for displaying the data structured document;
(C) an operation description document including a condition for specifying a data element to which an action is added in the data structured document, and a program for adding a desired action to the data element to be added to the action;
Means for accepting input ,
Each output command in the first style document includes an output command and an output command including a position extraction command for obtaining position data in the data structured document of a data element to be processed by the output command A first generation means for generating a second style document by replacing with an element;
An intermediate display document having, from the data structured document using the second style document, a data element to be processed of the output instruction of the output instruction element and a display element with reference including the position data of the data element Second generating means for generating
Using the operation description document, among the display elements with reference in the intermediate display document, a display element with reference in which the data element specified by the position data is a data element to be added with the condition that satisfies the condition. A third generation means for generating a display document with an action by replacing the display element with an action including the data element to be added with the action and the program;
A document processing apparatus comprising:
前記第2の生成手段は、前記データ構造化文書中の前記出力命令に含まれる条件を満たすデータ要素及びその位置データを含む前記参照付き表示要素を生成することを特徴とする請求項1記載の文書処理装置。The output command in the first style document includes a condition for specifying a data element to be processed by the output command,
The said 2nd production | generation means produces | generates the said display element with a reference containing the data element which satisfy | fills the conditions included in the said output command in the said data structured document, and its position data. Document processing device.
(b)前記データ構造化文書中の処理対象のデータ要素を、前記データ構造化文書を表示するための表示用文書中の表示要素として出力するための出力命令を含む第1のスタイル文書と、
(c)前記データ構造化文書中の動作付加対象のデータ要素を特定するための条件と、当該動作付加対象のデータ要素に所望の動作を付加するためのプログラムとを含む動作記述文書と、
の入力を受け付ける手段と、
前記第1のスタイル文書中の各出力命令を、当該出力命令と、当該出力命令の処理対象となるデータ要素の前記データ構造化文書中における位置データを求めるための位置抽出命令とを含む出力命令要素に置き換えることにより、第2のスタイル文書を生成する第1の生成手段と、
前記第1のスタイル文書を用いて前記データ構造化文書から、前記出力命令の処理対象であるデータ要素を前記表示要素として含む前記表示用文書を生成する第2の生成手段と、
前記第2のスタイル文書と前記データ構造化文書とを用いて、前記出力命令要素の前記出力命令で出力される前記表示要素の前記表示用文書中での位置データと、当該出力命令要素の前記位置抽出命令に従って求めた、当該出力命令の処理対象であるデータ要素の前記データ構造化文書中での位置データとを対応付けたテーブルを生成する第3の生成手段と、
前記動作記述文書を用いて、前記テーブル中の前記データ構造化文書中の位置データにより特定されるデータ要素が、前記条件を満たす動作付加対象のデータ要素である場合、当該テーブル中の当該位置データに対応付けられている前記表示用文書中での位置データにより特定される表示要素を、当該動作付加対象のデータ要素と前記プログラムとを含む動作付き表示要素に置き換えて、動作付き表示用文書を生成する第4の生成手段と、
を具備したことを特徴とする文書処理装置。(A) a data structured document including data elements;
(B) a first style document including an output command for outputting a data element to be processed in the data structured document as a display element in a display document for displaying the data structured document;
(C) an operation description document including a condition for specifying a data element to which an action is added in the data structured document, and a program for adding a desired action to the data element to be added to the action;
Means for accepting input ,
Each output command in the first style document includes an output command and an output command including a position extraction command for obtaining position data in the data structured document of a data element to be processed by the output command A first generation means for generating a second style document by replacing with an element;
Second generating means for generating, from the data structured document using the first style document, the display document including the data element that is the processing target of the output command as the display element;
Using the second style document and the data structured document, the position data in the display document of the display element output by the output command of the output command element, and the output command element of the output command element Third generation means for generating a table that associates the position data in the data structured document of the data element that is the processing target of the output instruction, obtained according to the position extraction instruction;
If the data element specified by the position data in the data structured document in the table using the action description document is a data element to be added to the condition that satisfies the condition, the position data in the table Replacing the display element identified by the position data in the display document associated with the display element with the action including the data element to which the action is added and the program. Fourth generating means for generating;
A document processing apparatus comprising:
(b)前記データ構造化文書中の処理対象のデータ要素を、前記データ構造化文書を表示するための表示用文書中の表示要素として出力するための出力命令を含む第1のスタイル文書と、
(c)前記データ構造化文書中の動作付加対象のデータ要素を特定するための条件と、当該動作付加対象のデータ要素に所望の動作を付加するためのプログラムとを含む動作記述文書と、
の入力を受け付ける手段と、
前記第1のスタイル文書中の各出力命令を、当該出力命令と、当該出力命令の処理対象となるデータ要素の前記データ構造化文書中における位置データを求めるための位置抽出命令とを含む出力命令要素に置き換えることにより、第2のスタイル文書を生成する第1の生成手段と、
前記第2のスタイル文書を用いて前記データ構造化文書から、前記出力命令要素の前記出力命令の処理対象のデータ要素及び当該データ要素の前記位置データを含む参照付き表示要素を有する中間表示用文書を生成する第2の生成手段と、
前記動作記述文書と前記データ構造化文書とを用いて、前記データ構造化文書中のデータ要素のうち前記条件を満たす動作付加対象のデータ要素と前記プログラムとを含む動作付き表示要素を生成するとともに、当該動作付き表示要素と、当該動作付加対象のデータ要素の当該データ構造化文書中での位置データとを対応付けたテーブルを生成する第3の生成手段と、
前記中間表示用文書中の表示要素のうち、前記テーブル中の前記位置データを含む表示要素を、当該テーブル中の当該位置データに対応付けられている前記動作付き表示要素に置き換えて、動作付き表示用文書を生成する第4の生成手段と、
を具備したことを特徴とする文書処理装置。(A) a data structured document including data elements;
(B) a first style document including an output command for outputting a data element to be processed in the data structured document as a display element in a display document for displaying the data structured document;
(C) an operation description document including a condition for specifying a data element to which an action is added in the data structured document, and a program for adding a desired action to the data element to be added to the action;
Means for accepting input ,
Each output command in the first style document includes an output command and an output command including a position extraction command for obtaining position data in the data structured document of a data element to be processed by the output command A first generation means for generating a second style document by replacing with an element;
An intermediate display document having, from the data structured document using the second style document, a data element to be processed of the output instruction of the output instruction element and a display element with reference including the position data of the data element Second generating means for generating
Using the behavior description document and the data structured document to generate a behavioral display element including a data element satisfying the condition and the program among the data elements in the data structured document; A third generation means for generating a table in which the display element with the action and the position data in the data structured document of the data element to be added with the action are associated;
Of the display elements in the intermediate display document, the display element including the position data in the table is replaced with the display element with action associated with the position data in the table, and the display with action is performed. Fourth generation means for generating a document for use;
A document processing apparatus comprising:
(b)前記データ構造化文書中の処理対象のデータ要素を、前記データ構造化文書を表示するための表示用文書中の表示要素として出力するための出力命令を含む第1のスタイル文書と、
(c)前記データ構造化文書中の動作付加対象のデータ要素を特定するための条件と、当該動作付加対象のデータ要素に所望の動作を付加するためのプログラムとを含む動作記述文書と、
の入力を受け付ける手段と、
前記第1のスタイル文書から第2のスタイル文書を生成する第1の生成手段と、
前記データ構造化文書と前記第2のスタイル文書とを用いて中間表示用文書を生成する第2の生成手段と、
前記動作記述文書と前記中間表示用文書とを用いて動作付き表示用文書を生成する第3の生成手段と、
を含む構造化文書変換装置における文書処理方法であって、
前記入力を受け付ける手段が、入力された前記データ構造化文書、前記第1のスタイル文書、及び前記動作記述文書を受け付けるステップと
前記第1の生成手段が、前記第1のスタイル文書中の各出力命令を、当該出力命令と、当該出力命令の処理対象となるデータ要素の前記データ構造化文書中における位置データを求めるための位置抽出命令とを含む出力命令要素に置き換えることにより、前記第2のスタイル文書を生成する第1の生成ステップと、
前記第2の生成手段が、前記第2のスタイル文書を用いて前記データ構造化文書から、前記出力命令要素の前記出力命令の処理対象のデータ要素及び当該要素データの前記位置データを含む参照付き表示要素を有する前記中間表示用文書を生成する第2の生成ステップと、
前記第3の生成手段が、前記動作記述文書を用いて、前記中間表示用文書中の参照付き表示要素のうち、前記位置データにより特定されるデータ要素が前記条件を満たす動作付加対象のデータ要素である参照付き表示要素を、当該動作付加対象のデータ要素と前記プログラムとを含む新たな表示要素に置き換えて、前記動作付き表示用文書を生成する第3の生成ステップと、
を含む文書処理方法。(A) a data structured document including data elements;
(B) a first style document including an output command for outputting a data element to be processed in the data structured document as a display element in a display document for displaying the data structured document;
(C) an operation description document including a condition for specifying a data element to which an action is added in the data structured document, and a program for adding a desired action to the data element to be added to the action;
Means for accepting input ,
First generation means for generating a second style document from the first style document;
Second generation means for generating an intermediate display document using the data structured document and the second style document;
Third generation means for generating a display document with operation using the operation description document and the intermediate display document;
A document processing method in a structured document conversion apparatus including:
The means for receiving the input receives the input data structured document, the first style document, and the behavior description document ;
The first generation means obtains each output instruction in the first style document for the position data in the data structured document of the output instruction and a data element to be processed by the output instruction. by replacing the output command element including the position extracting instructions, a first generating step of generating the second style document,
The second generation means includes a reference including the data element to be processed of the output instruction of the output instruction element and the position data of the element data from the data structured document using the second style document a second generating step of generating the intermediate displaying document having a display element,
Wherein the third generating means by using the operation description document, the one of the reference with the display elements of the intermediate representation for the document, the data elements identified by the position data is a data element of the satisfying operation additional object see equipped display element is a third generation step of substituting the new display element containing said a data element of the operating additional target program to generate the operation with displaying document,
Document processing method.
(a)データ要素を含むデータ構造化文書と、
(b)前記データ構造化文書中の処理対象のデータ要素を、前記データ構造化文書を表示するための表示用文書中の表示要素として出力するための出力命令を含む第1のスタイル文書と、
(c)前記データ構造化文書中の動作付加対象のデータ要素を特定するための条件と、当該動作付加対象のデータ要素に所望の動作を付加するためのプログラムとを含む動作記述文書と、
の入力を受け付ける手段、
前記第1のスタイル文書中の各出力命令を、当該出力命令と、当該出力命令の処理対象となるデータ要素の前記データ構造化文書中における位置データを求めるための位置抽出命令とを含む出力命令要素に置き換えることにより、第2のスタイル文書を生成する第1の生成手段、
前記第2のスタイル文書を用いて前記データ構造化文書から、前記出力命令要素の前記出力命令の処理対象のデータ要素及び当該要素データの前記位置データを含む参照付き表示要素を有する中間表示用文書を生成する第2の生成手段、
前記動作記述文書を用いて、前記中間表示用文書中の参照付き表示要素のうち、前記位置データにより特定されるデータ要素が、前記条件を満たす動作付加対象のデータ要素である参照付き表示要素を、当該動作付加対象のデータ要素と前記プログラムとを含む新たな表示要素に置き換えて、動作付き表示用文書を生成する第3の生成手段、
として機能させるためのプログラム。 The computer,
(A) a data structured document including data elements;
(B) a first style document including an output command for outputting a data element to be processed in the data structured document as a display element in a display document for displaying the data structured document;
(C) an operation description document including a condition for specifying a data element to which an action is added in the data structured document, and a program for adding a desired action to the data element to be added to the action;
Means to accept input ,
Each output command in the first style document includes an output command and an output command including a position extraction command for obtaining position data in the data structured document of a data element to be processed by the output command First generation means for generating a second style document by replacing with an element;
An intermediate display document having a display element with reference including the data element to be processed of the output instruction element of the output instruction element and the position data of the element data from the data structured document using the second style document Second generating means for generating
Using the operation description document, among the display elements with reference in the intermediate display document, a display element with reference in which the data element specified by the position data is a data element to be added with the condition that satisfies the condition. , A third generation means for generating a display document with operation by replacing with a new display element including the data element of the operation addition target and the program;
Program to function as .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002378445A JP4018528B2 (en) | 2002-12-26 | 2002-12-26 | Document processing apparatus, document processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002378445A JP4018528B2 (en) | 2002-12-26 | 2002-12-26 | Document processing apparatus, document processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004213082A JP2004213082A (en) | 2004-07-29 |
JP4018528B2 true JP4018528B2 (en) | 2007-12-05 |
Family
ID=32815297
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002378445A Expired - Lifetime JP4018528B2 (en) | 2002-12-26 | 2002-12-26 | Document processing apparatus, document processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4018528B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090137202A1 (en) * | 2004-11-12 | 2009-05-28 | Yusuke Fujimaki | Information distribution system |
KR100677429B1 (en) | 2005-02-01 | 2007-02-02 | 엘지전자 주식회사 | Method for processing user interface in mobile communication terminal |
JP5235349B2 (en) * | 2007-07-31 | 2013-07-10 | キヤノン株式会社 | Flow description document processing apparatus, flow description document processing method, and program |
-
2002
- 2002-12-26 JP JP2002378445A patent/JP4018528B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004213082A (en) | 2004-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3857663B2 (en) | Structured document editing apparatus, structured document editing method and program | |
US6748569B1 (en) | XML server pages language | |
US7191397B2 (en) | XML server pages language | |
KR101099272B1 (en) | Web page rendering mechanism using external programmatic themes | |
CA2438176A1 (en) | Xml-based multi-format business services design pattern | |
US20110258538A1 (en) | Capturing DOM Modifications Mediated by Decoupled Change Mechanism | |
US20040210556A1 (en) | Database facility for XML server pages language | |
JP2001282674A (en) | Internet-based font server | |
CN102053994B (en) | Language parser and parsing method using same | |
WO2007041924A1 (en) | A device of implementing a flexible page layout and method thereof | |
JP2009134741A (en) | Data processing method | |
US20080163077A1 (en) | System and method for visually generating an xquery document | |
WO2006051975A1 (en) | Document processing device | |
WO2006051958A1 (en) | Information distribution system | |
WO2006137563A1 (en) | Data processing device and data processing method | |
WO2006051969A1 (en) | Document processing device and document processing method | |
WO2006137562A1 (en) | Document processing device and document processing method | |
WO2006051954A1 (en) | Document processing device and document processing method | |
WO2006051966A1 (en) | Document managing device and document managing method | |
JP4018528B2 (en) | Document processing apparatus, document processing method, and program | |
US20040205587A1 (en) | System and method for enumerating arbitrary hyperlinked structures in which links may be dynamically calculable | |
JP2010282327A (en) | Format conversion system, format conversion method, and program | |
Ono et al. | XSLT stylesheet generation by example with WYSIWYG editing | |
JP3788956B2 (en) | Structured document display method, structured document display device, and program | |
JP2006185064A (en) | Data processor and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040609 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20051011 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20051018 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070403 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070528 |
|
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: 20070918 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070920 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100928 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110928 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110928 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120928 Year of fee payment: 5 |