JP2004252655A - File conversion device developing table expressed by markup language - Google Patents

File conversion device developing table expressed by markup language Download PDF

Info

Publication number
JP2004252655A
JP2004252655A JP2003041325A JP2003041325A JP2004252655A JP 2004252655 A JP2004252655 A JP 2004252655A JP 2003041325 A JP2003041325 A JP 2003041325A JP 2003041325 A JP2003041325 A JP 2003041325A JP 2004252655 A JP2004252655 A JP 2004252655A
Authority
JP
Japan
Prior art keywords
column
file
columns
conversion device
tag
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.)
Pending
Application number
JP2003041325A
Other languages
Japanese (ja)
Inventor
Kosuke Matsunaga
浩輔 松永
Hiroyuki Yamamoto
浩之 山本
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2003041325A priority Critical patent/JP2004252655A/en
Publication of JP2004252655A publication Critical patent/JP2004252655A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a file conversion device easily processing a markup language. <P>SOLUTION: Tables 120, 130 are tables each expressed by an HTML. The upper table 120 originally includes the nested lower table 130 in a column 121. By the file conversion device, columns (2), (3), (4), (5) of the lower table 130 are respectively converted into columns II, IV, V, VIII of the upper table 120. Positions of the columns II, IV, V, VIII after the conversion respectively correspond to positions of the original columns (2), (3), (4), (5). Through such the conversion, a file of the HTML with the nested table is converted into the table without the nested table. By using the file after the conversion, the markup language can be easily processed. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、マークアップ言語で表された表を展開するファイル変換装置に関する。
【0002】
【従来の技術】
従来、HTML(HyperText Markup Language)やXHTML(Extensible HTML)等のマークアップ言語が実用となっている。HTMLでは、文章ファイルにタグを挿入することで、文章の体裁を指定することができる。例えば、特定の文字に特定のフォントを利用させたり、画像を所定の位置に表示させたりすること等を指定できる。かかるHTMLのファイルは、WWW(World Wide Web)での情報提供等に利用されている。
【0003】
マークアップ言語では、一般に表形式で情報を構造化することができる。例えば、HTML等では、表のデータを特定する<table>等のタグを、行のデータを特定する<tr>等のタグや、各欄のデータを特定する<td>等のタグと組み合わせて利用することで、表形式に構造化しつつ情報提供を行うことができる。かかる表は、上位の表の欄の内部に、更に入れ子の下位の表を有する場合がある。
【0004】
一方、マークアップ言語の処理装置の形態に種々のものが利用されるようになってきている。例えば、携帯電話等の携帯端末の他、近年では、テレビのチューナーや印刷装置、セットトップボックス等がマークアップ言語の処理装置である場合もある。例えば、マークアップ言語による情報提供がデジタル放送を介してセットトップボックス等に行われる場合がある。また、マークアップ言語のファイルを解析して印刷を行う印刷装置が利用される場合がある。
【0005】
【特許文献1】
特公2002−351735公報
【0006】
【発明が解決しようとする課題】
しかし、入れ子になった表の構造を処理することは煩雑な作業であった。
例えば、マークアップ言語により記述された入れ子の表を印刷する場合、入れ子の下位の表の処理結果に応じて、上位の表を処理しなければならない。下位の表の体裁に応じて、その表を含む欄全体の体裁を定めてゆく必要があるためである。かかる処理は、処理量が大きく、かつ複雑な処理である。
【0007】
また、マークアップ言語の処理装置の能力が低い場合もある。係る場合、入れ子になった表の使用が禁止されたり、表の構造の処理が、極めて長い処理時間を要したり、不能になってしまったりする。例えば、印刷装置がHTML等のファイルの構造を直接解析して印刷を行う場合や、携帯端末のような処理能力が低い装置がHTML等のファイルの内容を表示させる場合である。
【0008】
このような処理負担を軽減するために、入れ子のない単層の表のみを含むHTMLファイルを用意することも考えられる。しかしながら、入れ子の表を含むHTMLファイルとは別に、このようなファイルを作成するのは多大な負担である。
【0009】
本発明は、上述の課題を解決するためになされたものであり、入れ子の表を簡易に展開するファイル変換装置を提供することを目的とする。
【0010】
【課題を解決するための手段およびその作用・効果】
上記課題の少なくとも一部を解決するために、本発明では、次の構成を適用した。
本発明のファイル変換装置は、
マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換するファイル変換装置であって、
前記マークアップ言語は、1つ以上の欄よりなる表を表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む欄を備える入れ子の上位の表を有し、
前記表を表すタグ、又は、1つ以上の該欄を表すタグの少なくとも一方について、該タグの削除及び変更の少なくとも1つを行う変換部を備えることを要旨とする。
【0011】
例えば、本発明のファイル変換装置は、第1のマークアップ言語がXHTML等である場合において、表全体のデータを特定する<table>及び</table>の各タグと、表の欄の行のデータを特定する<tr>及び</tr>の各タグとを削除するとともに、表の個々の欄のデータを特定する<td>及び</td>や<th>及び</th>の各タグを各々<div>及び</div>に変更するものとしてもよい。ここに、<table>及び</table>は表を表すタグであり、<tr>及び</tr>は1つ以上の欄を表すタグであり、<td>及び</td>や<th>及び</th>は1つの欄を表すタグである。また、<div>及び</div>は、XHTMLにおいて情報要素のブロックを特定するタグである。なお、変換部は、表を表すタグを削除するとともに、その表の欄を表すタグの変更を行うものとしてもよい。
【0012】
このようにすることで、表を、表以外の形式に変換することができる。かかる変換を通じて、マークアップ言語における入れ子の表を、入れ子のない表(以下、単層の表と称する)に変換することができる。変換後の表のデータを利用することで、印刷や表示等の処理の簡便を図ることができる。
【0013】
なお、上述のタグ削除・変更に係る表は、入れ子の最下位の表であってもよいし、最下位の表の直近の上位の表であってもよい。また、入れ子の最上位の表であってもよいし、最上位の表の直近の下位の表であってもよい。
【0014】
なお、タグの削除や変更は、例えば、順次入れ子になった3個以上の表に順次施すものとしてもよい。このとき、入れ子の最上位の表から順次削除等を施すものとしてもよいし、最下位の表から施すものとしてもよいし、最上位及び最下位の表以外のその他の表から施すものとしてもよい。
【0015】
なお、本発明のファイル変換装置において、タグ削除等に係る表全体のデータに対応付けられた属性情報を、タグ削除等の前後や、削除等と並行して、表の各欄のデータに対応付けられたものに変換するものとしてもよい。
【0016】
マークアップ言語としては、種々のマークアップ言語を適用することができる。例えば、前述のHTMLやXHTML等を適用してもよい。また、文書の処理や管理、通信の便宜を図ることを主目的として設計された、SGML(Standard Generalized Markup Language)やXML(Extensible Markup Language)といったマークアップ言語を適用してもよい。なお、第1及び第2のファイルのマークアップ言語は同一のものでもよいし、類似するものでもよいし、異なるものでもよい。例えば、第2のファイルのマークアップ言語の規約の少なくとも一部は、第1のファイルのマークアップ言語の規約を簡略化したものであってもよい。
【0017】
また、マークアップ言語の表は、表示用に限られない。例えば、情報検索用に構造化してデータを格納するデータベースの表であってもよい。
【0018】
ファイル変換装置は、ファイル変換に専用の装置であってもよいし、その他の機能を併せ持つ装置であってもよい。その他の機能を併せ持つ場合としては、パーソナルコンピュータやテレビのチューナ、印刷装置、セットトップボックス、携帯電話その他の携帯情報処理装置であるときを挙げることができる。
【0019】
なお、表の欄の内部には、入れ子の下位の表を複数有する場合があってもよい。
【0020】
本発明のファイル変換装置において、
前記削除又は変更の少なくとも一方の対象となる欄について、前記変換後の表示位置の情報を入力する位置情報入力部を備え、
前記変換部は、前記第2のファイルに、該情報を含めるものとしてもよい。
【0021】
このようにすることで、変換後の各欄の位置を指定することができる。位置の指定は、エディッタ等によりファイルの内容をユーザが直接変更するものとしてもよい。例えば、変換後の欄を特定するタグ(前述の場合における<div>)に、「style=“left:x座標;top:y座標”」等の属性データが追加されるものとしてもよい。このとき、ファイル変換装置は、HTML等におけるコメント文の利用等により、属性データを追加すべき部位をユーザに視覚的に示すものとしてもよい。また、ファイル変換装置は、単なるエディッタを利用したインタフェースでなく、実際の表形式の表示態様が示されるGUI(Graphical User Interface)を提供するものとしてもよい。
【0022】
本発明の第2のファイル変換装置は、
マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換するファイル変換装置であって、
前記マークアップ言語は、1つ以上の欄よりなる表と、該欄に対応付けられた、該欄ごとの所定の情報要素とを表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む情報要素に係る欄を備える入れ子の上位の表を有し、
前記下位の表を展開し、該下位の表の欄を、前記上位の表の欄に変換する変換部を備えることを要旨とする。
【0023】
このようにすることで、マークアップ言語における入れ子の表を、単層の表に変換することができる。下位の表の展開にあたっては、例えば、下位の表を表す<table>及び</table>のタグを削除するものとしてもよい。
【0024】
ここで、情報要素には、入れ子の下位の表や文字データのほかに、画像(背景画像や単なる模様を含む)や、いわゆるクリッカブルマップ、いわゆるハイパーリンク等を含むものとしてもよい。
【0025】
本発明の第2のファイル変換装置において、
前記表は、縦方向及び横方向に1つ以上配列された基本領域を有し、
前記欄は、その縦方向の行幅及び横方向の列幅が、前記基本領域の配列数で規定され、1つ以上の所定の前記基本領域と対応付けられているものとしてもよい。
【0026】
かかる場合として例えば、HTMLやXHTML等の表において、属性データを付した<td colspan=2>等のタグを利用することで、欄の大きさを規定する態様が挙げられる。属性データ「colspan=2」が付された欄は、横方向に2列の基本領域を対応付けられる。同様に属性データ「rowaspan=2」は、縦方向に2行の基本領域を対応付けさせるための属性データである。このようにすることで、異なる大きさの欄が混在する表を比較的容易に扱うことができる。
【0027】
なお、縦方向及び横方向に1つ以上の基本領域が配列された表としては、縦方向又は横方向の少なくとも一方については、1行又は1列しか基本領域が配列されていない表を含む。
【0028】
本発明の第2のファイル変換装置において、
前記変換部は、内部に別の表を含まない下位の表について前記変換を行うものとしてもよい。
【0029】
このようにすることで、処理の簡便を図ることができる。ファイル変換装置は、内部に別の表を含まない下位の欄についての変換処理のみを行うものとしてもよいし、内部に別の表を含む下位の欄についての変換処理も行うものとしてもよい。
【0030】
本発明の第2のファイル変換装置において、
前記表全体の列幅が1であるか否かを検出する検出部を備え、
前記変換部は、前記列幅が1である場合に、前記表を表すタグ、又は、1つ以上の該欄を表すタグの少なくとも一方について、該タグの削除及び変更の少なくとも1つを行うものとしてもよい。
【0031】
このようにすることで、表を、表以外の形式に変換することができる。かかる変換を通じて、マークアップ言語における入れ子の表を、単層の表に変換することができる。
【0032】
上述のタグ削除・変更に係る表は、入れ子の最下位の表であってもよいし、最下位の表の直近の上位の表であってもよい。また、入れ子の最上位の表であってもよいし、最上位の表の直近の下位の表であってもよい。
【0033】
本発明の第2のファイル変換装置において、
前記下位の表全体に対応付けられた所定の属性情報に応じて、前記変換後の欄ごとに対応付けられた属性情報を作成する属性情報作成部を備えるものとしてもよい。
【0034】
例えばHTML等において、下位の表の<table>タグ内部の属性情報を、変換後の各欄の<td>タグ内部に転写するものとしてもよい。
【0035】
このようにすることで、下位の表の欄と当該属性情報との対応付けを、変換後のファイルにおいても維持することができる。
【0036】
本発明の第2のファイル変換装置において、
前記属性情報作成部は、前記表の大きさに係る前記属性情報を除いて、前記作成を行うものとしてもよい。
【0037】
このようにすることで、変換後のデータの冗長性を少なくしたり、変換後のデータの文法上の違式を防いだりすることができる。表の大きさに係る属性情報は、表全体に対応付けられる場合にのみ利用可能であったり、文法に沿っていたりすることがあるためである。例えば、表全体の横方向のサイズを特定する属性情報については、各欄ごとに対応付けて記憶されても利用価値がない場合がある。
【0038】
本発明の第2のファイル変換装置において、
前記変換に先立って、いずれの前記基本領域もいずれか1つの前記欄と前記対応を有するように、前記欄の大きさの修正と新たな前記欄の追加との少なくとも一方を行う修正部を備えるものとしてもよい。
【0039】
このように、変換処理に先立って上記の修正が行われることで、変換処理を簡便に行うことができる。上記の修正が行われたファイルについての変換処理では、各欄と基本領域との関係を容易に把握できるためである。
【0040】
ファイル変換装置は、例えば、いずれの欄とも対応付けられてない基本領域について、新しく作成した欄や、既存の欄にその基本領域を対応付けるものとしてもよい。既存の欄にその基本領域を対応付ける場合は、その欄の大きさを変更するものであってもよい。また、ファイル変換装置は、1つの基本領域に対応付けられた複数の欄について、特定の1つの欄の他はその対応付けを解除するものとしてもよい。
【0041】
なお、既存の欄に基本領域を対応付ける修正は、その欄に対応付けられた属性データを修正することで行ってもよい。例えば、属性データcolspan等の増加により、その欄の列幅等が修正されるものとしてもよい。また、対応付けを解除する修正は、属性データcolspan等の減少により、欄の列幅等の減少が行われるものとしてもよい。
【0042】
本発明の第2のファイル変換装置において、
前記縦方向又は横方向の少なくとも一方において、前記下位の表の前記幅数と、前記上位の表において該下位の表を含む欄に対する配列数の一方を選択する選択部と、
該選択された数に基づいて、前記幅数及び配列数の少なくとも一方を変更する変更部とを備えるものとしてもよい。
【0043】
このようにすることで、上位の表の欄の大きさを規定する基本領域と、下位の表全体の大きさを規定する基本領域とを共通化させることができる。この結果、下位の表の幅数や上位の表の欄の配列数の変更により、下位の表の各欄の位置や大きさを上位の表の欄内で任意に調整し、上位の表の欄に下位の表を適合することができる。
【0044】
ここに、上位の表の欄の配列数の変更は、上位の表全体の基本領域の幅数を変更するものとなることが望ましい。また、上位の表の欄の配列数の変更は、その欄の<td>タグ内部等に有する、その欄に対応付けられた属性データを変更しないものであってもよい。例えばその欄が、下位の表の欄から変換された複数の欄等の集まりに変換される場合もあるためである。
【0045】
ここで、上述の処理では、幅数又は配列数の大きい方の数が選択されることが望ましい。この場合、上述の「変更」は、選択されなかった側の数を、選択された数そのものに変更するものとしてもよいし、選択された数から所定差だけ大きい数に変更するものとしてもよいし、所定差だけ小さい数に変更するものとしてもよい。ここに所定差は、後で詳述するように、上位の表の欄に含む、当該下位の表以外の情報要素に応じて特定される値であってもよい。例えば、下位の表によりその上側及び下側に2分割される情報要素がある場合には、所定差は2としてもよい。なお、上述の選択は、かかる所定差を考慮しつつ行うものとしてもよい。例えば、配列数及び幅数から配列数が選択されるのは、配列数が幅数よりも2以上大きい場合であるものとしてもよい。
【0046】
本発明の第2のファイル変換装置において、
前記第1のファイルにおける表のデータは、
前記表の開始又は終了を表す表特定タグと、
1つ以上の前記欄の開始又は終了位置を特定する区分タグとを有し、
前記表特定タグと、該表特定タグの直前又は直後の前記区分タグとが囲う情報要素の少なくとも一方を前記表の外部に移動する移動部を備えるものとしてもよい。
【0047】
例えば、HTML等において、<table>又は</table>タグと、そのタグの直後又は直前の<tr>又は</tr>タグの間に存在するデータを、その<table>タグ等が特定する表のデータの外部に移動するものとしてもよい。
【0048】
このようにすることで、下位の表の欄を上位の表の欄に変換する処理を簡便に行うことができる。移動部によるデータ移動後のファイルは、変換処理が容易なものとなっているためである。なお、当該移動は、<table>や</table>等の表特定タグの移動により実現するものとしてもよい。
【0049】
本発明の第2のファイル変換装置において、
前記上位の表の欄には、前記下位の表に含まれないその他の情報要素を含み、前記変換部は、該その他の情報要素を、前記下位の表から変換された欄と異なる、前記上位の表の1つ以上の欄に変換するものとしてもよい。
【0050】
このようにすることで、上位の表の欄に下位の表以外のその他の情報要素を含む場合でも、その情報要素を勘案しつつ、変換前の当該上位の表の欄に相当するデータを第2のファイルに含めることができる。
【0051】
ここで、その他の情報要素は、下位の表の上下左右その他の周辺部に表示されるものであってもよい。この場合、下位の表と、その他の情報要素との位置関係に応じて変換処理が行われることが望ましい。
【0052】
なお、前述の適合処理は、その他の情報要素から変換して生じる欄を勘案して行うことが望ましい。例えば、下位の表の上側及び下側の情報要素を各々2つの欄に変換する場合、上位の表の欄の縦方向の配列数が、下位の表の行幅数に2を加えた数に変更され得るものとしてもよい。このようにすることで、上位の表の欄内で、下位の表と下位の表の上側及び下側の情報要素との位置や大きさを任意に調整することができる。
【0053】
本発明の第2のファイル変換装置において、
前記第1のファイルは、該ファイルの2箇所の所定の属性タグであって、該属性タグが囲む前記情報要素の所定の属性を特定する属性タグを有し、
前記属性タグが囲む情報要素については、前記変換後の欄でも所定の属性タグに囲まれるように、前記変換後の欄の終端及び始端の少なくとも一方に前記属性タグを追加する属性タグ追加部を備えるものとしてもよい。
【0054】
ここに所定の属性タグは、マークアップ言語におけるいわゆる開始タグ及び終了タグであってもよい。例えば、HTMLにおける、表示書体を指定する<b>及び</b>等である。
【0055】
このようにすることで、情報要素を囲む属性タグが、前記変換後の2つの欄のデータに各々分離されてしまうときでも、所望の第2のファイルを得ることができる。例えば、開始タグと終了タグとが異なる2つの欄のデータに含まれるものとなった場合には、開始タグを有するデータの終端に終了タグを置き、終了タグを有するデータの始端に開始タグを追加することが望ましい。なお、1つの欄について、始端への開始タグの追加と、終端への終了タグの追加との両者を行う場合が含まれるものとしてもよい。
【0056】
本発明の第2のファイル変換装置において、
前記第1のファイルは、前記下位の表を含む上位の表の欄に対応付けて、所定の属性を表す属性情報を有し、
前記変換部は、前記属性情報に相当する属性を、前記変換後の欄に与えるものとしてもよい。
【0057】
ここに上位の表の所定の属性タグは、マークアップ言語における<td style=“color:red”>タグにおける属性データ「style=“color:red”」等であってもよい。かかる属性データは、その<td>タグが特定する欄に含む下位の表等の情報要素について、所定の属性を特定する。ファイル変換装置は、それらの情報要素から変換した上位の表の各欄について、「style=“color:red”」等の属性データを各々付すことが望ましい。
【0058】
このようにすることで、上位の表の欄内部の情報要素の属性を、その情報要素の変換後の各欄でも維持することができる。
【0059】
本発明の第2のファイル変換装置において、
前記変換部は、前記上位の表の欄の前記配列数に応じて、前記その他の情報要素に係る変換後の欄の前記配列数を設定するものとしてもよい。
【0060】
このようにすることで、その他の情報要素に係る変換後の欄の位置や大きさを、当該情報要素を含む上位の表の欄の内部で任意に調整することができる。
【0061】
ここに、前述の適合処理等で上位の表の当該欄の列又は行の数が変更された場合には、変更後の数が前記設定に利用されることが望ましい。
【0062】
本発明の第2のファイル変換装置において、
前記変換後の欄に対応付けられる基本領域を、前記配列の縦又は横方向に追加する基本領域操作部と、
前記変換後の欄が前記追加される基本領域に対応付けられるように、前記変換後の欄の前記規定される配列数を調整する対応調整部とを備えるものとしてもよい。
【0063】
ここで、HTML等を扱う場合の基本領域操作部や対応調整部は、colspan等の数値を変更するものとしてもよい。また、基本領域操作部は、<tr>及び</tr>といったタグを追加するものとしてもよい。
【0064】
このようにすることで、変換後の欄の位置や大きさを、上位の表の欄の内部で任意に調整することができる。
【0065】
対応調整部や基本領域操作部は、前述の適合処理に利用するものとしてもよい。例えば、選択部が下位の表の幅数を選択する場合に、基本領域操作部による追加処理が利用されるものとしてもよい。
【0066】
本発明の第2のファイル変換装置において、
前記基本領域操作部は、前記変換より過去の前記変換に係る欄を含む表について前記追加を行い、
該追加に応じ、前記過去の変換に係る欄の前記基本領域との前記対応を再設定する再設定部を備えるものとしてもよい。
【0067】
このようにすることで、追加処理に応じて生じた自由度の増加に応じて、過去の変換に係る欄の基本領域との対応付けを再設定することができる。欄と基本領域との対応付けの自由度は、追加処理に応じて増加する。
【0068】
過去の変換に係る各欄は、前述の適合処理等を通じて、上位の表の基本領域に各々対応付けられている。再設定部等を備えるファイル変換装置によれば、前記追加処理が行われた場合に生じる基本領域の自由度の増加に応じて、過去の変換に係る欄の基本領域との対応付けを再設定することができる。
【0069】
ここで、上記再設定は、下位の表の最左欄のデータについて行われるものとしてもよい。例えば、最左欄からの変換後の欄に対応付けられた基本領域の個数を減少させるものであってもよい。最左欄が見出し欄のみである表等では、最左欄に対応する基本領域は相対的に少ない方が望ましいときがあるためである。
【0070】
なお、下位の表の欄から変換された上位の表の欄は、さらなる変換処理により、更に上位の表の欄に変換され得る。この場合における、前記更に上位の表の前記追加処理に応じた前記再設定も同様である。直接の下位の表では最左欄ではないが、さらに下位の表においては最左欄であった欄についても同様である。
【0071】
本発明の第2のファイル変換装置において、
前記下位の表のデータを表すタグ及び、該表の1つ以上の欄を表すタグの少なくとも1つを削除するものとしてもよい。
【0072】
このようにすることで、下位の表のデータを、表を表現するデータでないものとすることができる。ここに、削除されるタグは、HTML等における<table>,</table>,<tr>,</tr>の各タグの少なくとも一部を含むものとしてもよい。
【0073】
本発明の第2のファイル変換装置において、
前記変換部は、前記下位の表の欄ごとに、
該下位の表の欄が該下位の表のうちで占める位置と、
該下位の表が前記上位の表の欄のうちで占める位置と、
前記上位の表の欄が前記上位の表のうちで占める位置との少なくとも1つに応じて、
該下位の表の欄のデータを、前記上位の表のデータにおける所定の部位に移動させるものとしてもよい。
【0074】
このようにすることで、変換後の欄を、変換前の欄に相当するものとして記憶することができる。具体的には、変換前のその欄の位置に応じて記憶することができる。
【0075】
なお、変換後のファイルの所定の表示を行った場合には、変換前の下位の表全体に相当する表示が含まれるものとしてもよい。例えば、変換前の下位の表の各欄に相当する表示等が全体としてまとまって、変換前の下位の表全体に相当する表示を構成するものとしてもよい。
【0076】
本発明は、上述のファイル変換装置としての構成の他、ファイルの変換方法の発明として構成することもできる。また、かかる方法を実現するコンピュータプログラム、およびそれらのプログラムを記録した記録媒体、それらのプログラムを含み搬送波内に具現化されたデータ信号など種々の態様で実現することが可能である。
【0077】
本発明をコンピュータプログラムまたはそのプログラムを記録した記録媒体等として構成する場合、記録媒体としては、フレキシブルディスクやCD−ROM、光磁気ディスク、ICカード、ROMカートリッジ、パンチカード、バーコードなどの符号が印刷された印刷物、コンピュータの内部記憶装置(RAMやROMなどのメモリ)および外部記憶装置などコンピュータが読みとり可能な種々の媒体を利用できる。
【0078】
【発明の実施の形態】
以下、本発明の実施の形態について、実施例に基づき以下の順序で説明する。
A.全体構成:
A1.ファイル変換装置:
A2.マークアップ言語:
A3.機能ブロック構成:
B.簡易変換:
C.表の変換処理:
C1.全体の流れ:
C2.ブロックへの変換:
D.マージ処理:
D1.準備処理:
D2.統合処理:
D2a.上位の表に作成する欄の把握:
D2b.下位の表の欄の行数等の増加:
D2c.基本領域の追加:
D2d.属性情報の調整:
D2e.各欄のデータの移動:
D3.見直し処理:
E.第2実施例:
【0079】
A.全体構成:
A1.ファイル変換装置:
図1は、ファイル変換装置100を示す説明図である。ファイル変換装置100は、所定のファイル変換ソフトウェアを実行するパーソナルコンピュータにより構成される。なお、ファイル変換装置100は、所定の変換ソフトウェアを実行する種々の装置として構成可能である。例えばファイル変換装置100は、プリンタやテレビのチューナであるものとしてもよい。また、ファイル変換装置100は、所定の変換ハードウェアを備えるものとしてもよい。
【0080】
ファイル変換装置100は、HTMLのファイルを、所定のLHTML(Light HTML)のファイルに変換する機能を有する。ここに、LHTMLは、簡潔な処理となるようタグの種類や、データの構造を制限したマークアップ言語である。例えば、HTMLでは入れ子構造の表が認められているのに対し、LHTMLでの表は入れ子構造が認められていない。
【0081】
ファイル変換装置100は、種々の内容のHTMLのファイルを、LHTMLのファイルに変換する。変換されたLHTMLのファイルは、携帯電話等の携帯端末のように処理能力の低い装置で表示されたり、印刷装置へ印刷を依頼する場合に利用されたりする。
【0082】
A2.マークアップ言語:
図2は、HTMLのファイルの一例を示す説明図である。図2では、上段にHTMLのファイルのデータ構成を示し、下段にそのファイルが表現する表を概念的に示した。図2では、下段で示すように、下位の表130が上位の表120に含まれる入れ子構造について示している。
【0083】
図2では、HTMLのファイルを行ごとにNo.を付して示した。HTMLでは、<table>及び</table>の開始・終了タグにより表を表現する。図2でNo.1〜13のデータは、1つの表120を表現する表のデータである。ここで、図2の表120は、欄A1,A2,Bを有する。ここに、欄Bは実線で示す領域により構成されている。なお、No.1の<table>タグに付された属性データ「style=“text−decoration:underline”」(図中では「underline」により簡略化して図示)については後述する。
【0084】
HTMLでは、<tr>及び</tr>のタグで囲って横方向のデータ(以下「行のデータ」と呼ぶ)が特定される。表120において1行目は欄A1,A2より構成され、2行目は欄Bより構成される。図2の上段のデータにおけるNo.2〜11及びNo.12のデータは、表120の2つの行のデータである。各データはその順序(上から下)に応じて表のデータの内部に配列される。
【0085】
また、HTMLでは、<td>及び</td>の開始タグ及び終了タグで囲って表の各欄のデータが特定される。各欄のデータは、欄の順序(左から右)に応じて、<tr>等が特定する各行のデータ内部に配列される。図2の上段のデータの場合、欄A1,A2のデータは各々No.3〜9及びNo.10に配列されており、欄BのデータはNo.12内に存在する。なお、図2では、欄の内容の表示要素としてその欄の名前を付している。
【0086】
欄A1のデータには、No.5〜8に入れ子の下位の表130のデータを含む。このため下段の図においても、上位の表120の欄A1の内部には下位の表130が含まれている。下位の表130のデータは、上位の表120のデータと同様に、行ごとに、欄m1,m2及び欄n1,n2のデータを配列して構成されている。
【0087】
HTMLの表は、縦方向及び横方向に1つ以上配列された基本領域を有する。図2の上位の表120では、方眼状に縦横に配列された基本領域a1,a2,b1,b2を有する場合を示した。図2では、横方向に2個、縦方向に2個の幅数で基本領域が各々配列されている。横方向に並んだ基本領域a1,a2及び基本領域b1,b2は各々1つの行を構成する。また、縦方向に並んだ基本領域a1,b1及び基本領域a2,b2は各々1つの列を構成する。
【0088】
表の各欄は各々1つ以上の基本領域と対応付けられている。図2の場合、欄A1とA2とは各々基本領域a1とa2と対応付けられている。また、欄Bには基本領域b1,b2の2つの基本領域が対応付けられている。
【0089】
ここで、属性データcolspanについて説明する。図2の欄Bのデータにおいては、<td>タグ内部に「colspan=2」なる属性データが含まれている。これは、欄Bを2列の基本領域b1,b2に対応付ける旨を指定するデータである。また、欄A1,A2のデータではcolspanの属性データが省略されている。かかる場合、ファイル変換装置100は、「colspan=1」が省略されているものとして取り扱う。
【0090】
横方向の列幅についての属性データcolspanと同様に、属性データrowspanは縦方向の行幅の指定に利用される。例えば、属性データ「rowspan=2」を<td>タグ内部に付すことで、その<td>タグの欄を縦方向に2行の基本領域と対応付けることができる。
【0091】
HTMLでは、このようにして表の各欄の行幅・列幅が規定されることで、表全体の行幅・列幅が規定されることとなる。
【0092】
なお、HTMLのタグ内部では大文字と小文字で原則区別がない。例えば、<table>と<TABLE>は同じデータである。そこで、以下の説明で参照する図面中では、HTMLのデータの特定部分について、大文字を利用して図示する場合がある。
【0093】
なお、LHTMLは、表を表現できる点でHTMLと同様であるが、入れ子の表が許されない点でHTMLと相違する。なお、以下で特に説明する文法以外については、LHTMLは原則的にHTMLと同様のマークアップ言語であるものとして説明する。
【0094】
A3.機能ブロック構成:
図1には、ファイル変換装置100が実現する機能ブロック構成を併せて示している。ファイル変換装置100はファイル変換ソフトウェアを蓄積している。図示する各機能ブロックは、ファイル変換装置100がファイル変換ソフトウェアを実行することでソフトウェア的に実現するものである。なお、図示する機能ブロックの全部又は一部はハードウェア的に実現しても構わない。
【0095】
ファイル入力部101は、HTMLのファイルを入力する。前述の通り、HTMLのファイルには入れ子になった表のデータを含む。
【0096】
ユーザ入力部102は、ファイル変換装置100に備えられたキーボード100cやリモコン等の入力装置により種々のコマンドを入力する。
【0097】
表処理部106は、入れ子のある表を、入れ子のない表に変換する。表処理部106は、かかる変換を行うために、構造特定部107とタグ操作部108とデータ移動部109とを有し、これらを利用して変換を行う。
【0098】
構造特定部107は、HTMLファイルが有する入れ子の表の構造を特定する。例えば、<table>〜</table>の開始・終了タグで囲われた表全体のデータや、<tr>〜</tr>で囲われた行のデータや、<td>〜</td>で囲われた1つの欄のデータを特定する。また、構造特定部107は、これらの開始・終了タグが特定するデータ相互の関係を特定することができる。例えば、図2の場合において、No.1の<table>タグに対応する表120の内部に含まれる表のタグとして、No.5の<table>タグを特定することができる。
【0099】
タグ操作部108は、タグの削除・追加・修正その他のタグ操作を行う。ここで、タグの内部には、所定の属性を表す属性データが含まれる場合がある。例えば、表の内部の文字に下線を付したい場合に、「style=“text−decoration:underline”」なる属性データを含めた<table style=“text−decoration:underline”>なるタグを利用することができる(図2の表120参照:図2では図示の便宜上から属性データを「underline」により簡略化して図示)。タグ操作部108は、属性データの削除・追加・修正を行う機能も有する。
【0100】
データ移動部109は、ファイル内部でデータを移動する機能を有する。具体的には、後述のように、下位の表130の各欄のデータを、上位の表120のデータにおける所定の部位に移動させる機能を有する。
【0101】
文法記憶部105は、HTMLの文法を記憶する。前述の表処理部106と、表処理部106が有する構造特定部107等は、文法記憶部105の記憶内容を参酌しつつ前述の各種の処理を行う。
【0102】
基本処理部104は、表処理部106によって入れ子が展開されたファイルに種々の処理を行うことで、LHTMLへの変換を最終的に完了させる。例えば基本処理部104は、HTMLの各タグや属性データごとに、タグ等の削除や変更等の処理を行う。一例を挙げると、背景色指定を行うHTML形式の属性データbgcolor=“green”を、LHTML形式の属性データstyle=background−color:greenに変更する。また、斜体文字を指定する<i>及び</i>等のタグについては<span style=“font−style:italic;”>及び</span>に変更する。なお、処理規則記憶部103は、基本処理部104が上述の各種の処理を行うための処理規則を記憶している。
【0103】
基本処理部104によりLHTMLへの変換が完了されたファイルは、出力部110により出力される。ここに、出力部110は、LHTMLのファイルを放送してもよいし、印刷依頼のために印刷装置に送付してもよいし、画面等へ出力してもよいし、ファイル変換装置100が備えるデータ記憶装置等への記憶を行うものとしてもよい。また、ファイル変換装置100はネットワークを介してファイル変換を行うサーバであり、出力部110は変換依頼を行ったクライアントへのファイル返送等を行うものとしてもよい。
【0104】
なお、実施例で基本処理部104は、説明の便宜上、表処理部106が処理した結果のファイルを処理対象にするものとしたが、かかる場合に限定されることはない。例えば、基本処理部104の上述のタグ変更等の処理の全部又は一部は、表処理部106が処理を行う前に行われるものとしてもよい。
【0105】
B.簡易変換:
図3は、簡易変換処理を示すフローチャートである。表処理部106は、入れ子の表の変換にあたり、図3に示す簡易変換処理と、後述の図5で示す表の変換処理とを選択的に実行する。ユーザは、いずれの処理を行うかを指定することができる。以下では、図2のファイルを対象に簡易変換処理を行う場合について説明する。
【0106】
ステップSa1でファイル変換装置100はHTMLのファイルを入力する。ステップSa2では入力されたファイルの表の最上位の表とその欄を特定する。図2の場合、表120と、表120の欄A1,A2,Bとを各々特定する。
【0107】
図4は、簡易変換処理で特定された各欄を示す説明図である。図4では、図3のステップSa2で特定された表120の欄A1,A2,Bが各々示されている。ここに図4は、図2のデータについての簡易変換処理を示したものである。図4の上段には簡易変換処理が施されたデータの状態を概念的に示し、また、図4の下段にはそのデータの具体的内容を示している。
【0108】
ステップSa3でファイル変換装置100は、表120の<table>,</table>,<tr>,</tr>の各タグを削除するとともに、<tr>及び</tr>を<div>及び</div>に変更する。<div>及び</div>は、内部に囲む表示要素を、1つのまとまったブロックとして表現するタグである。図4の下段では、削除された<table>,</table>,<tr>,</tr>の各タグに取消し線を付し、変更されたタグについては大文字を利用してこれを示した。
【0109】
ステップSa4でファイル変換装置100は、表120の<table>タグ120t内部の属性データを、各欄の<div>タグの内部に転写する。図2の場合、「style=“text−decoration:underline;”」なる属性データ(図中では「underline」により簡略化して図示)が表120の<table>タグ120tの内部に含まれるため、この属性データが欄A1,A2,Bの各欄の<div>タグ内部に転写される。
【0110】
ただし、表120の全体にわたるサイズを特定する属性データ等については、転写を行わない。例えば、HTMLにおける<table>タグ内部のwidthやheightなどの属性データである。なお、実施例では説明の便宜上、ステップSa3の後にステップSa4を行うものとしたが、この順序は入れ替えてもよい。
【0111】
ステップSa5でファイル変換装置100は、各ブロックの表示位置について、ユーザによる指定を入力する。図2では、欄A1,A2,Bについて各々、(0,0)と(4,0)と(0,3)との座標が指定された場合について示した。ファイル変換装置100は、それぞれの座標を、各<div>タグの内部に属性データとして付加する。
【0112】
図4では、指定された表示位置に基づき、欄A2の<div>タグ内部に、そのブロックの表示位置を特定するための属性データ「style=“left:4;top=0;”」(図中では図示の便宜上から「pos=4.0」により簡略化して図示)が付加されている。その他の欄に付加された属性データについても同様である。また、図4では図示の便宜上「style=“left:X座標;top:y座標」なる属性データにより表示位置を指定するものとしたが、より詳細に指定するものとしてもよい。例えば、絶対座標又は相対座標のいずれで指定を行うかの別を表すデータや、座標の単位を表すデータを含むものとしてもよい。
【0113】
なお、位置の指定は、エディッタ等によりファイルの内容をユーザが直接変更するものとしてもよい。このとき、ファイル変換装置100は、HTML等におけるコメント文の利用等により、属性データを追加すべき部位をユーザに視覚的に示すものとしてもよい。また、ファイル変換装置100は、単なるエディッタを利用したインタフェースでなく、実際の表形式の表示態様が示されるGUI(Graphical User Interface)を提供するものとしてもよい。
【0114】
図3の簡易変換処理は1つのファイルに対して繰り返し行われるものとしてもよい。例えば、図4の状態において、さらに、下位の表130に対して簡易変換処理が行われるものとしてもよい。
【0115】
C.表の変換処理:
C1.全体の流れ:
図5は、表の変換処理を示すフローチャートである。
ステップSb1でファイル変換装置100は、ファイルに入れ子の表があるか否かを調べる。入れ子になった表があれば、ステップSb2以下の処理が実行される。ステップSb2では、入れ子になった表のうち最下位の表を特定する。最下位の表とは、更にその内部に別の表を含まない表をいう。
【0116】
図6は、入れ子になった表の一例を示す説明図である。図6では、欄A1,A2,B1,B2を有する表Iが存在する。表Iの欄A1は表IIを含み、欄B2は表IIIを含む。また、表IIは欄m1n1と欄m2と欄n2とを有し、欄m1n1は表IVを有する。図6の状態で表III,IVは最下位の表である。
【0117】
ファイルが図6の状態である場合、図5のステップSb2の処理でファイル変換装置100は、表III又は表IVを最下位の表として特定する。
【0118】
ステップSb3及びステップSb4〜Sb6でファイル変換装置100は、ステップSb2で特定された最下位の表をその上位の表に統合する。ステップSb4,Sb5,Sb6の内容は後述する。
【0119】
ファイル変換装置100の処理は、ステップSb3〜Sb6における統合処理の後、再びステップSb1の処理に戻り、入れ子の表が残っている限りステップSb2以下の処理を繰り返し行う。例えば、図6の場合において、表IVが表IIに統合された後は、表Iの欄A1に表IIが統合される。
【0120】
表の変換は、必ずしも最下位の表から順次行う必要はない。例えば、図6の場合でも、表IVを内部に有する表IIをそのまま表Iに統合するものとしてもよい。このとき、欄m1n1が、内部に表IVを有する状態で表Iに統合されるものとしてもよい。
【0121】
C2.ブロックへの変換:
図5のステップSb3でファイル変換装置100は、入れ子の上下の表の列幅が1か否かを調べる。下位の表の列幅が1であれば、下位の表のブロック変換(ステップSb4)を実行する。入れ子の下位の表の列幅が1でなく、上位の表の列幅が1であれば、上位の表のブロック変換(ステップSb5)を実行する。入れ子の上下位の表が共に列幅2以上であれば、マージ処理(ステップSb6)を実行する。
【0122】
図7は、下位の表のブロック変換の処理を示す説明図である。これは、図5のステップSb4における処理を示したものである。上段では処理前のファイルの状態について、下段では処理後のファイルの状態について各々示した。
【0123】
下位の表130は列幅が1であるため、図5のステップSb4の処理に付される。この結果、下位の表130の欄m,nは、下段に大文字で示す通り、<div>及び</div>により特定される2つのブロックに各々変換される。この変換は、前述の簡易変換処理(図3,4参照)と同様の処理で行うことができる。
【0124】
図8は、上位の表のブロック変換の処理を示す説明図である。これは、図5のステップSb5における処理を示したものである。上段には変換前の状態を、下段には変換後の状態を各々示した。上位の表120は列数が1であるため、図5のステップSb5の処理に付される。この結果、上位の表120の欄A,Bは、下段に示す通り2つのブロックに変換されている。この変換は図7の場合と同様に行うことができる。なお、図8では上位の表120が、さらに上位の表120xに含まれる場合について示したが、表120が最上位の表である場合も同様である。
【0125】
D.マージ処理:
図5のステップSb6では、入れ子の下位の表130を上位の表120へマージする。マージ処理では、下位の表130を各欄毎に展開し、上位の表120の欄として再構成する処理を行う。以下、係る処理を、単に下位の欄から上位の欄への変換と呼ぶことがある。
【0126】
図9は、マージ処理を示すフローチャートである。
ステップSc1では、ステップSc2の統合処理のための準備を行う。ステップSc2では統合処理、即ち、下位の各欄を上位の欄に変換する処理を行う。ステップSc3では、過去の統合処理の見直しを行う。各処理の詳細を示すフローチャートは図10,14,22に示してものである。以下、図10〜13,14〜21,22〜23を各々参照しつつ、ステップSc1,Sc2,Sc3の処理を説明する。
【0127】
D1.準備処理:
図10は、準備処理を示すフローチャートである。これは図9のステップSc1の処理である。
図10のステップSd1でファイル変換装置100は、下位の表130について、<table>タグと、その<table>タグの直後の<tr>タグとの間に文があるか否かを調べる。かかる文が存在する場合、ステップSd2で所定の移動処理を行う。
【0128】
図11は、移動処理を示す説明図である。上段には処理前の状態を示し、下段には処理後の状態を示した。図11の上段の左側図のデータおいて、下位の表130の<table>タグ141と、<table>タグ141の直後の<tr>タグ142との間には、「天気予報」という文140が存在する。文140は移動処理の対象の文であり、図10のステップSd2における移動処理に付される。図11の上段の右側の概念図で示すように、かかる文140は、下位の表130の前の表示要素として取り扱われる。
【0129】
図11の下段に示すように、ステップSd2の移動処理では、かかる文140を、表130の外へ移動する。ただし、<caption>タグから</caption>タグまでのデータのように、<table>〜</table>タグの内部で本来的に必要なデータは移動しない。図11の下段左側図の移動対象の文140のように、ファイル中で移動先の部位は、文140を含む表の<table>タグ141の直前である。なお、かかる移動は、<table>タグ141を移動することで実現するものとしてもよい。また、</tr>及び</table>の間の文を</table>の直後に移動してもよい。
【0130】
次に図10のステップSd3でファイル変換装置100は、基本領域を共有する2つの欄が存在するか否かを調べる。かかる2つの欄が存在する場合、ステップSd4で共有解消の処理を実行する。ここに、基本領域を共有する2つの欄とは、1つの基本領域に対応付けられた2つの欄を意味する。
【0131】
図12は、基本領域の共有解消処理を示す説明図である。上段には処理前の状態を示し、下段には処理後の状態を示している。図12で各基本領域は、破線により区分される各領域a1,a2,b1,b2である。また、図12の表は、基本領域a2,b2で構成される欄αと、基本領域b1,b2で構成される欄βとを有する。また、欄α及び欄βに対応付けられた基本領域の範囲については、各々、ハッチングによりこれを示している。
【0132】
図12上段の欄α,βは基本領域a2を共有している。図12の下段に示したように、図10のステップSd4では、欄βのcolspanを1に減少させることにより基本領域の共有を解消する。図12では欄βについて修正を行う場合について例示したが、欄αのrowspanを修正対象としてもよいし、いずれを修正対象とするかユーザが選択可能としてもよい。
【0133】
次に、図10のステップSd5でファイル変換装置100は、いずれの欄にも対応付けられていない基本領域(以下、未対応基本領域と呼ぶ)があるか否かを調べる。未対応基本領域がある場合にはステップSd6で欄の追加を行う。
【0134】
図13は、欄追加処理を示す説明図である。上段には処理前の状態を示し、下段には処理後の状態を示した。図13の上段では、基本領域b3に対応付けられた欄は存在しないため、基本領域b3は未対応基本領域となっている。図13の下段に示すように、図10のステップSd6の欄追加処理では、かかる基本領域b3に対応付けた欄B3を作成する処理を行う。図13では、欄B3を追加するために新たに作成した<td>及び</td>タグを大文字で示した。欄B3は全く表示要素を含まないダミーの欄としてもよいし、何らかの表示要素を含むものとしてもよい。
【0135】
図13で説明した処理(図10のステップSd6)の態様には種々のものを適用することが可能である。例えば、欄Bの追加処理に代えて、欄A3のrowspanや欄B2のcolspanの修正処理が行われるものとしてもよい。かかる修正処理により、未対応基本領域b3を、欄A3又は欄B2に対応付けられたものとすることができる。
【0136】
また、図12,13で説明した処理(図10のステップSd3,Sd4,Sd5,Sd6)の態様には種々のものを適用することが可能である。例えば、全ての基本領域が、各々唯一の欄と対応付けられている状態に近づける修正を行う種々の処理を適用し得る。
【0137】
D2.統合処理:
図14は、統合処理を示すフローチャートである。これは、図9のステップSc2の処理である。この処理により、下位の表130の欄を上位の表120の欄に変換する処理が行われる。
【0138】
D2a.上位の表に作成する欄の把握:
図14のステップSe1でファイル変換装置100は、変換後の欄構成を把握する。
図15は、欄構成の把握の一例を示す説明図である。図15で上段の図は変換前の下位の表130等の状態を示し、下段の図は変換後の欄構成を示している。
【0139】
図15の上段の図で欄121は、入れ子の上位の表の1つの欄でありり、下位の表130を含んでいる。欄121には、下位の表130の前段の表示要素、下位の表130、及び下位の表130の後段の表示要素が含まれる。下位の表130は、欄M1,M2,Nの3つの欄を有する。
【0140】
ファイル変換装置100は、下段に示す通り、下位の表130を、上位の表の3つの欄130cとして構成すべきと把握する。またファイル変換装置は、3つの欄130cと別に、前段の表示要素及び後段の表示要素に応じて、欄300,301を各々構成すべきものと把握する。ここに、変換前における上位の欄121は、前段及び後段の表示要素の欄300,301と3つの欄130cとの全体に変換される。なお、ファイル変換装置100は、前段の表示要素に応じた欄300の</td>と、後段の表示要素に応じた欄301の<td>を各々を追加する。
【0141】
D2b.下位の表の欄の幅数等の増加:
図14のステップSe2,Se3,Se4,Se5の処理でファイル変換装置100は、欄121の列幅と、下位の表130全体の基本領域の列幅とをそろえる適合処理を行う。また、欄121の行幅についても同様に下位の表130の基本領域の行幅をそろえる適合処理を行う。
【0142】
図14のステップSe2でファイル変換装置100は、欄121の列幅が下位の表130の列幅より大きい場合に、下位の表の幅数増加が必要と判断し、ステップSe3での幅数の増加処理を実行する。
【0143】
図16は、下位の表130の幅数を増加する処理例を示す説明図である。これは、図14のステップSe3における処理について示したものである。図16で、上段には処理前の状態を、下段には処理後の状態を各々示した。
【0144】
図16の上位の欄121はcolspan=3であり、図中に破線で示した3列の基本領域と対応付けられている。これに対し、下位の表130の列幅数は2である。かかる場合、図14のステップSe3の処理により、下位の表130の列幅が、下段の一点鎖線で示すように2から3に増加される。表130の列幅の修正は、各欄M2及び欄Nのcolpsnを増加させることで行われる。
【0145】
また、図14のステップSe3においてファイル変換装置100は、下位の表130の列幅の増加と同様に、前段及び後段の各表示要素の各欄300,301に属性データ「colspan=3」を設定する。このようにすることで、各欄の列数を、欄121の列数に適合させることができる。
【0146】
上述の例では、下位の表130の最左端の欄M1のcolspan等は変更しないものとしたが、かかる場合に限定されることはない。また、下位の表130の列幅を2以上増加させるときには、例えば欄M1及びM2の両者のcolspanが変更されるもの等としてもよい。
【0147】
上記と同様にファイル変換装置100は、上位の欄121の行幅が、ステップSe1で把握した変換後の各欄の合計行幅より大きい場合(ステップSe2)、変換後の欄の行幅を増加する処理を行う(ステップSe3)。図16では、上位の欄121の行幅(rowspan=5)が、合計行幅1+2+1=4よりも大きい場合の処理例を示した。ここで、行幅の修正対象は、前段の欄300でもよいし、後段の欄301でもよいし、欄M1等でもよい。また、複数の欄が修正対象とされてもよい。
【0148】
D2c.基本領域の追加:
次に図14のステップSe4,Se5の処理について説明する。ファイル変換装置100は、欄121の列幅が下位の表130の列幅より小さいと判断される場合(図14のステップSe4)に、ステップSd5で、上位の表120に対する基本領域追加処理を実行する。
【0149】
図17は、上位の表に基本領域を追加する処理例を示す説明図である。これは、図14のステップSe5での処理について示したものである。図17において、上段では処理前の状態を、下段では処理後の状態を各々示した。
【0150】
図17の場合には、下位の表の列幅数3は、上位の欄121の列幅2よりも大きい。このためファイル変換装置100は、図17の下段に示すように、上位の欄121の属性データcolspanを3に増加する。なお、ファイル変換装置100は、上位の欄121のcolspanの増加と併せて、前段及び後段の表示要素の欄300,301のcolspanの増加を行う。
【0151】
ファイル変換装置100は、同様に、上位の欄121の行幅が前述の合計行幅より小さい場合にも(図14のステップSe4)、上位の表120への基本領域の追加を行う(ステップSe5)。図17では、欄121のrowspanを3から4に増加することで、上位の欄121の行幅を合計行幅1+2+1=4に一致させる場合を示した。
【0152】
図18は、基本領域追加処理のうちで、欄121周辺の欄に係る部分を示す説明図である。ファイル変換装置100は、図14のステップSe5における基本領域追加処理で、欄121の周辺の欄のcolspan等の変更も併せて行う。図18で上段には追加前の状態を、下段には追加後の状態を各々示した。
【0153】
変更前の状態で上位の欄121は列幅2、行幅3である。欄121の下には、欄αを含む、列幅1の2つの欄125が存在する(図中の一点鎖線枠)。また、欄121の左側には欄βを含む、行幅1の3つの欄126が存在する(図中の破線枠)。
【0154】
ここで、先に説明したステップSe5の処理により、欄121が列幅3、行幅4にそれぞれ増加させるものとする。このときファイル変換装置100は、図18の下段に示すように、欄121のcolspan等の変更と併せて、欄αのcolspan及び欄βのrowspanを各々2に増加させる。なお、図18では、欄125の最右欄α及び欄126の最下欄βを修正対象とする場合について示したが、かかる場合に限定されることはない。修正対象の欄は任意に選択可能である。
【0155】
図18の下段には、変更後のデータの具体的構成を併せて示した。欄125に対応するデータの範囲はデータ範囲125dである。また、欄126に対応するデータの範囲は、データ範囲126dである。ここに、データ範囲126dは中抜きの部分(欄121に対応するデータ)を除いた範囲である。ファイル変換装置100は、データ範囲125d,126dに含まれる各欄のデータのうちから、各々、欄α及び欄βのデータを各々特定し、colspan及びrowspanをそれぞれ変更する。なお、欄βのrowspanを増加するときには、文法上の制約により、図18の概念図及びデータ構成図において大文字で示した<tr>及び</tr>タグの追加が行われる。
【0156】
以上、図14のステップSe1〜Se5の説明を終えた。これらの処理により、ファイル変換装置100は、下位の表130等からの変換後の各欄の位置や大きさを上位の欄121内で調整することができる。変換後の各欄等の合計行幅及び合計列幅と、上位の欄121の行幅及び列幅との適合がとられる。
【0157】
D2d.属性情報の調整:
次にファイル変換装置100は、属性データの調整を行う(図14のステップSe6)。調整対象となる属性データとしては、(i)終了タグで構成される属性データ;(ii)able>タグ内部の属性データ;(iii)上位の欄121の<td>タグ内部の属性データ;が挙げられる。
【0158】
図19は、開始タグ及び終了タグの追加を示す説明図である。上段には追加前のファイルの状態について、下段には追加後のファイルの状態について各々示した。ここで、<u>及び</u>の開始・終了タグは、間に囲む表示要素にアンダーラインを付すべき旨を特定するタグである。図19の上段の例では、<u>及び</u>で囲まれる範囲、即ち前段の表示要素の後半部分と、後段の表示要素の前半部分とにアンダーラインが付される。
【0159】
図14のステップSe6でファイル変換装置100は、変換後の各欄でもアンダーラインが適切に付されるように、</u>及び<u>の追加を行う。前段の表示要素を含む欄300では、開始タグ<u>に対応する終了タグ</u>を欄の終端部に追加する。後段の表示要素を含む欄301では、終了タグ</u>に対応する開始タグ<u>を欄の始端部に追加する。なお、図19では<u>及び</u>を例にとって説明したが、ファイル変換装置100は、開始タグと終了タグで囲む形で特定される種々の属性について同様の処理を施す。
【0160】
次に、下位の表130の<table>タグが有する属性データの転写について説明する。これは、前述の簡易変換処理における「style=“text−decoration:underline;”」の転写(図4参照:ただし、属性データは「underline」により簡略化して図示していた)と同様の処理である。図19では、下位の表130の<table>タグが有する属性データ「style=“text−decoration:underline;”」を、変換後の各欄130cの<td>タグの属性データ「style=“text−decoration:underline;”」に転写する例を示した。ここに図19では、図示の便宜上から、属性データ「style=“text−decoration:underline;”」を「underline」により簡略化して示している。
【0161】
次に、上位の欄121の<td>タグ内部の属性データの転写について説明する。この場合の転写については、図15に一例を示している。図15では、上位の欄121の<td>タグの属性データ「style=“text−decoration:underline;”」が、変換後の各欄300,301の<td>タグ内部に転写される場合について示した。ただし図中では、図示の便宜上から、属性データ「style=“text−decoration:underline;”」を「underline」により簡略化して示している。上位の欄121の属性データの転写の場合は、前段及び後段の表示要素の変換後の欄300,301への転写を行う。
【0162】
上述した属性の転写処理において、<table>タグ内部のwidthやheight等、下位の表130や、上位の欄121の全体にわたるサイズを特定するの属性データについては転写を行わない。なお、<table>タグ内部等の属性データが特定する表130の全体にわたるサイズ等を勘案して、変換後の各欄の個々のサイズを特定する属性データを付すものとしてもよい。
【0163】
D2e.各欄のデータの移動:
以上で説明した処理によりcolspanの調整等が行われただけでは、マークアップ言語の文法の規約上、変換後の各欄の位置・配列等は、変換前の下位の表130の各欄等の位置・配列と大きく異なるものとなってしまったり、文法上の異式が生じてしまったりする。図14のステップSe7でファイル変換装置100は、変換前の位置・配列に相当する位置・配列を実現するように、マークアップ言語の文法規約に応じて、各欄のデータをファイル内の所定の部位に移動する。
【0164】
図20は、データの移動処理を示すフローチャートである。移動処理は、図14のステップSe7で行われる処理である。
また、図21は、移動処理の処理例を示す説明図である。図21において、上段には移動前のファイルの状態を、下段には移動後のファイルの状態を各々示した。
【0165】
図21の上段の概念図において、統合対象の下位の表130は欄(2)〜(5)より構成される。これらの各欄に応じて上位の表120に作成される欄が、下段の概念図における表120内部のII,VI,V,VIIIの各欄である。また、上段の概念図における上位の表120は欄(1),(6),(7),(8)、及び、下位の表130を有する欄121を有する。欄(1),(6),(7),(8)は、変換後における下段の概念図では各々欄I,III,IV,VIIに相当する。
【0166】
なお、以下では、上位の欄121における前段及び後段の表示要素(図15参照)については考えないものとして説明を行うが、これらの表示要素からの欄300,301を上位の表120に生成する場合も同様である。
【0167】
移動前のファイルにおけるデータ構成図で示すように、欄(1)〜(8)のデータは、この順序で配列されている。ファイル変換装置100は移動後のファイルにおいて、欄(1)〜(8)のデータを、図21下段における欄I〜VIIIの順序で配列する必要がある。上段の欄の記号を用いて表現すれば、(1)→(2)→(6)⇒(3)→(4)→(7)⇒(8)→(5)の順序となる。
【0168】
下位の表130の各欄(2)〜(5)のデータについては、移動前のファイルではひとまとまりに隣接して<table>及び</table>に囲まれている。しかし、移動後のファイルでは、ひとまとまりとなって隣接していない。例えば下位の表130の欄(2)(すなわちII)及び欄(3)(すなわちIV)のデータの間には欄(6)(すなわちIII)のデータが存在する。
【0169】
ただし、移動前のファイルにおける欄(2)と、(3)及び(4)と、(5)との3つのデータ集合d2,d34,d5は、各データ集合ごとに、移動後のファイルでもひとまとまりとなっている。
【0170】
図20のステップSf1でファイル変換装置100は、下位の表130の各<tr>及び</tr>に囲まれたデータ集合d2,d34,d5を特定する。
【0171】
次にステップSf2でファイル変換装置100は、移動対象の各データ集合毎に、そのデータ集合の移動先の部位を特定する。図21でデータ集合d2,d34,d5の移動先の部位は各々、上位の表120の行のデータ151,152,153の内部における部位P2,P34,P5である。
【0172】
移動先の部位の特定のためファイル変換装置100は、まず、上位の表120の行のデータ151,152,153を特定する。ファイル変換装置100は、欄121のデータ121dがデータ151の内部に存在することに基づいて、このデータ151から始まる3つのデータ151,152,153を移動先として特定することができる。3つの行としたのは、移動対象のデータ集合d2,d34,d5が3つだからである。
【0173】
ここで、データ151の内部には、上位の表120の欄(1)及び(6)が含まれている。また、データ152には欄(7)のデータが含まれ、データ153には欄(8)のデータが含まれている。これらは、上位の表120の従来よりの欄のデータであり、移動処理の対象ではないデータである。
【0174】
次にファイル変換装置100は、上位の表120の行のデータ151,152,153内部における各移動先の部位p2,p34,p5を、データ151における欄121のデータ121dの位置に基づいて特定する。図21の例で上位の欄121は、<td>のcolspan値を数えることにより、データ151の行で、左から2列目の基本領域に位置することが分かる。ファイル変換装置100は、移動先のデータ151,152,153において各々、左から2列目の基本領域の位置に相当する部位p2,p34,p5を移動先の部位として特定する。
【0175】
移動先の部位の特定は、a)上位の表120における欄121の位置;b)下位の表130における各欄の位置;などが参酌されるものとしてもよい。また、欄121内部での下位の表130の位置等も参酌されるものとしてもよい。上段及び下段の表示要素がある場合では、その旨も参酌されることが望ましい。
【0176】
以上説明したステップSf1,Sf2の処理によりファイル変換装置100は、移動対象のデータ集合d2,d34,d5と、各々のデータの移動先の部位p2,p34,p5とを特定することができる。
【0177】
ステップSf3でファイル変換装置100は、下位の表130の<table>タグ等を削除する。このとき削除されるタグは、図21の上段で斜体の小文字を利用して示した各タグである。下位の表130については、<table>,</table>,<tr>,</tr>の各タグが削除される。また、上位の欄121については、<td>及び</td>の各タグが削除される。この後、ステップSf4でファイル変換装置100は、ステップSf1で特定された各データ集合d2,d34,d5を、各々ステップSf2で特定された部位p2,p34,p5に移動させる処理を行う。
【0178】
先に説明した基本領域追加処理(図17〜18で説明した図14のステップSe5)では、説明の便宜上、欄121の<td>タグのcolspan等の数値を変更するものとした(図17参照)が、これは必須ではない。欄121の<td>タグは最終的に図20のステップSf3で削除されるためである。基本領域追加処理では、欄121に対応付けられた基本領域についての変更が実質的に行われていれば足りる。例えば、図18で説明した、欄121以外の欄についての、属性データ変更等の処理が行われていれば足りる。
【0179】
D3.見直し処理:
図22は、統合結果の見直し処理を示すフローチャートである。また、図23は、統合結果の見直し処理の処理例を示す説明図である。この処理は、図9のステップSc3における処理である。前述のように表の統合処理(図9のステップSc2)では、基本領域追加処理(図14のステップSe5)により上位の表120の基本領域が変更され得る。以下で説明する処理では、かかる変更により生じた基本領域の自由度の増加に応じて、過去の統合処理の見直しを行う。
【0180】
図23のSTEP1は当初の状態を示している。この例で上位の表120は、下位の表130aを欄A2A3に含み、下位の表130を欄B2に含む。ここに図23の破線は表120の基本領域を表している。
【0181】
次にSTEP2では、前述の統合処理(図9のステップSc2)により、欄A2A3の下位の表130aが上位の表120に統合されたとする。下位の表130aの欄m1,m2は、上位の表120の欄m1,m2に変換されている。変換後の欄m1,m2は表120の基本領域の単位で列幅1に設定されている。
【0182】
次にSTEP3で、下位の表130bについて再度、統合処理(図9のステップSc2)が行われたとする。下位の表130bの欄x1,x2は、上位の表120の欄x1,x2に変換されている。
【0183】
STEP3における上位の表120では、下位の表130bの統合に伴い、基本領域の列幅が3から4に増加される。このため、欄m1のcolspanも1から2に増加される。
【0184】
STEP3での統合処理(図9のステップSc2)に続く図22の処理(図9のステップSc3)では、上位の表120の基本領域の列幅の増加に応じた処理が行われる。
【0185】
まず、図22のステップSg1でファイル変換装置100は、下位の表からの統合により生じた欄であって、今回の統合処理でcolspanが増加した欄を特定する。図23のSTEP3の場合、欄m1を特定する。次にステップSg2では、欄m1が、統合前の下位の表130aにおける最左の欄であるか否かを調べる。最左の欄でなければ何も行わずに処理を終了するが、最左の欄であればステップSg3,Sg4の処理を実行する。
【0186】
ステップSg3,Sg4の処理を説明するために、これらの処理を行った後の状態を図23のSTEP4に示した。ステップSg3でファイル変換装置100は、最左の欄m1のcolspanを減じる。ステップSg4でファイル変換装置100は、欄m1の右隣の欄m2のcolspanを増じる。
【0187】
なお、表120を更に上位の表に統合する場合、欄m1等は、更なる変換処理により、表120より更に上位の表の欄に変換される。ここで、更に上位の表の基本領域に係る見直し処理では、直接の下位の表120で最左の欄でなかった欄m1(STEP4の状態)についてもステップSg3,Sg4の処理が行われるものとしてもよい。例えば、ステップSg2の判断で、表120より更に下位の表130aにおける欄m1(STEP1の状態)は最左の欄であったことが検知されるものとしてもよい。
【0188】
また、図22の見直し処理はファイル変換装置100に必須ではない。例えば、表の最左欄の表示要素の量が他の欄より統計的に少ない場合にのみ図22の見直し処理が行われるものとしてもよい。
【0189】
本実施例におけるファイル変換装置100によれば、HTMLにおける入れ子の表を、入れ子のない形式に変換することができる。
【0190】
上位の欄121には、2個以上の下位の表が含まれるものとしてもよい。例えば、図15の上段の概念図において、前段及び後段の表示要素の少なくとも一方に、下位の表130と別の表を含むものとしてもよい。このとき、前段の表示要素等の変換後の欄に、別の下位の表が含まれるものとしてもよい。また、複数の下位の表について、その欄を一度に上位の表120の欄に変換してもよい。例えば、前述の合計行幅や合計行数が、複数の下位の表に応じて計算されるものとしてもよい。
【0191】
E.第2実施例:
第2実施例では、下位の表の各欄のデータの移動処理(図14のステップSe7:図20,21で詳細に説明)に係る変形例を示す。第2実施例では、下位の表の各欄等のデータ移動処理を、その下位の表ごとに図14のステップSe7で行うことはない。データ移動処理は、複数の下位の表に係る移動処理を一括して行う。
【0192】
図24は、2つの下位の表130P,130Vを含む上位の表120を示す説明図である。図24の表120は、欄P1に下位の表130Pを、欄V1に下位の表130Vを各々含む。また、欄P1,V1には各々、表130P,130Vの前後に、前段及び後段の表示要素を有する。ファイル変換装置100は、上位の表120の欄として、表130Pの各欄に応じた4つの欄と、表130Vの各欄に応じた6つの欄と、欄P1,V1の前段及び後段の表示要素に応じた4つの欄とを作成する。
【0193】
まず、下位の表130P,130Vのうちで表130Vが統合処理の対象に選択される(図5のステップSb2)ものとする。表130Vに係る統合処理(図14)の結果、図24で図示するように、欄V1は、colspanが2にrowspanが5に各々設定されている(図14のステップSe5:図17の説明を参照)。このとき、欄V1の左側に隣接する欄P1のrowspanも5に設定される(図18の説明を参照)。なお、上位の表120における基本領域の区分は、図24で破線により示している。ここで、rowspan等の設定後に、表130Vの各欄等のデータを移動すること(図14のステップSe7)は第2実施例では行われない。この処理は後刻に別途行われる。
【0194】
次に、残された下位の表130Pが統合処理の対象に選択される(図5のステップSb2)ものとする。表130Pに係る統合処理では、後段の表示要素の欄301Pのrowspanを2に設定する等の処理が行われる。ただし、表130Vの場合と同様、表130Pの各欄のデータの移動処理(図14のステップSe7)はこの時点では行われない。この処理は後刻に別途行われる。
【0195】
以上により、上位の欄P1,V1と、下位の表130P,130Vの各欄等とのcolspan等の設定を終えることとができた。この時点では、下位の表130P,130Vの各欄のデータは各々ひとまとまりになっている(図21の上段参照)。この後にファイル変換装置100はデータの移動処理を行う。この処理は、第1実施例におけるデータ移動処理(図20,21)とほぼ同様である。ただし、複数の上位の欄P1,V1に係る処理を一括して行う点で第1実施例の場合と相違する。
【0196】
図20のステップSf1においてファイル変換装置100が特定する、移動単位となるデータ集合は、第2実施例では、複数の上位の欄P1,V1にわたるデータ集合である。図24の場合、欄P1,V1のrowspanが5であるから、5つのデータ集合が特定される。具体的には、前段表示要素の欄300P(欄P1内)及び前段表示要素の欄300V(欄V1内)のデータからなるデータ集合と、欄m1,m2(欄P1内)及び欄s1,s2(欄V1内)のデータからなるデータ集合と、欄n1,n2(欄P1内)及び欄t1,t2(欄V1内)のデータからなるデータ集合と、後段の表示要素の欄301P(欄P1内)及び欄u1,u2(欄V1内)のデータからなるデータ集合と、後段の表示要素の欄301V(欄V1内)のデータからなるデータ集合との、5つのデータ集合である。
【0197】
ステップSf2おける移動先の部位の特定と、ステップSf4における移動処理とは第1実施例の場合と同様に行うことができる。また、ステップSf3における<table>タグ等の削除も第1実施例の場合と同様に行うことができる。ただし、複数の表130P,130Vのタグが一括して削除等の対象になる点で第1実施例の場合と相違する。
【0198】
なお、第2実施例の場合でも、統合結果の見直し処理(図22,23で詳細に説明する図9のステップSc3)を活用することができる。
【0199】
なお、図24では、移動処理にかかる上位の欄P1,V1が隣接している場合について示したが、隣接していない場合も同様である。また、図24では、移動処理にかかる上位の欄P1,V1が横方向に並んでいる場合について示したが、欄P1,V1が縦方向に並ぶ場合や、欄P1,V1が斜め方向に並ぶ場合も、欄P1,V1に係るデータの一括移動処理を行うことができる。
【0200】
また、図24の場合において、欄P2又はV2の少なくとも一方に下位の表を含むときなど、上位の表120に3つ以上の下位の表を含む場合もある。そのような場合、上位の表120に含む全ての下位の表についてのデータ移動処理を一括して行ってもよいし、所定の一部の下位の表についての移動処理のみが一括して行われてもよい。所定の一部の下位の表についての処理のみが一括して行われる場合、その移動処理に係る表以外の下位の表のcoslpan等の設定は、その移動処理の後に行われるものとしてもよい。
【0201】
以上、実施例に基づき本発明にかかるファイル変換装置を説明してきたが、上述した発明の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明は、その趣旨並びに特許請求の範囲を逸脱することなく、変更、改良され得る。
【図面の簡単な説明】
【図1】ファイル変換装置100を示す説明図である。
【図2】HTMLのファイルの一例を示す説明図である。
【図3】簡易変換処理を示すフローチャートである。
【図4】簡易変換処理で特定された各欄を示す説明図である。
【図5】表の変換処理を示すフローチャートである。
【図6】入れ子になった表の一例を示す説明図である。
【図7】下位の表のブロック変換の処理を示す説明図である。
【図8】上位の表のブロック変換の処理を示す説明図である。
【図9】マージ処理を示すフローチャートである。
【図10】準備処理を示すフローチャートである。
【図11】移動処理を示す説明図である。
【図12】基本領域の共有解消処理を示す説明図である。
【図13】欄追加処理を示す説明図である。
【図14】統合処理を示すフローチャートである。
【図15】欄構成の把握の一例を示す説明図である。
【図16】下位の表130の幅数を増加する処理例を示す説明図である。
【図17】上位の欄120に基本領域を追加する処理例を示す説明図である。
【図18】基本領域追加処理のうちで、欄121の周辺の欄に係る部分を示す説明図である。
【図19】開始タグ及び終了タグの追加を示す説明図である。
【図20】データの移動処理を示すフローチャートである。
【図21】移動処理の処理例を示す説明図である。
【図22】統合結果の見直し処理を示すフローチャートである。
【図23】統合結果の見直し処理の処理例を示す説明図である。
【図24】2つの下位の表130P,130Vを含む上位の表120を示す説明図である。
【符号の説明】
100…ファイル変換装置
100c…キーボード
101…ファイル入力部
102…ユーザ入力部
103…処理規則記憶部
104…基本処理部
105…文法記憶部
106…表処理部
107…構造特定部
108…タグ操作部
109…データ移動部
110…出力部
120…上位の表
120t…表120の<table>タグ
121…下位の表を有する欄
125…基本領域の行が欄121と一致する欄
126…基本領域の列が欄121と一致する欄
130…下位の表
130a,130b…下位の表
130c…下位の表130から変換した上位の表の各欄
140…移動対象の文
141…文140を含む表の<table>タグ
142…<table>タグ141に隣接する<tr>タグ
151,152,153…上位の表120の行のデータ
d2,d34,d5…移動対象のデータ集合
p2,p34,p5…データ集合d2,d34,d5の移動先の部位
121d…欄121dのデータ
300…前段の表示要素の変換後の欄
301…後段の表示要素の変換後の欄
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a file conversion device that expands a table expressed in a markup language.
[0002]
[Prior art]
Conventionally, markup languages such as HTML (HyperText Markup Language) and XHTML (Extensible HTML) have been used. In HTML, the appearance of a sentence can be specified by inserting a tag into the sentence file. For example, it is possible to designate that a specific character uses a specific font, that an image is displayed at a predetermined position, or the like. Such HTML files are used for providing information on the WWW (World Wide Web) and the like.
[0003]
In markup languages, information can generally be structured in tabular form. For example, in HTML or the like, a tag such as <table> that specifies data in a table is combined with a tag such as <tr> that specifies data in a row or a tag such as <td> that specifies data in each column. By using, it is possible to provide information while structuring in a table format. Such a table may have a further nested lower table inside a column of the upper table.
[0004]
On the other hand, various types of markup language processing devices have been used. For example, in addition to a mobile terminal such as a mobile phone, in recent years, a tuner, a printing device, a set-top box, and the like of a television may be a markup language processing device. For example, information provision in a markup language may be performed on a set-top box or the like via digital broadcasting. In some cases, a printing apparatus that analyzes a markup language file and performs printing is used.
[0005]
[Patent Document 1]
Japanese Patent Publication No. 2002-351735
[0006]
[Problems to be solved by the invention]
However, processing the nested table structure was a cumbersome task.
For example, when printing a nested table described in a markup language, an upper table must be processed according to the processing result of a lower table in the nest. This is because it is necessary to determine the format of the entire column including the table according to the format of the lower table. Such processing is a complicated processing with a large processing amount.
[0007]
Also, the processing capability of the markup language may be low. In such a case, the use of nested tables may be prohibited, or processing of the table structure may require an extremely long processing time or may be impossible. For example, there are cases where a printing apparatus directly analyzes the structure of a file such as HTML and performs printing, or where a device having a low processing capability such as a portable terminal displays the contents of a file such as HTML.
[0008]
In order to reduce such a processing load, it is conceivable to prepare an HTML file including only a single-layer table without nesting. However, creating such a file, apart from an HTML file containing nested tables, is a heavy burden.
[0009]
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and has as its object to provide a file conversion device that easily expands a nested table.
[0010]
[Means for Solving the Problems and Their Functions and Effects]
In order to solve at least a part of the problems described above, the present invention employs the following configuration.
The file conversion device of the present invention
A file conversion device for converting a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table comprising one or more columns;
The first file has a nested upper table with a column containing the nested lower table;
A gist of the present invention is to provide a conversion unit that performs at least one of deletion and modification of at least one of the tag representing the table and the tag representing one or more columns.
[0011]
For example, in the case where the first markup language is XHTML or the like, the file conversion device of the present invention uses tags of <table> and </ table> that specify data of the entire table, and Each tag of <tr> and </ tr> that specifies data is deleted, and each of <td> and </ td>, and <th> and </ th> that specifies data in each column of the table is deleted. The tags may be changed to <div> and </ div>, respectively. Here, <table> and </ table> are tags representing a table, <tr> and </ tr> are tags representing one or more columns, and <td> and </ td> and <th > And </ th> are tags indicating one column. <Div> and </ div> are tags that specify a block of an information element in XHTML. Note that the conversion unit may delete the tag indicating the table and change the tag indicating the column of the table.
[0012]
In this way, the table can be converted into a format other than the table. Through such conversion, a nested table in a markup language can be converted into a non-nested table (hereinafter, referred to as a single-layer table). By using the data of the converted table, processing such as printing and display can be simplified.
[0013]
The table related to the above-described tag deletion / change may be the lowest table in the nest, or may be the highest table immediately adjacent to the lowest table. Further, it may be the highest table in the nest, or may be a table immediately below the highest table.
[0014]
The deletion or change of the tag may be performed, for example, sequentially on three or more nested tables. At this time, deletion may be performed sequentially from the highest table in the nest, may be performed from the lowest table, or may be performed from other tables other than the highest and lowest tables. Good.
[0015]
In the file conversion device according to the present invention, the attribute information associated with the data of the entire table related to the tag deletion or the like is associated with the data in each column of the table before or after the tag deletion or the like, or in parallel with the deletion. It may be converted to the one attached.
[0016]
Various markup languages can be applied as the markup language. For example, the above-described HTML and XHTML may be applied. Further, a markup language such as SGML (Standard Generalized Markup Language) or XML (Extensible Markup Language), which is designed mainly for the purpose of facilitating the processing, management, and communication of documents, may be applied. Note that the markup languages of the first and second files may be the same, similar, or different. For example, at least a part of the markup language convention of the second file may be a simplified version of the markup language convention of the first file.
[0017]
Further, the table of the markup language is not limited to the display. For example, it may be a table of a database that stores data structured for information retrieval.
[0018]
The file conversion device may be a device dedicated to file conversion or a device having other functions. As a case having other functions, a personal computer, a tuner of a television, a printing device, a set-top box, a mobile phone, and other portable information processing devices can be cited.
[0019]
It should be noted that there may be a case where a plurality of lower nested tables are included in the table column.
[0020]
In the file conversion device of the present invention,
For at least one of the columns to be deleted or changed, a position information input unit that inputs information of the display position after the conversion,
The conversion unit may include the information in the second file.
[0021]
By doing so, the position of each column after conversion can be specified. The position may be specified by the user directly changing the contents of the file using an editor or the like. For example, attribute data such as “style =“ left: x-coordinate; top: y-coordinate ”” may be added to a tag (<div> in the above-described case) that specifies a column after conversion. At this time, the file conversion device may visually indicate to the user a portion to which the attribute data is to be added by using a comment sentence in HTML or the like. Further, the file conversion device may provide a GUI (Graphical User Interface) in which an actual tabular display mode is displayed, instead of an interface using a simple editor.
[0022]
A second file conversion device according to the present invention comprises:
A file conversion device for converting a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table including one or more columns and a predetermined information element for each of the columns, which is associated with the columns.
The first file has a nested upper table including a field related to an information element including a nested lower table,
The gist of the present invention is to include a conversion unit that expands the lower table and converts a column of the lower table into a column of the higher table.
[0023]
In this way, a nested table in the markup language can be converted into a single-layer table. In expanding the lower table, for example, tags <table> and </ table> representing the lower table may be deleted.
[0024]
Here, the information element may include an image (including a background image or a simple pattern), a so-called clickable map, a so-called hyperlink, in addition to the nested lower table and character data.
[0025]
In the second file conversion device of the present invention,
The table has one or more basic regions arranged in the vertical and horizontal directions,
In the column, the row width in the vertical direction and the column width in the horizontal direction may be defined by the number of arrangements of the basic regions, and may be associated with one or more predetermined basic regions.
[0026]
As such a case, for example, in a table such as HTML or XHTML, there is a mode in which the size of a column is defined by using a tag such as <td colspan = 2> with attribute data. The column to which the attribute data “colspan = 2” is attached is associated with two rows of basic regions in the horizontal direction. Similarly, the attribute data “rowspan = 2” is attribute data for associating two rows of basic regions in the vertical direction. In this way, a table in which columns of different sizes are mixed can be handled relatively easily.
[0027]
The table in which one or more basic regions are arranged in the vertical direction and the horizontal direction includes a table in which only one row or one column has basic regions arranged in at least one of the vertical direction and the horizontal direction.
[0028]
In the second file conversion device of the present invention,
The conversion unit may perform the conversion on a lower table that does not include another table.
[0029]
By doing so, the processing can be simplified. The file conversion device may perform only the conversion process on the lower column that does not include another table therein, or may also perform the conversion process on the lower column that includes another table therein.
[0030]
In the second file conversion device of the present invention,
A detection unit that detects whether a column width of the entire table is 1;
The conversion unit, when the column width is 1, performs at least one of deletion and modification of the tag representing the table or at least one of the tags representing one or more of the columns. It may be.
[0031]
In this way, the table can be converted into a format other than the table. Through such a conversion, a nested table in a markup language can be converted into a single-layer table.
[0032]
The table related to the above-described tag deletion / change may be the lowest table in the nest, or may be the table immediately above the lowest table. Further, it may be the highest table in the nest, or may be a table immediately below the highest table.
[0033]
In the second file conversion device of the present invention,
An attribute information creating unit that creates attribute information associated with each of the converted columns according to predetermined attribute information associated with the entire lower table may be provided.
[0034]
For example, in HTML or the like, the attribute information inside the <table> tag in the lower table may be transcribed inside the <td> tag in each converted column.
[0035]
By doing so, the correspondence between the columns of the lower table and the attribute information can be maintained in the converted file.
[0036]
In the second file conversion device of the present invention,
The attribute information creating unit may perform the creation except for the attribute information relating to the size of the table.
[0037]
By doing so, it is possible to reduce the redundancy of the converted data and prevent grammatical irregularities of the converted data. This is because the attribute information relating to the size of the table may be available only when associated with the entire table, or may conform to the grammar. For example, there is a case where the attribute information for specifying the horizontal size of the entire table is not useful even if stored in association with each column.
[0038]
In the second file conversion device of the present invention,
Prior to the conversion, a correction unit is provided that performs at least one of correction of the size of the column and addition of a new column so that any of the basic areas has the correspondence with any one of the columns. It may be something.
[0039]
As described above, the above-described correction is performed prior to the conversion processing, so that the conversion processing can be easily performed. This is because in the conversion processing for the file with the above correction, the relationship between each column and the basic area can be easily grasped.
[0040]
The file conversion device may, for example, associate a basic region that is not associated with any column with a newly created column or an existing column with the basic region. When associating the basic area with an existing column, the size of the column may be changed. In addition, the file conversion device may cancel the association of a plurality of columns associated with one basic area, except for one specific column.
[0041]
In addition, the correction | amendment which associates a basic area with an existing column may be performed by correcting the attribute data matched with the column. For example, the column width or the like of the column may be modified by increasing the attribute data colspan or the like. The correction for canceling the association may be such that the column width of the column or the like is reduced by the reduction of the attribute data colspan or the like.
[0042]
In the second file conversion device of the present invention,
In at least one of the vertical direction or the horizontal direction, the width number of the lower table, and a selection unit that selects one of the number of arrays for the column including the lower table in the upper table,
A changing unit that changes at least one of the width number and the array number based on the selected number.
[0043]
In this way, the basic area that defines the size of the column in the upper table and the basic area that defines the size of the entire lower table can be shared. As a result, by changing the number of rows in the lower table and the number of columns in the upper table, the position and size of each column in the lower table are arbitrarily adjusted in the columns of the upper table, The lower table can fit in the column.
[0044]
Here, it is desirable that the change in the number of arrays in the columns of the upper table changes the width number of the basic region of the entire upper table. In addition, the change in the number of arrays in the column of the upper table may not change the attribute data associated with the column, such as inside the <td> tag of the column. This is because, for example, the column may be converted into a group of a plurality of columns converted from the lower table column.
[0045]
Here, in the above-described processing, it is desirable that the larger of the width number and the array number is selected. In this case, the above-mentioned “change” may change the number of the non-selected side to the selected number itself, or may change the selected number to a number larger than the selected number by a predetermined difference. Alternatively, the number may be changed to a number smaller by a predetermined difference. Here, the predetermined difference may be a value specified in accordance with an information element other than the lower table included in the column of the upper table, as described later in detail. For example, when there is an information element that is divided into upper and lower parts by a lower table, the predetermined difference may be two. The above selection may be made in consideration of the predetermined difference. For example, the number of arrays may be selected from the number of arrays and the number of widths when the number of arrays is two or more larger than the number of widths.
[0046]
In the second file conversion device of the present invention,
The table data in the first file is:
A table identification tag indicating the start or end of the table,
A division tag for specifying a start or end position of one or more of the columns,
The information processing apparatus may further include a moving unit that moves at least one of the information elements enclosed by the table specifying tag and the section tag immediately before or immediately after the table specifying tag to the outside of the table.
[0047]
For example, in HTML or the like, the <table> tag or the like specifies data existing between a <table> or </ table> tag and a <tr> or </ tr> tag immediately after or immediately before the tag. The data may be moved outside the table data.
[0048]
By doing so, it is possible to easily perform the process of converting the columns of the lower table into the columns of the upper table. This is because the file after the data transfer by the transfer unit can be easily converted. In addition, the movement may be realized by moving a table specifying tag such as <table> or </ table>.
[0049]
In the second file conversion device of the present invention,
The column of the upper table includes other information elements that are not included in the lower table, and the conversion unit converts the other information element from the upper table that is different from the column converted from the lower table. May be converted into one or more columns of the table.
[0050]
In this way, even when the column of the upper table includes other information elements other than the lower table, the data corresponding to the column of the upper table before conversion is taken into consideration while considering the information element. 2 files.
[0051]
Here, the other information elements may be displayed on the upper, lower, left, right, and other peripheral portions of the lower table. In this case, it is desirable that the conversion process be performed in accordance with the positional relationship between the lower table and other information elements.
[0052]
It is desirable that the above-mentioned adaptation process is performed in consideration of a column generated by converting from other information elements. For example, when converting the upper and lower information elements of the lower table into two columns respectively, the number of columns in the column of the upper table in the vertical direction is calculated by adding 2 to the number of row widths of the lower table. It may be changed. This makes it possible to arbitrarily adjust the position and size of the lower table and the upper and lower information elements of the lower table in the column of the upper table.
[0053]
In the second file conversion device of the present invention,
The first file has two predetermined attribute tags of the file, and has an attribute tag for specifying a predetermined attribute of the information element surrounded by the attribute tag,
Regarding the information element surrounded by the attribute tag, an attribute tag adding unit that adds the attribute tag to at least one of the end and the starting end of the converted column so as to be surrounded by the predetermined attribute tag also in the converted column. It may be provided.
[0054]
Here, the predetermined attribute tag may be a so-called start tag and end tag in a markup language. For example, in HTML, <b> and </ b> for designating a display typeface.
[0055]
By doing so, a desired second file can be obtained even when the attribute tags surrounding the information element are separated into the data of the two columns after the conversion. For example, when the start tag and the end tag are included in the data of two different fields, the end tag is placed at the end of the data having the start tag, and the start tag is placed at the start of the data having the end tag. It is desirable to add. It should be noted that the case where both the addition of the start tag to the start end and the addition of the end tag to the end end may be included in one column.
[0056]
In the second file conversion device of the present invention,
The first file has attribute information indicating a predetermined attribute in association with a column of a higher table including the lower table,
The conversion unit may give an attribute corresponding to the attribute information to the converted column.
[0057]
Here, the predetermined attribute tag in the upper table may be attribute data “style =“ color: red ”” in a <td style = “color: red”> tag in a markup language. Such attribute data specifies a predetermined attribute of an information element such as a lower table included in a column specified by the <td> tag. It is desirable that the file conversion device attaches attribute data such as “style =“ color: red ”” to each column of the upper table converted from the information elements.
[0058]
In this way, the attributes of the information elements inside the columns of the upper table can be maintained in each converted column of the information elements.
[0059]
In the second file conversion device of the present invention,
The conversion unit may set the number of arrays in the converted column related to the other information element according to the number of arrays in the column of the upper table.
[0060]
This makes it possible to arbitrarily adjust the position and size of the converted column for other information elements inside the column of the upper table including the information element.
[0061]
Here, when the number of columns or rows in the relevant column of the upper table is changed in the above-described adaptation processing or the like, it is preferable that the changed number be used for the setting.
[0062]
In the second file conversion device of the present invention,
A basic region operating unit that adds a basic region associated with the converted column in the vertical or horizontal direction of the array,
The apparatus may further include a correspondence adjustment unit that adjusts the specified number of arrays in the converted column so that the converted column is associated with the basic region to be added.
[0063]
Here, the basic area operation unit and the corresponding adjustment unit when handling HTML or the like may change numerical values such as colspan. Also, the basic area operation unit may add tags such as <tr> and </ tr>.
[0064]
In this way, the position and size of the converted column can be arbitrarily adjusted within the column of the upper table.
[0065]
The correspondence adjustment unit and the basic area operation unit may be used for the above-described adaptation processing. For example, when the selection unit selects the width number of the lower table, the additional processing by the basic area operation unit may be used.
[0066]
In the second file conversion device of the present invention,
The basic area operation unit performs the addition for a table including a column related to the conversion in the past than the conversion,
According to the addition, a resetting unit may be provided for resetting the correspondence with the basic area in the column related to the past conversion.
[0067]
By doing so, it is possible to reset the association with the basic area in the column related to the past conversion according to the increase in the degree of freedom caused by the additional processing. The degree of freedom in associating the columns with the basic areas increases according to the additional processing.
[0068]
Each column related to the past conversion is associated with a basic area of a higher-level table through the above-described adaptation processing or the like. According to the file conversion device including the resetting unit and the like, the association with the basic region in the column related to the past conversion is reset according to the increase in the degree of freedom of the basic region that occurs when the additional processing is performed. can do.
[0069]
Here, the resetting may be performed on the data in the leftmost column of the lower table. For example, the number of basic regions associated with the converted column from the leftmost column may be reduced. This is because in a table or the like in which the leftmost column is only a heading column, it is sometimes desirable that the basic area corresponding to the leftmost column be relatively small.
[0070]
Note that the upper table column converted from the lower table column may be converted to a higher table column by a further conversion process. In this case, the resetting according to the additional processing of the higher-level table is the same. Although it is not the leftmost column in the directly lower table, the same applies to the column that was the leftmost column in the lower table.
[0071]
In the second file conversion device of the present invention,
At least one of a tag indicating data of the lower table and a tag indicating one or more columns of the table may be deleted.
[0072]
By doing so, the data of the lower table can be not the data representing the table. Here, the tag to be deleted may include at least a part of each tag of <table>, </ table>, <tr>, </ tr> in HTML or the like.
[0073]
In the second file conversion device of the present invention,
The conversion unit, for each column of the lower table,
The position of the lower table column in the lower table;
The position of the lower table in the columns of the upper table;
According to at least one of the positions of the columns of the upper table and the position occupied in the upper table,
The data in the column of the lower table may be moved to a predetermined part in the data of the upper table.
[0074]
By doing so, the column after conversion can be stored as corresponding to the column before conversion. Specifically, it can be stored according to the position of the column before conversion.
[0075]
When a predetermined display of the converted file is performed, a display corresponding to the entire lower table before the conversion may be included. For example, the display or the like corresponding to each column of the lower table before conversion may be combined as a whole to constitute a display corresponding to the entire lower table before conversion.
[0076]
The present invention can be configured as a file conversion method invention in addition to the configuration as the file conversion device described above. Further, the present invention can be realized in various forms such as a computer program for realizing the method, a recording medium on which the program is recorded, a data signal including the program and embodied in a carrier wave.
[0077]
When the present invention is configured as a computer program or a recording medium on which the program is recorded, the recording medium may be a code such as a flexible disk, a CD-ROM, a magneto-optical disk, an IC card, a ROM cartridge, a punch card, and a bar code. A variety of computer-readable media such as printed matter, internal storage devices (memory such as RAM and ROM) of the computer, and external storage devices can be used.
[0078]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in the following order based on examples.
A. overall structure:
A1. File converter:
A2. Markup language:
A3. Functional block configuration:
B. Simple conversion:
C. Table conversion processing:
C1. Overall flow:
C2. Convert to block:
D. Merge process:
D1. Preparation process:
D2. Integration processing:
D2a. Know which columns to create in the top table:
D2b. Increasing the number of rows in lower table columns:
D2c. Add a basic area:
D2d. Adjust attribute information:
D2e. Move data in each column:
D3. Review process:
E. FIG. Second embodiment:
[0079]
A. overall structure:
A1. File converter:
FIG. 1 is an explanatory diagram showing the file conversion device 100. The file conversion device 100 is configured by a personal computer that executes predetermined file conversion software. In addition, the file conversion device 100 can be configured as various devices that execute predetermined conversion software. For example, the file conversion device 100 may be a printer or a tuner of a television. Further, the file conversion device 100 may include predetermined conversion hardware.
[0080]
The file conversion apparatus 100 has a function of converting an HTML file into a predetermined LHTML (Light HTML) file. Here, LHTML is a markup language in which the type of tag and the structure of data are restricted so as to perform simple processing. For example, a nested table is recognized in HTML, whereas a nested table is not recognized in LHTML.
[0081]
The file conversion device 100 converts an HTML file having various contents into an LHTML file. The converted LHTML file is displayed on a device having a low processing capability, such as a mobile terminal such as a mobile phone, or used when requesting a printing device to perform printing.
[0082]
A2. Markup language:
FIG. 2 is an explanatory diagram illustrating an example of an HTML file. In FIG. 2, the data structure of the HTML file is shown in the upper part, and the table represented by the file is conceptually shown in the lower part. FIG. 2 shows a nested structure in which the lower table 130 is included in the upper table 120 as shown in the lower part.
[0083]
In FIG. 2, the HTML file is assigned the No. Is shown. In HTML, a table is represented by start / end tags of <table> and </ table>. In FIG. Data 1 to 13 are data of a table expressing one table 120. Here, the table 120 in FIG. 2 has columns A1, A2, and B. Here, the column B is constituted by a region indicated by a solid line. In addition, No. The attribute data “style =“ text-decoration: underline ”” (simplified by “underline” in the figure) attached to the <table> tag of No. 1 will be described later.
[0084]
In HTML, data in the horizontal direction (hereinafter, referred to as “row data”) is specified by being surrounded by tags of <tr> and </ tr>. In the table 120, the first row is composed of columns A1 and A2, and the second row is composed of columns B. No. in the upper data of FIG. Nos. 2 to 11 and Nos. Twelve data are data of two rows of the table 120. Each data is arranged inside the data of the table according to the order (from top to bottom).
[0085]
In HTML, data in each column of the table is specified by being surrounded by start tags and end tags of <td> and </ td>. The data of each column is arranged inside the data of each row specified by <tr> or the like according to the column order (from left to right). In the case of the data in the upper part of FIG. Nos. 3 to 9 and Nos. 10 and the data in column B is No. 12 is present. In FIG. 2, the name of the column is given as a display element of the content of the column.
[0086]
The data in column A1 includes No. 5 to 8 include the data of the lower nested table 130. Therefore, also in the lower diagram, the lower table 130 is included in the column A1 of the upper table 120. Like the data of the upper table 120, the data of the lower table 130 is configured by arranging the data of the columns m1 and m2 and the columns n1 and n2 for each row.
[0087]
The HTML table has one or more basic regions arranged in the vertical and horizontal directions. The upper table 120 in FIG. 2 shows a case in which basic areas a1, a2, b1, and b2 are arranged vertically and horizontally in a grid. In FIG. 2, the basic regions are arranged with two widths in the horizontal direction and two widths in the vertical direction. The basic areas a1, a2 and the basic areas b1, b2 arranged in the horizontal direction each constitute one row. The basic regions a1, b1 and the basic regions a2, b2 arranged in the vertical direction each constitute one column.
[0088]
Each column of the table is associated with one or more basic regions. In the case of FIG. 2, the columns A1 and A2 correspond to the basic regions a1 and a2, respectively. In column B, two basic areas b1 and b2 are associated.
[0089]
Here, the attribute data colspan will be described. In the data in column B of FIG. 2, the attribute data “colspan = 2” is included inside the <td> tag. This is data for designating that column B is associated with two columns of basic areas b1 and b2. In the data in columns A1 and A2, the attribute data of colspan is omitted. In such a case, the file conversion apparatus 100 treats “colspan = 1” as being omitted.
[0090]
Similarly to the attribute data colspan for the column width in the horizontal direction, the attribute data rowspan is used to specify the row width in the vertical direction. For example, by attaching attribute data “rowspan = 2” inside the <td> tag, the column of the <td> tag can be associated with two rows of basic areas in the vertical direction.
[0091]
In the HTML, the row width and the column width of each column of the table are defined in this manner, so that the row width and the column width of the entire table are defined.
[0092]
Note that, in HTML tags, uppercase and lowercase letters are not distinguished in principle. For example, <table> and <TABLE> are the same data. Therefore, in the drawings referred to in the following description, a specific portion of HTML data may be illustrated using capital letters.
[0093]
Note that LHTML is similar to HTML in that it can represent tables, but differs from HTML in that nested tables are not allowed. Except for the grammar described below, LHTML is basically described as a markup language similar to HTML.
[0094]
A3. Functional block configuration:
FIG. 1 also shows a functional block configuration realized by the file conversion device 100. The file conversion device 100 stores file conversion software. Each of the illustrated functional blocks is realized as software by executing the file conversion software by the file conversion apparatus 100. All or some of the illustrated functional blocks may be realized by hardware.
[0095]
The file input unit 101 inputs an HTML file. As described above, the HTML file includes nested table data.
[0096]
The user input unit 102 inputs various commands using input devices such as a keyboard 100c and a remote controller provided in the file conversion device 100.
[0097]
The table processing unit 106 converts a nested table into a non-nested table. The table processing unit 106 includes a structure specifying unit 107, a tag operation unit 108, and a data moving unit 109, and performs conversion using these components.
[0098]
The structure specifying unit 107 specifies a structure of a nested table included in the HTML file. For example, data of the entire table enclosed by start / end tags of <table> to </ table>, data of a row enclosed by <tr> to </ tr>, and <td> to </ td> Specify the data in one column enclosed by. In addition, the structure specifying unit 107 can specify the mutual relationship between the data specified by these start / end tags. For example, in the case of FIG. No. as a tag of a table included in the table 120 corresponding to the <table> tag of No. 1 5 <table> tags can be specified.
[0099]
The tag operation unit 108 performs tag deletion, addition, modification, and other tag operations. Here, the tag may include attribute data representing a predetermined attribute. For example, when it is desired to underline characters inside a table, a tag of <table style = “text-decoration: underline”> including attribute data “style =“ text-decoration: underline ”> is used. (Refer to Table 120 in FIG. 2; in FIG. 2, for convenience of illustration, the attribute data is simplified by “underline” and shown). The tag operation unit 108 also has a function of deleting, adding, and modifying attribute data.
[0100]
The data moving unit 109 has a function of moving data within a file. Specifically, as will be described later, it has a function of moving data in each column of the lower table 130 to a predetermined part in the data of the upper table 120.
[0101]
The grammar storage unit 105 stores HTML grammar. The above-described table processing unit 106 and the structure specifying unit 107 and the like included in the table processing unit 106 perform the above-described various processes while referring to the storage contents of the grammar storage unit 105.
[0102]
The basic processing unit 104 performs various processes on the file in which the nest has been expanded by the table processing unit 106, and finally completes the conversion to LHTML. For example, the basic processing unit 104 performs processing such as deleting or changing a tag or the like for each HTML tag or attribute data. For example, the attribute data bgcolor = “green” in HTML format for specifying the background color is changed to attribute data style = background-color: green in LHTML format. Also, tags such as <i> and </ i> that specify italic characters are changed to <span style = "font-style: italic;"> and </ span>. The processing rule storage unit 103 stores processing rules for the basic processing unit 104 to perform the above-described various processes.
[0103]
The file that has been converted into LHTML by the basic processing unit 104 is output by the output unit 110. Here, the output unit 110 may broadcast an LHTML file, send it to a printing device for a print request, output it to a screen or the like, or include the file conversion device 100. The data may be stored in a data storage device or the like. The file conversion device 100 may be a server that performs file conversion via a network, and the output unit 110 may return a file to a client that has requested conversion.
[0104]
Note that, in the embodiment, the basic processing unit 104 targets a file processed by the table processing unit 106 as a processing target for convenience of explanation, but the present invention is not limited to such a case. For example, all or a part of the above-described processing such as the tag change of the basic processing unit 104 may be performed before the table processing unit 106 performs the processing.
[0105]
B. Simple conversion:
FIG. 3 is a flowchart showing the simple conversion process. When converting the nested table, the table processing unit 106 selectively executes a simple conversion process illustrated in FIG. 3 and a table conversion process illustrated in FIG. 5 described below. The user can specify which process is to be performed. Hereinafter, a case where the simple conversion process is performed on the file of FIG. 2 will be described.
[0106]
In step Sa1, the file conversion device 100 inputs an HTML file. In step Sa2, the top table and its columns of the input file table are specified. In the case of FIG. 2, the table 120 and the columns A1, A2, and B of the table 120 are specified.
[0107]
FIG. 4 is an explanatory diagram showing each column specified in the simple conversion process. FIG. 4 shows the columns A1, A2, and B of the table 120 specified in step Sa2 of FIG. FIG. 4 shows a simple conversion process for the data of FIG. The upper part of FIG. 4 conceptually shows the state of the data subjected to the simple conversion process, and the lower part of FIG. 4 shows the specific contents of the data.
[0108]
In step Sa3, the file conversion device 100 deletes the tags <table>, </ table>, <tr>, </ tr> in the table 120, and replaces <tr> and </ tr> with <div> and Change to </ div>. <Div> and </ div> are tags that represent the display elements enclosed therein as one integrated block. In the lower part of FIG. 4, the deleted <table>, </ table>, <tr>, </ tr> tags are struck through, and the changed tags are indicated by capital letters. Was.
[0109]
In step Sa4, the file conversion device 100 transfers the attribute data inside the <table> tag 120t of the table 120 to the inside of the <div> tag in each column. In the case of FIG. 2, the attribute data “style =“ text-decoration: underline; ”” (simplified by “underline” in the figure) is included in the <table> tag 120t of the table 120. The attribute data is transcribed inside the <div> tag in each of the columns A1, A2, and B.
[0110]
However, transfer is not performed for attribute data or the like specifying the entire size of the table 120. For example, attribute data such as width and height inside a <table> tag in HTML. In the embodiment, for the convenience of explanation, step Sa4 is performed after step Sa3, but this order may be changed.
[0111]
In step Sa5, the file conversion device 100 inputs a designation by the user for the display position of each block. FIG. 2 shows a case where the coordinates of (0, 0), (4, 0), and (0, 3) are designated for columns A1, A2, and B, respectively. The file conversion device 100 adds each coordinate as attribute data inside each <div> tag.
[0112]
In FIG. 4, based on the designated display position, attribute data “style =“ left: 4; top = 0; ”” for specifying the display position of the block is included in the <div> tag in the column A2 (FIG. For simplicity of illustration, “pos = 4.0” is shown for simplicity. The same applies to the attribute data added to the other columns. In FIG. 4, for convenience of illustration, the display position is specified by attribute data of “style =“ left: X coordinate; top: y coordinate ””, but it may be specified in more detail. For example, it may include data indicating whether designation is to be made using absolute coordinates or relative coordinates, or data indicating a coordinate unit.
[0113]
The position may be specified by the user directly changing the contents of the file using an editor or the like. At this time, the file conversion device 100 may visually indicate to the user the part to which the attribute data is to be added by using a comment sentence in HTML or the like. Further, the file conversion apparatus 100 may provide a GUI (Graphical User Interface) in which an actual tabular display mode is displayed, instead of an interface using a mere editor.
[0114]
The simple conversion process in FIG. 3 may be repeatedly performed on one file. For example, in the state of FIG. 4, a simple conversion process may be further performed on the lower table 130.
[0115]
C. Table conversion processing:
C1. Overall flow:
FIG. 5 is a flowchart showing a table conversion process.
In step Sb1, the file conversion device 100 checks whether the file has a nested table. If there is a nested table, the processing from step Sb2 is executed. In step Sb2, the lowest table among the nested tables is specified. The lowermost table is a table that does not include another table therein.
[0116]
FIG. 6 is an explanatory diagram illustrating an example of a nested table. In FIG. 6, there is a table I having columns A1, A2, B1, B2. Column A1 of Table I contains Table II and Column B2 contains Table III. Table II has a column m1n1, a column m2, and a column n2, and the column m1n1 has a table IV. In the state of FIG. 6, Tables III and IV are the lowest tables.
[0117]
When the file is in the state of FIG. 6, the file conversion apparatus 100 specifies Table III or Table IV as the lowest table in the process of step Sb2 of FIG.
[0118]
In steps Sb3 and Sb4 to Sb6, the file conversion apparatus 100 integrates the lowest table specified in step Sb2 into the higher table. The contents of steps Sb4, Sb5, Sb6 will be described later.
[0119]
The processing of the file conversion apparatus 100 returns to the processing of step Sb1 after the integration processing in steps Sb3 to Sb6, and repeats the processing of step Sb2 and subsequent steps as long as the nested tables remain. For example, in the case of FIG. 6, after Table IV is integrated into Table II, Table II is integrated into column A1 of Table I.
[0120]
The conversion of the tables does not necessarily have to be performed sequentially from the lowest table. For example, even in the case of FIG. 6, Table II having Table IV therein may be integrated with Table I as it is. At this time, the column m1n1 may be integrated into the table I with the table IV inside.
[0121]
C2. Convert to block:
In step Sb3 of FIG. 5, the file conversion device 100 checks whether the column width of the upper and lower nested tables is 1 or not. If the column width of the lower table is 1, block conversion of the lower table (step Sb4) is executed. If the column width of the lower nested table is not 1 and the column width of the upper table is 1, block conversion of the upper table (step Sb5) is executed. If both the upper and lower nested tables have a column width of 2 or more, merge processing (step Sb6) is performed.
[0122]
FIG. 7 is an explanatory diagram showing a process of block conversion of a lower table. This shows the processing in step Sb4 of FIG. The upper part shows the state of the file before processing, and the lower part shows the state of the file after processing.
[0123]
Since the lower table 130 has a column width of 1, it is subjected to the processing of step Sb4 in FIG. As a result, the columns m and n of the lower table 130 are converted into two blocks specified by <div> and </ div>, respectively, as indicated by lowercase letters. This conversion can be performed by a process similar to the above-described simple conversion process (see FIGS. 3 and 4).
[0124]
FIG. 8 is an explanatory diagram illustrating a block conversion process of a higher-level table. This shows the processing in step Sb5 in FIG. The upper row shows the state before the conversion, and the lower row shows the state after the conversion. Since the number of columns in the upper-level table 120 is 1, the upper-level table 120 is subjected to the process of step Sb5 in FIG. As a result, the columns A and B of the upper table 120 are converted into two blocks as shown in the lower part. This conversion can be performed in the same manner as in FIG. Although FIG. 8 shows a case where the higher-level table 120 is included in the higher-level table 120x, the same applies to a case where the table 120 is the highest-level table.
[0125]
D. Merge process:
In step Sb6 of FIG. 5, the nested lower table 130 is merged with the upper table 120. In the merging process, a process of expanding the lower table 130 for each column and reconfiguring it as a column of the upper table 120 is performed. Hereinafter, such processing may be simply referred to as conversion from a lower column to a higher column.
[0126]
FIG. 9 is a flowchart showing the merge processing.
In step Sc1, preparations are made for the integration process in step Sc2. In step Sc2, an integration process, that is, a process of converting each lower column into a higher column is performed. In step Sc3, the past integration process is reviewed. Flow charts showing the details of each process are shown in FIGS. Hereinafter, the processing of steps Sc1, Sc2, Sc3 will be described with reference to FIGS. 10 to 13, 14 to 21, 22 to 23, respectively.
[0127]
D1. Preparation process:
FIG. 10 is a flowchart showing the preparation process. This is the process of step Sc1 in FIG.
In step Sd1 of FIG. 10, the file conversion apparatus 100 checks whether there is a sentence between the <table> tag and the <tr> tag immediately after the <table> tag in the lower table 130. If such a sentence exists, a predetermined moving process is performed in step Sd2.
[0128]
FIG. 11 is an explanatory diagram illustrating the movement processing. The upper row shows the state before the processing, and the lower row shows the state after the processing. In the data on the left side of the upper part of FIG. 11, the sentence 140 of “weather forecast” is inserted between the <table> tag 141 of the lower table 130 and the <tr> tag 142 immediately after the <table> tag 141. Exists. The sentence 140 is a sentence to be moved and is subjected to the movement process in step Sd2 in FIG. As shown in the conceptual diagram on the right side in the upper part of FIG. 11, such a sentence 140 is handled as a display element before the lower table 130.
[0129]
As shown in the lower part of FIG. 11, in the movement processing of step Sd2, the sentence 140 is moved out of the table 130. However, data that is originally required inside the <table> to </ table> tags does not move, such as data from the <caption> tag to the </ caption> tag. Like the sentence 140 to be moved in the lower left diagram of FIG. 11, the destination portion in the file is immediately before the <table> tag 141 of the table including the sentence 140. Note that such movement may be realized by moving the <table> tag 141. Further, a sentence between </ tr> and </ table> may be moved immediately after </ table>.
[0130]
Next, in step Sd3 of FIG. 10, the file conversion device 100 checks whether there are two columns sharing the basic area. If there are such two columns, a process of canceling sharing is executed in step Sd4. Here, the two columns sharing the basic region mean two columns associated with one basic region.
[0131]
FIG. 12 is an explanatory diagram showing the sharing cancellation processing of the basic area. The upper part shows the state before the processing, and the lower part shows the state after the processing. In FIG. 12, each basic area is each area a1, a2, b1, b2 divided by a broken line. The table in FIG. 12 has a column α composed of the basic regions a2 and b2 and a column β composed of the basic regions b1 and b2. In addition, the ranges of the basic regions associated with the columns α and β are indicated by hatching.
[0132]
The columns α and β in the upper part of FIG. 12 share the basic area a2. As shown in the lower part of FIG. 12, in step Sd4 of FIG. 10, sharing of the basic area is canceled by reducing colspan in the column β to 1. In FIG. 12, the case where the correction is performed for the column β is illustrated, but the rowspan in the column α may be the correction target, or the user may be able to select which is to be corrected.
[0133]
Next, in step Sd5 of FIG. 10, the file conversion apparatus 100 checks whether there is a basic area that is not associated with any of the columns (hereinafter, referred to as an unsupported basic area). If there is an unsupported basic area, a column is added in step Sd6.
[0134]
FIG. 13 is an explanatory diagram illustrating the column addition processing. The upper row shows the state before the processing, and the lower row shows the state after the processing. In the upper part of FIG. 13, there is no column associated with the basic area b3, so the basic area b3 is an unsupported basic area. As shown in the lower part of FIG. 13, in the column addition process of step Sd6 of FIG. 10, a process of creating a column B3 associated with the basic region b3 is performed. In FIG. 13, the <td> and </ td> tags newly created to add the column B3 are shown in uppercase. The column B3 may be a dummy column that does not include any display element, or may include some display element.
[0135]
Various aspects can be applied to the mode of the process described in FIG. 13 (step Sd6 in FIG. 10). For example, instead of the addition process in the column B, a correction process of the row span in the column A3 or the col span in the column B2 may be performed. By such a correction process, the unsupported basic area b3 can be made to correspond to the column A3 or the column B2.
[0136]
Further, various aspects can be applied to the mode of the processing described in FIGS. 12 and 13 (steps Sd3, Sd4, Sd5, and Sd6 in FIG. 10). For example, various processes for making a correction that brings all the basic regions closer to a state where each of the basic regions is associated with only one column can be applied.
[0137]
D2. Integration processing:
FIG. 14 is a flowchart showing the integration processing. This is the process of step Sc2 in FIG. By this process, a process of converting the column of the lower table 130 into the column of the upper table 120 is performed.
[0138]
D2a. Know which columns to create in the top table:
In step Se1 of FIG. 14, the file conversion device 100 grasps the column configuration after conversion.
FIG. 15 is an explanatory diagram illustrating an example of grasping the column configuration. In FIG. 15, the upper diagram shows the state of the lower table 130 and the like before the conversion, and the lower diagram shows the column configuration after the conversion.
[0139]
In the upper part of FIG. 15, a column 121 is one column of a nested upper table, and includes a lower table 130. The column 121 includes a display element at the preceding stage of the lower table 130, a lower table 130, and a display element at the subsequent stage of the lower table 130. The lower table 130 has three columns of columns M1, M2, and N.
[0140]
The file conversion device 100 recognizes that the lower table 130 should be configured as three columns 130c of the upper table, as shown in the lower part. In addition, the file conversion device recognizes that the columns 300 and 301 should be configured separately from the three columns 130c in accordance with the preceding display element and the subsequent display element. Here, the upper column 121 before the conversion is converted into the entirety of the columns 300 and 301 of the display elements of the preceding and subsequent stages and the three columns 130c. Note that the file conversion apparatus 100 adds </ td> in the column 300 corresponding to the display element in the preceding stage and <td> in the column 301 corresponding to the display element in the subsequent stage.
[0141]
D2b. Increase in the number of columns in the lower table:
In the processing of Steps Se2, Se3, Se4, and Se5 in FIG. 14, the file conversion apparatus 100 performs an adaptation process in which the column width of the column 121 and the column width of the basic region of the entire lower table 130 are aligned. Similarly, for the row width of the column 121, the matching process is performed to make the row width of the basic area of the lower table 130 uniform.
[0142]
In step Se2 of FIG. 14, when the column width of the column 121 is larger than the column width of the lower table 130, the file conversion apparatus 100 determines that the number of widths of the lower table needs to be increased. Execute the increase processing.
[0143]
FIG. 16 is an explanatory diagram illustrating an example of processing for increasing the number of widths of the lower table 130. This shows the processing in step Se3 in FIG. In FIG. 16, the upper part shows the state before the processing, and the lower part shows the state after the processing.
[0144]
The upper column 121 in FIG. 16 has colspan = 3, and is associated with three columns of basic regions indicated by broken lines in the drawing. On the other hand, the number of columns in the lower table 130 is two. In such a case, the column width of the lower table 130 is increased from 2 to 3 as shown by the dashed line in the lower row by the processing of step Se3 in FIG. The correction of the column width of the table 130 is performed by increasing colpsn of each column M2 and column N.
[0145]
Also, in step Se3 of FIG. 14, the file conversion apparatus 100 sets the attribute data “colspan = 3” in the columns 300 and 301 of the display elements in the preceding and subsequent stages, similarly to the increase in the column width of the lower table 130. I do. In this way, the number of columns in each column can be adapted to the number of columns in column 121.
[0146]
In the above-described example, colspan and the like in the leftmost column M1 of the lower table 130 are not changed, but the present invention is not limited to this case. When the column width of the lower table 130 is increased by two or more, for example, colspan of both columns M1 and M2 may be changed.
[0147]
Similarly to the above, when the line width of the upper-level column 121 is larger than the total line width of each column after conversion determined in step Se1 (step Se2), the file conversion apparatus 100 increases the line width of the converted column. Is performed (step Se3). FIG. 16 shows a processing example in the case where the row width (rowspan = 5) of the upper column 121 is larger than the total row width 1 + 2 + 1 = 4. Here, the line width correction target may be the first column 300, the second column 301, the column M1, or the like. Further, a plurality of columns may be set as correction targets.
[0148]
D2c. Add a basic area:
Next, the processing of steps Se4 and Se5 of FIG. 14 will be described. When it is determined that the column width of the column 121 is smaller than the column width of the lower table 130 (step Se4 in FIG. 14), the file conversion apparatus 100 executes a basic area addition process on the upper table 120 in step Sd5. I do.
[0149]
FIG. 17 is an explanatory diagram illustrating an example of processing for adding a basic area to an upper table. This shows the processing in step Se5 in FIG. In FIG. 17, the upper part shows the state before the processing, and the lower part shows the state after the processing.
[0150]
In the case of FIG. 17, the column width number 3 of the lower table is larger than the column width 2 of the upper column 121. Therefore, the file conversion device 100 increases the attribute data colspan in the upper column 121 to 3, as shown in the lower part of FIG. Note that the file conversion apparatus 100 increases the colspan in the display element columns 300 and 301 in the preceding and subsequent stages in addition to the increase in the colspan in the upper column 121.
[0151]
Similarly, when the line width of the upper column 121 is smaller than the aforementioned total line width (Step Se4 in FIG. 14), the file conversion apparatus 100 adds the basic area to the upper table 120 (Step Se5). ). FIG. 17 shows a case where the row width of the upper column 121 is made to match the total line width 1 + 2 + 1 = 4 by increasing the row span of the column 121 from 3 to 4.
[0152]
FIG. 18 is an explanatory diagram showing a portion related to a column around the column 121 in the basic region addition processing. The file conversion device 100 also changes colspan and the like in the columns surrounding the column 121 in the basic area addition processing in step Se5 of FIG. In FIG. 18, the upper stage shows the state before addition, and the lower stage shows the state after addition.
[0153]
In the state before the change, the upper column 121 has a column width of 2 and a row width of 3. Below the column 121, there are two columns 125 with a column width of 1 including the column α (dashed-dotted frame in the figure). Further, on the left side of the column 121, there are three columns 126 having a line width of 1 including the column β (broken line frame in the figure).
[0154]
Here, it is assumed that the column 121 is increased to the column width 3 and the row width 4 by the processing of step Se5 described above. At this time, as shown in the lower part of FIG. 18, the file conversion apparatus 100 increases the colspan in the column α and the rowspan in the column β to 2 in addition to the change of colspan in the column 121. Although FIG. 18 shows a case where the rightmost column α of the column 125 and the bottom column β of the column 126 are to be corrected, the present invention is not limited to such a case. The column to be corrected can be arbitrarily selected.
[0155]
The lower part of FIG. 18 also shows a specific configuration of the changed data. The range of data corresponding to the column 125 is a data range 125d. The data range corresponding to the column 126 is a data range 126d. Here, the data range 126d is a range excluding a hollow portion (data corresponding to the column 121). The file conversion device 100 specifies the data of the columns α and β from the data of the columns included in the data ranges 125d and 126d, respectively, and changes colspan and rowspan, respectively. When the row span in the column β is increased, due to grammatical restrictions, <tr> and </ tr> tags shown in capital letters in the conceptual diagram and the data configuration diagram of FIG. 18 are added.
[0156]
This concludes the description of steps Se1 to Se5 in FIG. Through these processes, the file conversion apparatus 100 can adjust the position and size of each column after conversion from the lower table 130 and the like in the upper column 121. The total row width and total column width of each column and the like after the conversion are matched with the row width and column width of the upper column 121.
[0157]
D2d. Adjust attribute information:
Next, the file conversion apparatus 100 adjusts the attribute data (Step Se6 in FIG. 14). As the attribute data to be adjusted, (i) attribute data composed of an end tag; (ii) attribute data inside an “able” tag; (iii) attribute data inside a <td> tag in a high-order column 121; No.
[0158]
FIG. 19 is an explanatory diagram illustrating addition of a start tag and an end tag. The upper part shows the state of the file before addition, and the lower part shows the state of the file after addition. Here, the start / end tags of <u> and </ u> are tags that specify that the surrounding display elements should be underlined. In the example in the upper part of FIG. 19, an underline is added to a range surrounded by <u> and </ u>, that is, the latter half of the display element of the former part and the former part of the display element of the latter part.
[0159]
In step Se6 of FIG. 14, the file conversion device 100 adds </ u> and <u> so that the underline is appropriately added to each converted column. In the column 300 including the preceding display element, an end tag </ u> corresponding to the start tag <u> is added to the end of the column. In a column 301 including a display element at a later stage, a start tag <u> corresponding to an end tag </ u> is added to the start end of the column. Although FIG. 19 illustrates the case of <u> and </ u> as an example, the file conversion apparatus 100 performs similar processing on various attributes specified in a form surrounded by a start tag and an end tag.
[0160]
Next, the transfer of the attribute data included in the <table> tag in the lower table 130 will be described. This is the same processing as the transfer of “style =“ text-decoration: underline; ”” in the above-described simple conversion processing (see FIG. 4; however, the attribute data is simplified by “underline” and shown). is there. In FIG. 19, the attribute data “style =“ text-decoration: underline; ”” of the <table> tag of the lower table 130 is converted into the attribute data “style =“ text = ”of the <td> tag of each converted column 130c. -Decoration: underline; "". Here, in FIG. 19, for convenience of illustration, the attribute data “style =“ text-decoration: underline; ”” is simplified and indicated by “underline”.
[0161]
Next, the transfer of the attribute data inside the <td> tag in the upper column 121 will be described. FIG. 15 shows an example of the transfer in this case. FIG. 15 shows a case where attribute data “style =“ text-decoration: underline; ”” of the <td> tag in the upper column 121 is transferred inside the <td> tag in each of the converted columns 300 and 301. Indicated. However, in the figure, for convenience of illustration, the attribute data “style =“ text-decoration: underline; ”” is simplified by “underline”. In the case of transferring the attribute data in the upper column 121, the display elements in the preceding and subsequent stages are transferred to the converted columns 300 and 301.
[0162]
In the attribute transfer processing described above, transfer is not performed on attribute data that specifies the entire size of the lower table 130 and the upper column 121, such as the width and height inside the <table> tag. In consideration of the size of the entire table 130 specified by the attribute data inside the <table> tag or the like, attribute data for specifying each size of each column after conversion may be added.
[0163]
D2e. Move data in each column:
If the colspan is adjusted only by the processing described above, the position and arrangement of each column after conversion are the same as those of each column of the lower table 130 before conversion due to the rules of the grammar of the markup language. It may be very different from the position / array, or a grammatical irregularity may occur. In step Se7 of FIG. 14, the file conversion apparatus 100 converts the data in each column into a predetermined format in the file according to the grammar rules of the markup language so as to realize a position / array corresponding to the position / array before conversion. Move to the site.
[0164]
FIG. 20 is a flowchart showing the data movement processing. The moving process is a process performed in step Se7 of FIG.
FIG. 21 is an explanatory diagram illustrating an example of the movement processing. In FIG. 21, the upper part shows the state of the file before moving, and the lower part shows the state of the file after moving.
[0165]
In the conceptual diagram in the upper part of FIG. 21, the lower table 130 to be integrated includes columns (2) to (5). The columns created in the upper table 120 according to these columns are the columns II, VI, V, and VIII in the table 120 in the lower conceptual diagram. The upper table 120 in the upper conceptual diagram has columns (1), (6), (7), (8) and a column 121 having a lower table 130. Columns (1), (6), (7), and (8) correspond to columns I, III, IV, and VII, respectively, in the lower conceptual diagram after conversion.
[0166]
In the following, the description will be made assuming that the display elements at the preceding and subsequent stages (see FIG. 15) in the upper column 121 are not considered, but columns 300 and 301 from these display elements are generated in the upper table 120. The same applies to the case.
[0167]
As shown in the data configuration diagram of the file before movement, the data in columns (1) to (8) are arranged in this order. The file conversion apparatus 100 needs to arrange the data in the columns (1) to (8) in the moved file in the order of the columns I to VIII in the lower part of FIG. Expressing using the symbols in the upper row, the order is (1) → (2) → (6) → (3) → (4) → (7) → (8) → (5).
[0168]
The data in each of the columns (2) to (5) of the lower table 130 is enclosed in <table> and </ table> adjacent to the file before being moved. However, in the moved file, they are not contiguous as a unit. For example, the data in column (6) (ie, III) exists between the data in column (2) (ie, II) and column (3) (ie, IV) of the lower table 130.
[0169]
However, the three data sets d2, d34, and d5 of columns (2), (3) and (4), and (5) in the file before the movement are included in the file after the movement for each data set. It is united.
[0170]
In step Sf1 of FIG. 20, the file conversion apparatus 100 specifies the data sets d2, d34, and d5 surrounded by <tr> and </ tr> in the lower table 130.
[0171]
Next, in step Sf2, the file conversion device 100 specifies, for each data set to be moved, a destination part of the data set. In FIG. 21, the destination parts of the data sets d2, d34, and d5 are the parts P2, P34, and P5 inside the data 151, 152, and 153 of the rows of the upper table 120, respectively.
[0172]
The file conversion apparatus 100 first specifies the data 151, 152, and 153 in the row of the higher-level table 120 for specifying the destination part. Based on the fact that the data 121d in the column 121 exists inside the data 151, the file conversion apparatus 100 can specify the three data 151, 152, 153 starting from the data 151 as the destination. The reason why there are three rows is that there are three data sets d2, d34 and d5 to be moved.
[0173]
Here, the data 151 includes columns (1) and (6) of the higher-level table 120. The data 152 includes the data in the column (7), and the data 153 includes the data in the column (8). These are the data in the conventional columns of the upper table 120 and are not the target of the movement processing.
[0174]
Next, the file conversion apparatus 100 specifies the destination parts p2, p34, and p5 in the data 151, 152, and 153 in the rows of the upper table 120 based on the position of the data 121d in the column 121 in the data 151. . In the example of FIG. 21, the upper column 121 is located in the basic region of the second column from the left in the row of the data 151 by counting the colspan value of <td>. The file conversion apparatus 100 specifies the parts p2, p34, and p5 corresponding to the positions of the basic areas in the second column from the left in the destination data 151, 152, and 153 as the destination parts.
[0175]
The specification of the destination site may be made by taking into account a) the position of the column 121 in the upper table 120; b) the position of each column in the lower table 130; Further, the position of the lower table 130 in the column 121 may be considered. If there are upper and lower display elements, it is desirable to take this into consideration.
[0176]
Through the processing in steps Sf1 and Sf2 described above, the file conversion apparatus 100 can specify the data sets d2, d34, and d5 to be moved and the destination parts p2, p34, and p5 of each data.
[0177]
In step Sf3, the file conversion device 100 deletes the <table> tag and the like in the lower table 130. The tags to be deleted at this time are the tags shown in the upper part of FIG. 21 using lowercase italic letters. For the lower table 130, the tags <table>, </ table>, <tr>, </ tr> are deleted. In the upper column 121, each tag of <td> and </ td> is deleted. Thereafter, in step Sf4, the file conversion apparatus 100 performs a process of moving each of the data sets d2, d34, and d5 specified in step Sf1 to the parts p2, p34, and p5 specified in step Sf2.
[0178]
In the above-described basic region addition process (step Se5 in FIG. 14 described in FIGS. 17 and 18), for convenience of description, the numerical value such as colspan of the <td> tag in the column 121 is changed (see FIG. 17). ), But this is not required. This is because the <td> tag in the column 121 is finally deleted in step Sf3 in FIG. In the basic region adding process, it is sufficient that the change is made substantially for the basic region associated with the column 121. For example, it suffices that processing such as attribute data change has been performed on columns other than the column 121 described with reference to FIG.
[0179]
D3. Review process:
FIG. 22 is a flowchart showing the process of reviewing the integration result. FIG. 23 is an explanatory diagram of an example of a process of reviewing the integration result. This process is a process in step Sc3 of FIG. As described above, in the table integration processing (step Sc2 in FIG. 9), the basic area of the upper table 120 can be changed by the basic area addition processing (step Se5 in FIG. 14). In the processing described below, the past integration processing is reviewed according to the increase in the degree of freedom of the basic area caused by the change.
[0180]
STEP 1 in FIG. 23 shows the initial state. In this example, the upper table 120 includes the lower table 130a in column A2A3 and the lower table 130 in column B2. Here, the dashed line in FIG.
[0181]
Next, in STEP2, it is assumed that the lower table 130a in the column A2A3 has been integrated into the upper table 120 by the above-described integration processing (step Sc2 in FIG. 9). The columns m1 and m2 of the lower table 130a have been converted to the columns m1 and m2 of the upper table 120. The columns m1 and m2 after the conversion are set to the column width 1 in the unit of the basic area in the table 120.
[0182]
Next, it is assumed that the integration process (Step Sc2 in FIG. 9) is performed again on the lower table 130b in STEP3. The columns x1 and x2 of the lower table 130b are converted to the columns x1 and x2 of the upper table 120.
[0183]
In the upper table 120 in STEP 3, the column width of the basic region is increased from 3 to 4 with the integration of the lower table 130b. Therefore, colspan in the column m1 is also increased from 1 to 2.
[0184]
In the process of FIG. 22 (step Sc3 of FIG. 9) subsequent to the integration process of step 3 (step Sc2 of FIG. 9), a process is performed according to the increase in the column width of the basic region of the upper table 120.
[0185]
First, in step Sg1 of FIG. 22, the file conversion device 100 specifies a column that has been generated by integration from the lower table and that has increased colspan in the current integration process. In the case of STEP 3 in FIG. 23, the column m1 is specified. Next, in step Sg2, it is checked whether or not the column m1 is the leftmost column in the lower table 130a before integration. If it is not the leftmost column, the process ends without performing any processing. If it is the leftmost column, the processes of steps Sg3 and Sg4 are executed.
[0186]
In order to explain the processing of steps Sg3 and Sg4, the state after performing these processings is shown in STEP4 of FIG. In step Sg3, the file conversion device 100 subtracts colspan in the leftmost column m1. In step Sg4, the file conversion apparatus 100 increases colspan in the column m2 on the right of the column m1.
[0187]
When the table 120 is integrated into a higher-level table, the column m1 and the like are converted into a higher-level table column than the table 120 by a further conversion process. Here, in the review processing relating to the basic area of the further upper table, it is assumed that the processing of steps Sg3 and Sg4 is also performed for the column m1 (the state of STEP 4) which is not the leftmost column in the direct lower table 120. Is also good. For example, in the determination in step Sg2, it may be detected that the column m1 (the state of STEP 1) in the table 130a lower than the table 120 is the leftmost column.
[0188]
The review process in FIG. 22 is not essential for the file conversion device 100. For example, the review process in FIG. 22 may be performed only when the amount of display elements in the leftmost column of the table is statistically smaller than in other columns.
[0189]
According to the file conversion device 100 in the present embodiment, a nested table in HTML can be converted into a format without nesting.
[0190]
The upper column 121 may include two or more lower tables. For example, in the conceptual diagram in the upper part of FIG. 15, at least one of the display elements in the former part and the latter part may include a different table from the lower part table 130. At this time, another lower table may be included in the converted column such as the display element in the previous stage. Further, the columns of a plurality of lower tables may be converted into the columns of the upper table 120 at once. For example, the above-described total line width and total line number may be calculated according to a plurality of lower tables.
[0191]
E. FIG. Second embodiment:
In the second embodiment, a modification example relating to the process of moving data in each column of the lower table (step Se7 in FIG. 14: described in detail in FIGS. 20 and 21) will be described. In the second embodiment, there is no need to perform data movement processing for each column of a lower table in step Se7 of FIG. 14 for each lower table. The data movement processing performs the movement processing for a plurality of lower tables in a lump.
[0192]
FIG. 24 is an explanatory diagram showing an upper table 120 including two lower tables 130P and 130V. 24 includes a lower table 130P in a column P1 and a lower table 130V in a column V1. The columns P1 and V1 have display elements at the front and rear, respectively, before and after the tables 130P and 130V. The file conversion device 100 displays four columns corresponding to each column of the table 130P, six columns corresponding to each column of the table 130V, and the first and second columns of the columns P1 and V1 as columns of the upper table 120. Create four columns according to the element.
[0193]
First, it is assumed that of the lower tables 130P and 130V, the table 130V is selected as a target of the integration processing (step Sb2 in FIG. 5). As a result of the integration processing (FIG. 14) according to the table 130V, as shown in FIG. 24, in the column V1, colspan is set to 2 and rowspan is set to 5 (step Se5 in FIG. 14; reference). At this time, the row span of the column P1 adjacent to the left side of the column V1 is also set to 5 (see the description of FIG. 18). Note that the division of the basic region in the upper table 120 is indicated by a broken line in FIG. Here, after setting the row span or the like, moving the data in each column or the like of the table 130V (step Se7 in FIG. 14) is not performed in the second embodiment. This processing is separately performed later.
[0194]
Next, it is assumed that the remaining lower table 130P is selected as a target of the integration processing (step Sb2 in FIG. 5). In the integration processing according to the table 130P, processing such as setting the row span of the display element column 301P of the latter stage to 2 is performed. However, as in the case of the table 130V, the data movement processing of each column of the table 130P (step Se7 in FIG. 14) is not performed at this time. This processing is separately performed later.
[0195]
As described above, the setting of colspan and the like in the upper columns P1 and V1 and the columns in the lower tables 130P and 130V can be completed. At this point, the data in each column of the lower tables 130P and 130V are collected together (see the upper part of FIG. 21). Thereafter, the file conversion device 100 performs a data transfer process. This processing is almost the same as the data movement processing (FIGS. 20 and 21) in the first embodiment. However, this embodiment differs from the first embodiment in that the processes related to a plurality of upper columns P1 and V1 are collectively performed.
[0196]
In the second embodiment, the data set serving as the transfer unit specified by the file conversion device 100 in step Sf1 of FIG. 20 is a data set that covers a plurality of upper columns P1 and V1. In the case of FIG. 24, since the row span of the columns P1 and V1 is 5, five data sets are specified. Specifically, a data set including data of the preceding display element column 300P (within column P1) and the preceding display element column 300V (within column V1), columns m1, m2 (within column P1), and columns s1, s2 A data set composed of data in (column V1), a data set composed of data in columns n1 and n2 (in column P1) and columns t1 and t2 (in column V1), and a column 301P (column P1) And a data set composed of data of columns u1 and u2 (within column V1) and a data set composed of data of a column 301V (within column V1) of a subsequent display element.
[0197]
The specification of the movement destination part in step Sf2 and the movement processing in step Sf4 can be performed in the same manner as in the first embodiment. Further, the deletion of the <table> tag and the like in step Sf3 can be performed in the same manner as in the first embodiment. However, this is different from the first embodiment in that tags of a plurality of tables 130P and 130V are collectively subjected to deletion or the like.
[0198]
Even in the case of the second embodiment, the process of reviewing the integration result (step Sc3 in FIG. 9 described in detail with reference to FIGS. 22 and 23) can be used.
[0199]
Although FIG. 24 shows a case where the upper columns P1 and V1 related to the movement process are adjacent to each other, the same applies to a case where they are not adjacent. FIG. 24 shows a case where the upper columns P1 and V1 related to the movement process are arranged in the horizontal direction. However, the columns P1 and V1 are arranged in the vertical direction and the columns P1 and V1 are arranged in the oblique direction. Also in this case, the collective movement processing of the data related to the columns P1 and V1 can be performed.
[0200]
Further, in the case of FIG. 24, the upper table 120 may include three or more lower tables, such as when at least one of the columns P2 and V2 includes a lower table. In such a case, data movement processing for all lower tables included in the upper table 120 may be performed collectively, or only movement processing for a predetermined part of lower tables may be performed collectively. You may. In the case where only the processing for a predetermined part of the lower tables is performed collectively, the setting of coslpan and the like of the lower tables other than the table related to the moving processing may be performed after the moving processing.
[0201]
As described above, the file conversion device according to the present invention has been described based on the embodiments. However, the embodiments of the present invention described above are intended to facilitate understanding of the present invention, and do not limit the present invention. . The present invention can be changed and improved without departing from the spirit and scope of the claims.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing a file conversion device 100.
FIG. 2 is an explanatory diagram showing an example of an HTML file.
FIG. 3 is a flowchart showing a simple conversion process.
FIG. 4 is an explanatory diagram showing each column specified in the simple conversion process.
FIG. 5 is a flowchart illustrating a table conversion process.
FIG. 6 is an explanatory diagram showing an example of a nested table.
FIG. 7 is an explanatory diagram showing a block conversion process of a lower table.
FIG. 8 is an explanatory diagram showing a block conversion process of a higher order table.
FIG. 9 is a flowchart illustrating a merge process.
FIG. 10 is a flowchart showing a preparation process.
FIG. 11 is an explanatory diagram showing a movement process.
FIG. 12 is an explanatory diagram showing a sharing cancellation process of a basic area.
FIG. 13 is an explanatory diagram showing a column addition process.
FIG. 14 is a flowchart illustrating an integration process.
FIG. 15 is an explanatory diagram showing an example of grasping a column configuration.
FIG. 16 is an explanatory diagram showing an example of processing for increasing the number of widths of the lower table 130.
FIG. 17 is an explanatory diagram showing an example of processing for adding a basic area to the upper column 120;
FIG. 18 is an explanatory diagram showing a part related to a column around a column 121 in the basic area adding process.
FIG. 19 is an explanatory diagram showing addition of a start tag and an end tag.
FIG. 20 is a flowchart showing data movement processing.
FIG. 21 is an explanatory diagram illustrating a processing example of a moving process;
FIG. 22 is a flowchart showing a process of reviewing an integration result.
FIG. 23 is an explanatory diagram illustrating an example of a process of reviewing the integration result;
FIG. 24 is an explanatory diagram showing an upper table 120 including two lower tables 130P and 130V.
[Explanation of symbols]
100 ... file conversion device
100c ... keyboard
101: File input unit
102: User input unit
103: Processing rule storage unit
104: Basic processing unit
105: Grammar storage unit
106 ... Table processing unit
107: Structure specifying part
108: Tag operation unit
109: Data moving unit
110 ... output unit
120 ... Top table
120t ... <table> tag in Table 120
121... Column having lower table
125... Where the line of the basic area matches the column 121
126... Where the column of the basic area matches the column 121
130 ... lower table
130a, 130b ... lower table
130c: Each column of the upper table converted from the lower table 130
140 ... Sentence to be moved
141 <table> tag of the table including the sentence 140
142 <tr> tag adjacent to the <table> tag 141
151, 152, 153... Data of rows in the upper table 120
d2, d34, d5 ... Data set to be moved
p2, p34, p5: destination sites of the data sets d2, d34, d5
121d: Data in column 121d
300: Column after conversion of display element at the previous stage
301... Column after conversion of display element at the later stage

Claims (24)

マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換するファイル変換装置であって、
前記マークアップ言語は、1つ以上の欄よりなる表を表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む欄を備える入れ子の上位の表を有し、
前記表を表すタグ、又は、1つ以上の該欄を表すタグの少なくとも一方について、該タグの削除及び変更の少なくとも1つを行う変換部を備えるファイル変換装置。
A file conversion device for converting a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table comprising one or more columns;
The first file has a nested upper table with a column containing the nested lower table;
A file conversion device including a conversion unit that performs at least one of deletion and change of at least one of a tag representing the table and one or more tags representing the column.
請求項1記載のファイル変換装置であって、
前記削除又は変更の少なくとも一方の対象となる欄について、前記変換後の表示位置の情報を入力する位置情報入力部を備え、
前記変換部は、前記第2のファイルに、該情報を含めるファイル変換装置。
The file conversion device according to claim 1, wherein
For at least one of the columns to be deleted or changed, a position information input unit that inputs information of the display position after the conversion,
The file conversion device, wherein the conversion unit includes the information in the second file.
マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換するファイル変換装置であって、
前記マークアップ言語は、1つ以上の欄よりなる表と、該欄に対応付けられた、該欄ごとの所定の情報要素とを表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む情報要素に係る欄を備える入れ子の上位の表を有し、
前記下位の表を展開し、該下位の表の欄を、前記上位の表の欄に変換する変換部を備えるファイル変換装置。
A file conversion device for converting a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table including one or more columns and a predetermined information element for each of the columns, which is associated with the columns.
The first file has a nested upper table including a field related to an information element including a nested lower table,
A file conversion apparatus comprising: a conversion unit that expands the lower table and converts a column of the lower table into a column of the upper table.
請求項3記載のファイル変換装置であって、
前記表は、縦方向及び横方向に1つ以上配列された基本領域を有し、
前記欄は、その縦方向の行幅及び横方向の列幅が、前記基本領域の配列数で規定され、1つ以上の所定の前記基本領域と対応付けられているファイル変換装置。
The file conversion device according to claim 3, wherein
The table has one or more basic regions arranged in the vertical and horizontal directions,
In the file conversion device, the column has a row width in a vertical direction and a column width in a horizontal direction defined by the number of arrangements of the basic areas, and is associated with one or more predetermined basic areas.
請求項3記載のファイル変換装置であって、
前記変換部は、内部に別の表を含まない下位の表について前記変換を行うファイル変換装置。
The file conversion device according to claim 3, wherein
The file conversion device, wherein the conversion unit performs the conversion on a lower table that does not include another table.
請求項3記載のファイル変換装置であって、
前記表全体の列幅が1であるか否かを検出する検出部を備え、
前記変換部は、前記列幅が1である場合に、前記表を表すタグ、又は、1つ以上の該欄を表すタグの少なくとも一方について、該タグの削除及び変更の少なくとも1つを行うファイル変換装置。
The file conversion device according to claim 3, wherein
A detection unit that detects whether a column width of the entire table is 1;
The conversion unit, when the column width is 1, for at least one of a tag representing the table or one or more tags representing the column, performing at least one of deleting and changing the tag. Conversion device.
請求項3記載のファイル変換装置であって、
前記下位の表全体に対応付けられた所定の属性情報に応じて、前記変換後の欄ごとに対応付けられた属性情報を作成する属性情報作成部を備えるファイル変換装置。
The file conversion device according to claim 3, wherein
A file conversion device comprising: an attribute information creation unit that creates attribute information associated with each of the converted columns in accordance with predetermined attribute information associated with the entire lower table.
請求項7記載のファイル変換装置であって、
前記属性情報作成部は、前記表の大きさに係る前記属性情報を除いて、前記作成を行うファイル変換装置。
The file conversion device according to claim 7, wherein
The file conversion device, wherein the attribute information creating unit performs the creation except for the attribute information relating to the size of the table.
請求項4記載のファイル変換装置であって、
前記変換に先立って、いずれの前記基本領域もいずれか1つの前記欄と前記対応を有するように、前記欄の大きさの修正と新たな前記欄の追加との少なくとも一方を行う修正部を備えるファイル変換装置。
The file conversion device according to claim 4, wherein
Prior to the conversion, a correction unit is provided that performs at least one of correction of the size of the column and addition of a new column so that any of the basic areas has the correspondence with any one of the columns. File conversion device.
請求項4記載のファイル変換装置であって、
前記縦方向又は横方向の少なくとも一方において、前記下位の表の前記幅数と、前記上位の表において該下位の表を含む欄に対する配列数の一方を選択する選択部と、
該選択された数に基づいて、前記幅数及び配列数の少なくとも一方を変更する変更部とを備えるファイル変換装置。
The file conversion device according to claim 4, wherein
In at least one of the vertical direction or the horizontal direction, the width number of the lower table, and a selection unit that selects one of the number of arrays for the column including the lower table in the upper table,
A changing unit that changes at least one of the number of widths and the number of arrays based on the selected number.
請求項3記載のファイル変換装置であって、
前記第1のファイルにおける表のデータは、
前記表の開始又は終了を表す表特定タグと、
1つ以上の前記欄の開始又は終了位置を特定する区分タグとを有し、
前記表特定タグと、該表特定タグの直前又は直後の前記区分タグとが囲う情報要素の少なくとも一方を前記表の外部に移動する移動部を備えるファイル変換装置。
The file conversion device according to claim 3, wherein
The table data in the first file is:
A table identification tag indicating the start or end of the table,
A division tag for specifying a start or end position of one or more of the columns,
A file conversion device comprising: a moving unit configured to move at least one of information elements enclosed by the table specifying tag and the section tag immediately before or immediately after the table specifying tag to the outside of the table.
請求項3記載のファイル変換装置であって、
前記上位の表の欄には、前記下位の表に含まれないその他の情報要素を含み、
前記変換部は、該その他の情報要素を、前記下位の表から変換された欄と異なる、前記上位の表の1つ以上の欄に変換するファイル変換装置。
The file conversion device according to claim 3, wherein
The column of the upper table includes other information elements not included in the lower table,
The file conversion device, wherein the conversion unit converts the other information elements into one or more columns of the upper table different from the columns converted from the lower table.
請求項12記載のファイル変換装置であって、
前記第1のファイルは、該ファイルの2箇所の所定の属性タグであって、該属性タグが囲む前記情報要素の所定の属性を特定する属性タグを有し、
前記属性タグが囲む情報要素については、前記変換後の欄でも所定の属性タグに囲まれるように、前記変換後の欄の終端及び始端の少なくとも一方に前記属性タグを追加する属性タグ追加部を備えるファイル変換装置。
The file conversion device according to claim 12, wherein
The first file has two predetermined attribute tags of the file, and has an attribute tag for specifying a predetermined attribute of the information element surrounded by the attribute tag,
Regarding the information element surrounded by the attribute tag, an attribute tag adding unit that adds the attribute tag to at least one of the end and the starting end of the converted column so as to be surrounded by the predetermined attribute tag also in the converted column. File conversion device.
請求項12記載のファイル変換装置であって、
前記第1のファイルは、前記下位の表を含む上位の表の欄に対応付けて、所定の属性を表す属性情報を有し、
前記変換部は、前記属性情報に相当する属性を、前記変換後の欄に与えるファイル変換装置。
The file conversion device according to claim 12, wherein
The first file has attribute information indicating a predetermined attribute in association with a column of a higher table including the lower table,
The file conversion device, wherein the conversion unit gives an attribute corresponding to the attribute information to the converted column.
請求項12記載のファイル変換装置であって、
前記変換部は、前記上位の表の欄の前記配列数に応じて、前記その他の情報要素に係る変換後の欄の前記配列数を設定するファイル変換装置。
The file conversion device according to claim 12, wherein
The file conversion device, wherein the conversion unit sets the number of arrays in the converted column of the other information elements according to the number of arrays in the column of the upper table.
請求項4記載のファイル変換装置であって、
前記変換後の欄に対応付けられる基本領域を、前記配列の縦又は横方向に追加する基本領域操作部と、
前記変換後の欄が前記追加される基本領域に対応付けられるように、前記変換後の欄の前記規定される配列数を調整する対応調整部とを備えるファイル変換装置。
The file conversion device according to claim 4, wherein
A basic region operating unit that adds a basic region associated with the converted column in the vertical or horizontal direction of the array,
A file conversion apparatus comprising: a correspondence adjustment unit that adjusts the specified number of arrays in the converted column so that the converted column is associated with the basic region to be added.
請求項16記載のファイル変換装置であって、
前記基本領域操作部は、前記変換より過去の前記変換に係る欄を含む表について前記追加を行い、
該追加に応じ、前記過去の変換に係る欄の前記基本領域との前記対応を再設定する再設定部を備えるファイル変換装置。
The file conversion device according to claim 16,
The basic area operation unit performs the addition for a table including a column related to the conversion in the past than the conversion,
A file conversion device, comprising: a resetting unit that resets the correspondence with the basic area in a column related to the past conversion according to the addition.
請求項3記載のファイル変換装置であって、
前記下位の表のデータを表すタグ及び、該表の1つ以上の欄を表すタグの少なくとも1つを削除するファイル変換装置。
The file conversion device according to claim 3, wherein
A file conversion apparatus for deleting at least one of a tag representing data of the lower table and a tag representing one or more columns of the table.
請求項3記載のファイル変換装置であって、
前記変換部は、前記下位の表の欄ごとに、
該下位の表の欄が該下位の表のうちで占める位置と、
該下位の表が前記上位の表の欄のうちで占める位置と、
前記上位の表の欄が前記上位の表のうちで占める位置との少なくとも1つに応じて、
該下位の表の欄のデータを、前記上位の表のデータにおける所定の部位に移動させるファイル変換装置。
The file conversion device according to claim 3, wherein
The conversion unit, for each column of the lower table,
The position of the lower table column in the lower table;
The position of the lower table in the columns of the upper table;
According to at least one of the positions of the columns of the upper table and the position occupied in the upper table,
A file conversion device for moving data in a column of the lower table to a predetermined part in the data of the upper table.
マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換するファイル変換方法であって、
前記マークアップ言語は、1つ以上の欄よりなる表を表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む欄を備える入れ子の上位の表を有し、
前記表を表すタグ、又は、1つ以上の該欄を表すタグの少なくとも一方について、該タグの削除及び変更の少なくとも1つを行う工程を備えるファイル変換方法。
A file conversion method for converting a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table comprising one or more columns;
The first file has a nested upper table with a column containing the nested lower table;
A file conversion method comprising a step of performing at least one of deletion and modification of at least one of a tag representing the table and one or more tags representing the column.
コンピュータに、マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換させるためのコンピュータプログラムであって、
前記マークアップ言語は、1つ以上の欄よりなる表を表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む欄を備える入れ子の上位の表を有し、
前記表を表すタグ、又は、1つ以上の該欄を表すタグの少なくとも一方について、該タグの削除及び変更の少なくとも1つを行う機能を前記コンピュータに実現させるためのコンピュータプログラム。
A computer program for causing a computer to convert a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table comprising one or more columns;
The first file has a nested upper table with a column containing the nested lower table;
A computer program for causing the computer to implement a function of performing at least one of deletion and change of at least one of a tag representing the table and one or more tags representing the column.
マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換するファイル変換方法であって、
前記マークアップ言語は、1つ以上の欄よりなる表と、該欄に対応付けられた、該欄ごとの所定の情報要素とを表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む情報要素に係る欄を備える入れ子の上位の表を有し、
前記下位の表を展開し、該下位の表の欄を、前記上位の表の欄に変換する工程を備えるファイル変換方法。
A file conversion method for converting a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table including one or more columns and a predetermined information element for each of the columns, which is associated with the columns.
The first file has a nested upper table including a field related to an information element including a nested lower table,
A file conversion method comprising a step of expanding the lower table and converting a column of the lower table into a column of the upper table.
コンピュータに、マークアップ言語で表された第1のファイルを、マークアップ言語で表された第2のファイルに変換させるためのコンピュータプログラムであって、
前記マークアップ言語は、1つ以上の欄よりなる表と、該欄に対応付けられた、該欄ごとの所定の情報要素とを表現可能であり、
前記第1のファイルは、入れ子の下位の表を含む情報要素に係る欄を備える入れ子の上位の表を有し、
前記下位の表を展開し、該下位の表の欄を、前記上位の表の欄に変換する機能を前記コンピュータに実現させるためのコンピュータプログラム。
A computer program for causing a computer to convert a first file expressed in a markup language into a second file expressed in a markup language,
The markup language can represent a table including one or more columns and a predetermined information element for each of the columns, which is associated with the columns.
The first file has a nested upper table including a field related to an information element including a nested lower table,
A computer program for causing the computer to expand the lower table and convert a column of the lower table into a column of the upper table.
請求項21,23いずれか記載のコンピュータプログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium recording the computer program according to claim 21.
JP2003041325A 2003-02-19 2003-02-19 File conversion device developing table expressed by markup language Pending JP2004252655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003041325A JP2004252655A (en) 2003-02-19 2003-02-19 File conversion device developing table expressed by markup language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003041325A JP2004252655A (en) 2003-02-19 2003-02-19 File conversion device developing table expressed by markup language

Publications (1)

Publication Number Publication Date
JP2004252655A true JP2004252655A (en) 2004-09-09

Family

ID=33024938

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003041325A Pending JP2004252655A (en) 2003-02-19 2003-02-19 File conversion device developing table expressed by markup language

Country Status (1)

Country Link
JP (1) JP2004252655A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211403A (en) * 2009-03-09 2010-09-24 Nec System Technologies Ltd Information processing apparatus, development processing method of multidimensional array, and program
US9892107B2 (en) 2013-07-31 2018-02-13 International Business Machines Corporation Associating mentioned items between documents
CN111352983A (en) * 2018-12-24 2020-06-30 深圳市优必选科技有限公司 Service attribute dynamic expansion method and device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211403A (en) * 2009-03-09 2010-09-24 Nec System Technologies Ltd Information processing apparatus, development processing method of multidimensional array, and program
US9892107B2 (en) 2013-07-31 2018-02-13 International Business Machines Corporation Associating mentioned items between documents
CN111352983A (en) * 2018-12-24 2020-06-30 深圳市优必选科技有限公司 Service attribute dynamic expansion method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US4912669A (en) Document-editing system
WO1994014122A1 (en) System for display of structured documents
CN103268340A (en) Format reflowable file establishing and drawing method based on hierarchical index
KR19980070953A (en) Document processing device and program medium
US20100031176A1 (en) Method of defining focus movement order and moving focus, and computer readable recording medium for executing the method
JP2005044279A (en) Method, program and apparatus for business form processing
US20060085739A1 (en) Document processing apparatus and control method thereof
US20080098299A1 (en) Document conversion and use system
JPH06251007A (en) Table data input device
JPH0541997B2 (en)
JP2004252655A (en) File conversion device developing table expressed by markup language
US20050210375A1 (en) Apparatus, method, and program for integrating documents
JPH10222510A (en) Document converting method
JP2011118818A (en) Image processing device
JP2003085160A (en) Source file forming device
JP2005063243A (en) Information processor, program, and computer-readable storage medium
JP4288972B2 (en) Layout system, layout support system, layout support program, and layout support method
JP2019074875A (en) Information processor, control method and program
JP4189461B2 (en) File management program, computer-readable recording medium storing file management program, file management apparatus, and file management method
JP2004145736A (en) Character recognition device, character recognition data output method, program and recording medium
JP2014134955A (en) Supplemental explanation-attached document display device
JP5835820B2 (en) Text editing system, text editing method, and text editing program
JP4737659B2 (en) Table set database system and table set data creation device
JPH07107711B2 (en) Document image processing device
JPS60167059A (en) System for using chart and data in document