JPH0764972A - Structural document editing system - Google Patents

Structural document editing system

Info

Publication number
JPH0764972A
JPH0764972A JP5162327A JP16232793A JPH0764972A JP H0764972 A JPH0764972 A JP H0764972A JP 5162327 A JP5162327 A JP 5162327A JP 16232793 A JP16232793 A JP 16232793A JP H0764972 A JPH0764972 A JP H0764972A
Authority
JP
Japan
Prior art keywords
document
type definition
tag
creating
node
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
JP5162327A
Other languages
Japanese (ja)
Inventor
Shigeya Senda
滋也 千田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP5162327A priority Critical patent/JPH0764972A/en
Publication of JPH0764972A publication Critical patent/JPH0764972A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To permit a user to grasp document structure at a glance. CONSTITUTION:When an editor reads an SGML document, DTD(document-type definition), at first, an input is analyzed by an SGML parser 2. An SGML parser 2 generates a finite automaton (DFA) 5 in accordance with DTD as an analyzed result and stores it in DTD holding part 3. DFA 5 expresses the possible arrayal of low-order node in respective tags. DFA 5 is generated every tag which is defined by DTD. In a succeeding processing, it is utilized so as to continue analyzing the SGML document. Tree structure corresponding to document structure is generated in an internal part as the result of the analysis of the SGML document itself. Generated tree structure is stored in a document storing part 4.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【技術分野】本発明は、構造文書編集方式に関し、より
詳細には、文書型定義に基づく文書インスタンスを字下
げされた木構造によって表示することで、文書の構造を
一目で把握できるようにした構造文書編集方式に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a structured document editing method, and more specifically, displaying a document instance based on a document type definition in an indented tree structure so that the document structure can be grasped at a glance. This relates to a structured document editing method.

【0002】[0002]

【従来技術】SGML規格は、構造化文書の交換を標準
化するための規格である。文書の構造は、文書型定義
(DTD,Document Type Definition)によって定
義される。DTDで規定された文書構造にしたがって文
書を作成する場合、プレーンテキストとしてタグを内容
と同時に入力し、バッチ処理によってSGML文書を処
理するか、専用のエディット機能を持つ構造化文書エデ
ィタを利用する必要がある。従来の構造化文書エディタ
では、タグの表現として画面上に開始タグ,終了タグを
文書の文者並びと同時に表現する方法がとられている。
この方法では、 タグの範囲が一目では分かり難い、 タグの階層関係が一目では分かり難い、 構造単位の編集操作が難しい、 などの欠点がある。
The SGML standard is a standard for standardizing the exchange of structured documents. The structure of a document is defined by a document type definition (DTD). When creating a document according to the document structure specified by DTD, it is necessary to input the tag as plain text at the same time as the content and process the SGML document by batch processing, or use a structured document editor with a dedicated edit function. There is. In a conventional structured document editor, a method of expressing a start tag and an end tag on the screen at the same time as the list of the writer of the document is used as the expression of the tag.
This method has drawbacks such as the range of tags is difficult to understand at a glance, the hierarchical relationship of tags is difficult to understand at a glance, and editing operations in structural units are difficult.

【0003】[0003]

【目的】本発明は、上述のごとき実情に鑑みてなされた
もので、文書型定義に基づく文書インスタンスを字下げ
された木構造で表現し、タグをノードとして表現するこ
とで、開始,終了タグなしに文書を表現するようにした
構造文書編集方式を提供することを目的としてなされた
ものである。
[Purpose] The present invention has been made in view of the above situation, and a document instance based on a document type definition is expressed by an indented tree structure, and a tag is expressed as a node. The purpose of the invention is to provide a structured document editing method that allows a document to be expressed without any information.

【0004】[0004]

【構成】本発明は、上記目的を達成するために、(1)
SGML文書を入力する入力手段と、該入力手段により
入力されたSGML文書を解析する解析手段と、該解析
手段の解析結果として文書型定義に対応して有限オート
マトンを作成する作成手段と、該作成手段により作成さ
れた有限オートマトンを保持する格納手段と、前記SG
ML文書自体の解析の結果として内部に文書構造に対応
する木構造を作成する木構造作成手段と、該木構造作成
手段により作成された木構造を格納する文書保持手段と
から成り、前記文書型定義に基づく文書インスタンスを
字下げされた木構造によって表示すること、更には、
(2)新規タグの作成時において、前記文書型定義に基
づき下位構造を自動挿入する際、該文書型定義に基づい
て下位構造に多義性がある場合、それを選択させる機構
を有する新規タグ作成手段を有すること、更には、
(3)新規タグの作成時において、前記文書型定義に基
づき下位構造を自動的に多義性のないノードを挿入する
新規タグ作成手段を有すること、更には、(4)前記文
書型定義に基づく文書インスタンスを表示する際、ある
タグの下部構造が文書型定義を満たしていない場合、下
部構造が不適合であるノードをハイライト等で使用者に
示すこと、更には、(5)前記文書型定義に基づく文書
インスタンスを表示する際、あるタグの下部構造を隠蔽
する表示手段を有すること、更には、(6)前記文書型
定義に基づく文書インスタンスを表示する際、あるタグ
を下部構造を含めて移動する移動手段を有すること、更
には、(7)前記文書型定義に基づく文書インスタンス
を表示する際、あるタグを下部構造を含めてヤンクバッ
ファに保管し、タグを文書インスタンス上の任意の位置
に挿入できる挿入手段を有すること、更には、(8)前
記文書型定義に基づく文書インスタンスを表示する際、
あるタグを移動・挿入する手段において、移動先を文書
型定義に従い制限することを特徴としたものである。以
下、本発明の実施例に基づいて説明する。
In order to achieve the above object, the present invention provides (1)
Input means for inputting an SGML document, analysis means for analyzing the SGML document input by the input means, creation means for creating a finite automaton corresponding to the document type definition as the analysis result of the analysis means, and the creation Storage means for holding a finite state automaton created by the means, and the SG
The ML document itself includes a tree structure creating unit that creates a tree structure corresponding to the document structure as a result of the analysis, and a document holding unit that stores the tree structure created by the tree structure creating unit. Displaying document instances based on the definition in an indented tree structure, and
(2) When a substructure is automatically inserted based on the document type definition at the time of creating a new tag, if the substructure has ambiguity based on the document type definition, a new tag creation having a mechanism for selecting it Having means, and further,
(3) When a new tag is created, it has a new tag creating means for automatically inserting a node having no ambiguity in a lower structure based on the document type definition, and (4) based on the document type definition. When displaying a document instance, if the substructure of a certain tag does not satisfy the document type definition, the node whose substructure is incompatible is shown to the user by highlighting, and further, (5) the document type definition When displaying a document instance based on, a display means for hiding a lower structure of a certain tag is provided, and (6) when displaying a document instance based on the document type definition, a certain tag including a lower structure is included. (7) When displaying a document instance based on the document type definition, a certain tag including a substructure is stored in the Yank buffer, Having an insertion means for insertion into any position on the document instance, furthermore, when displaying a document instance based on the document type definition (8),
In the means for moving / inserting a certain tag, the moving destination is limited according to the document type definition. Hereinafter, description will be given based on examples of the present invention.

【0005】図1は、本発明による構造文書編集方式の
一実施例を説明するための構成図で、図中、1はSGM
L文書、2はSGMLパーザ、3はDTD(Document T
ypeDefinition:文書型定義)保持部、4は文書保持
部、5はDFA(有限オートマトン)、6は編集処理
部、7は文書木構造、8はYank Buffer、9は表示入力
部である。
FIG. 1 is a block diagram for explaining an embodiment of a structured document editing system according to the present invention, in which 1 is an SGM.
L document, 2 is SGML parser, 3 is DTD (Document T
ypeDefinition: document type definition) storage unit, 4 document storage unit, 5 DFA (finite automaton), 6 edit processing unit, 7 document tree structure, 8 Yank Buffer, and 9 display input unit.

【0006】エディタの入力はSGML文書1である。
SGML文書1内には、DTDの指定またはDTDその
ものが記述されている。エディタはSGML文書1を入
力として受取り、編集結果を出力としてSGML文書形
式で格納する。新規文書の場合、使用者にDTDを指定
してもらい、DTDのみを読み込む。エディタがSGM
L文書・DTDを読み込む場合、まず、入力をSGML
パーザ2で解析する。SGMLパーザ2は、解析結果と
してDTDに対応して、図2に示すような有限オートマ
トン(DFA)5を作成し、DTD保持部3に格納す
る。DFA5は、各タグの下位のノードの可能な並びを
表現する。図2は、1つのタグ "kaigi" についてのD
FAである。DTDで定義される各タグ毎にDFA5が
作成される。後の処理では、それを利用してSGML文
書の解析を続ける。SGML文書自体の解析の結果とし
て、図3に示すように、内部に文書構造に対応する木構
造を作成する。作成した木構造は、文書保持部に格納さ
れる。すなわち、木構造で表現し、タグをノードとして
表現することで、開始,終了タグなしに文書を表現する
(請求項1)。
The input of the editor is the SGML document 1.
In the SGML document 1, the DTD designation or the DTD itself is described. The editor receives the SGML document 1 as an input and stores the edited result as an output in the SGML document format. In the case of a new document, the user is asked to specify the DTD and only the DTD is read. Editor is SGM
When reading an L document / DTD, the input is SGML first.
Analyze with parser 2. The SGML parser 2 creates a finite state automaton (DFA) 5 as shown in FIG. 2 corresponding to the DTD as the analysis result, and stores it in the DTD holding unit 3. DFA5 represents a possible sequence of nodes under each tag. Figure 2 shows D for one tag "kaigi"
FA. A DFA 5 is created for each tag defined by DTD. In the subsequent processing, it is used to continue the parsing of the SGML document. As a result of the analysis of the SGML document itself, a tree structure corresponding to the document structure is created inside, as shown in FIG. The created tree structure is stored in the document holding unit. In other words, by expressing the document in a tree structure and expressing the tags as nodes, the document is expressed without the start and end tags (claim 1).

【0007】木構造の各ノードには、種別毎に情報が保
持されている。 タグ :タグ名,属性 データ:文字列データ processing instruction:文字列データ また、ノードに共通の情報も格納されている。 可能状態 :ノードが画面上で表示されるべきか ハイライト :画面上でハイライトすべきか ノードポインタ:親,子供,兄弟の各ノードへのポイン
タ情報
[0007] Each node of the tree structure holds information for each type. Tag: Tag name, attribute data: Character string data processing instruction: Character string data In addition, information common to nodes is also stored. Possible state: Whether the node should be displayed on the screen Highlight: Should it be highlighted on the screen Node pointer: Parent, child, sibling pointer information to each node

【0008】これらの情報の使用法は後述する。図4
に、図2,図3に対応するSGML文書のDTDの一部
を示す。また、図4のDTDを使用した文書の例の一部
を図5に示す。エディタは、図3の木構造に対応して表
示部においてインデントされた木構造を表示する。図6
にX11R5,Motif1.2を使用した実施例の画面を示す。
実施例では、画面上のインデントされた木構造をWidge
tで表現している。Widgetは、X11での画面上のオブジ
ェクトである。マウスやキー入力などのイベントは、W
idgetに登録されたcallback関数によって処理される。
How to use these pieces of information will be described later. Figure 4
2 shows a part of the DTD of the SGML document corresponding to FIGS. Further, FIG. 5 shows a part of an example of a document using the DTD of FIG. The editor displays the indented tree structure on the display unit corresponding to the tree structure of FIG. Figure 6
The screen of the embodiment using X11R5 and Motif1.2 is shown in FIG.
In the embodiment, the indented tree structure on the screen is Widge
It is expressed by t. Widget is an X11 object on the screen. Events such as mouse and key input are W
It is processed by the callback function registered in idget.

【0009】図7は、メニューから新規作成を選択した
場合に呼び出されるcallbackの処理フローチャートであ
る。以下、各ステップに従って順に説明する。step1 :まず、DTDで指定されたトップのタグを生成
し、該タグをxとする。 step2 :次に、xがないかどうかを判断する。xがなけ
れば終了する。step3 :前記step2において、xがあるならば、次にx
に対応するDFAを取り出す。step4 :次に、DFAのノードポインタをpとする時、
pをDFAの開始状態におく。step5 :次に、pは終了状態かどうかを判断する。
In FIG. 7, the new creation is selected from the menu.
It is a processing flowchart of the callback called in the case
It Hereinafter, each step will be described in order.step1 : First, generate the top tag specified by DTD
Then, the tag is set to x. step2 : Next, it is determined whether x is absent. without x
If it ends.step3 : If there is x in step 2, then x
The DFA corresponding to is taken out.step4 : Next, when the DFA node pointer is p,
Put p in the DFA start state.step5 : Next, it is determined whether p is in the end state.

【0010】step6:前記step5において、pは終了状
態であれば、次にxの子供として生成したノードをxと
して繰り返す。step7 :前記step6において、pは終了状態でなけれ
ば、次にpは多義かどうかを判断する。pが多義であれ
ば、後述するstep10へ行く。step8 :前記step7において、pは多義でなければ、次
にpを次の遷移先に進める。step9 :次に、pの位置がタグであれば、該タグをxの
子供として生成し、前記step5へ戻る。step10 :前記step7において、pが多義であれば、次に
対話モードかどうかを判断する。対話モードでなければ
終了する。step11 :前記step10において、対話モードであれば、ダ
イアログを表示し、遷移先を選択し、pを選択された遷
移先に進める。
Step 6 : In step 5, if p is in the end state, the node generated as a child of x is repeated as x. step7: In the step6, p is if the end condition, then p determines whether ambiguous. If p is ambiguous, go to step 10 described later. step8 : In step 7, if p is not ambiguous, then p is advanced to the next transition destination. step9 : Next, if the position of p is a tag, the tag is generated as a child of x, and the process returns to step5. step10 : If p is ambiguous in step 7, then it is determined whether or not the mode is the interactive mode. Exit if not in interactive mode. step11 : In the step 10, if in the interactive mode, a dialog is displayed, a transition destination is selected, and p is advanced to the selected transition destination.

【0011】すなわち、新規作成の場合、DTDを使用
者に指定させ、そのDTDをパーザで解析することによ
り、DFAを内部に作成する。従来は、DTDで示され
たトップのノードのみを生成するだけであった。本方式
では、さらにDTDのDFAを用いて下位のノードを作
成していく。このとき、DFAの状態を遷移していき、
対応するノードを作成していくわけであるが、遷移先が
複数、つまりアークが複数ある場合、多義があることに
なる。手順中、対話モードかどうかのフラグがあるが、
このフラグが真である時、ダイアログを表示し、ユーザ
に遷移先の候補を示し、選択させることにより処理を進
める。偽である時、処理を終了する(請求項2,3)。
That is, in the case of new creation, the DTD is created inside by allowing the user to specify the DTD and analyzing the DTD with the parser. In the past, only the top node indicated by DTD was generated. In this method, lower nodes are further created using DTD DFA. At this time, transition the DFA state,
Corresponding nodes are created, but if there are multiple transition destinations, that is, there are multiple arcs, it is ambiguous. In the procedure, there is a flag indicating whether it is in interactive mode,
When this flag is true, a dialog is displayed, the user is presented with a candidate for a transition destination, and selection is made to proceed the processing. When it is false, the processing is terminated (claims 2 and 3).

【0012】このようなノードの生成は、新規文書の作
成の際だけでなく、編集過程での個々のノードの作成で
も同様の手順で同時に下位のノードを生成することがで
きる。すなわち、DTDで表現された文書構造をもつ文
書の作成の際、従来、タグを一つ一つ指定することで作
成していた。この作業を効率化するため、文書型定義に
したがって、下部構造を自動的に挿入することが考えら
れる。この場合、下部の文書構造が一意に決まらない可
能性があるが、方法として一意に決まる部分列を生成す
る方法と、可能な生成列を選択させる方法が考えられ
る。
Such a node can be generated not only at the time of creating a new document but also at the time of creating individual nodes in the editing process, by simultaneously generating the lower nodes. That is, when a document having a document structure represented by DTD is created, it is conventionally created by specifying each tag. In order to make this work more efficient, it is possible to automatically insert the substructure according to the document type definition. In this case, there is a possibility that the lower document structure may not be uniquely determined, but as a method, a method of generating a partial sequence that is uniquely determined and a method of selecting a possible generation sequence can be considered.

【0013】図8(a),(b)は、ノードの表示手順
を示すフローチャートである。以下、各ステップに従っ
て順に説明する。図(a)において、まず、文書保持部
の木構造のルートを変数xに代入し(step1)、subを
呼ぶ(step2)。図(b)において、まず、xに対応す
るWidgetを親に対して字下げした位置に生成する(ste
p1)。次に、ノードチェック処理を行い(step2)、
ハイライトフラグが真かどうかを判断する(step3)。
ハイライトフラグが真であれば、Widgetをハイライト
し(step4)、ハイライトフラグが真でなければ、次に
可視状態が真かどうかを判断する(step5)。可視状態
が真であれば、処理を終了し、可視状態が真でなけれ
ば、次に子供があるかどうかを判断し(step6)、子供
がなければ処理を終了し、子供があれば、次に各子供に
対して再帰的にxに子供を代入してsubを呼び出し、処
理を終了する。
FIGS. 8A and 8B are flowcharts showing the display procedure of the nodes. Hereinafter, each step will be described in order. In FIG. 10A, first, the root of the tree structure of the document holding unit is substituted for the variable x (step 1), and sub is called (step 2). In the figure (b), first, a Widget corresponding to x is generated at a position indented with respect to the parent (ste
p1). Next, node check processing is performed (step 2),
It is determined whether the highlight flag is true (step 3).
If the highlight flag is true, the Widget is highlighted (step 4). If the highlight flag is not true, then it is determined whether the visible state is true (step 5). If the visible state is true, the process is terminated. If the visible state is not true, it is judged whether or not there is a child next (step 6). If there is no child, the process is terminated, and if there is a child, the next Substituting the child into x for each child and calling sub, and the process ends.

【0014】すなわち、木構造のノードを表示する際、
そのノードのもつ可視状態,ノードのハイライト状態を
チェックし、それを表示上に反映させる。実施例では、
表示上のオブジェックトはWidgetとして実現されてい
る。各Widgetには、マウスキーボードのイベントに対
してcallback関数が起動される。
That is, when displaying a tree-structured node,
Check the visible state of the node and the highlighted state of the node and reflect them on the display. In the example,
The objects on the display are realized as Widget. A callback function is activated for each Widget in response to a mouse keyboard event.

【0015】こういった編集操作の過程では、SGML
の文書構造に適合しない構造ができる可能性がある。従
来のエディタでは、これらの構造の適合,不適合をSG
MLの構文解析をバッチ的に行うか、あるいは適合する
構造のみを編集過程でつくり出すように制限することで
対処している。本方式では、下部構造が不適合であるノ
ードをハイライト等の表示により使用者に示すことによ
り、編集過程での不適合を許容し、かつ文書構造に適合
した文書を作成しやすくする(請求項4)。巨大な文書
を編集する場合、そのタグの構造を大まかなレベルで表
示したい場合がでてくる。このような場合、タグのある
構造以下を隠蔽することで、タグの構造を掴みやすくで
きる(請求項5)。
In the process of such editing operation, SGML is used.
There is a possibility that the structure does not conform to the document structure of. In the conventional editor, SG or
This is dealt with by performing the ML parsing in batches or by restricting only compatible structures to be created in the editing process. According to this method, the nodes whose substructures are incompatible are shown to the user by displaying highlights or the like, thereby allowing the incompatibility in the editing process and facilitating the creation of a document conforming to the document structure (claim 4). ). When editing a huge document, there are times when you want to see the structure of its tags at a rough level. In such a case, by hiding the structure below the tag, the structure of the tag can be easily grasped (claim 5).

【0016】図9は、図8(b)におけるstep2のノー
ドチェック処理のフローチャートである。以下、各ステ
ップに従って順に説明する。step1 :まず、ノードxはタグノードかを調べる。step2 :タグに対応するDFAの開始位置にポインタp
をおく。step3 :次に、ポインタpは終了状態かどうかを判断す
る。step4 :前記step3において、pが終了状態であれば、
ハイライトを偽とする。
FIG. 9 is a flowchart of the node check process of step 2 in FIG. 8 (b). Hereinafter, each step will be described in order. step1 : First, it is checked whether the node x is a tag node. step2 : Pointer p to the start position of DFA corresponding to the tag
Put. step3 : Next, it is determined whether the pointer p is in the end state. step4: in the step3, if p is the end state,
The highlight is false.

【0017】step5:前記step3において、pが終了状
態でなければ、次に子供が存在しないかどうかを判断す
る。子供が存在しなければ、後述するstep9へ行き、ハ
イライトを真とする。step6 :前記step5において、子供が存在すれば、ノー
ドの子供をyとする。step7 :次に、yに対応してpの遷移を探す。step8 :次に、遷移できないかどうかを判断する。step9 :前記step8において、遷移できなければ、ハイ
ライトを真とする。step10 :前記step8において、遷移できれば遷移先をp
とし、前記step3へ行く。
[0017] step5: In the step3, if not p is the end state, then it is determined whether or not the child does not exist. If there are no children, go to step 9 described below and set the highlight to true. step6 : If there is a child in step 5, the child of the node is set to y. step7 : Next, the transition of p is searched for corresponding to y. step8 : Next, it is determined whether the transition cannot be made. Step 9 : If the transition cannot be made in Step 8 , the highlight is set to true. step10 : In step 8, if the transition can be made, the transition destination is p
Then, go to step 3 above.

【0018】図10は、ノード移動結果の画面例を示す
図である。画面上での移動は、ノードを示すWidgetに
対してドラッグが行われた場合のコールバック関数とし
て実現される。図10では、ドラッグ操作でノードを移
動した際に木構造をそれに合わせて変更し、その後で図
8の表示操作を行うようコールバック関数を設定してい
る。nameというタグが移動によりsakuseiでは2つにな
り、DTDに適合しないのでハイライトされる。また、
shusaiはnameがないので、やはり適合しなくなり、ハイ
ライトされる。構造文書の編集において、ある部分構造
(下部構造を含めたタグ)を単位として編集等を行える
と便利である。本方式のようなタグが木構造のノードと
なっている場合、ノードをマウスでドラッグすることに
より、部分構造を移動する機構を実装することが考えら
れる(請求項6)。
FIG. 10 is a diagram showing a screen example of the result of node movement. The movement on the screen is realized as a callback function when dragging is performed on the Widget indicating the node. In FIG. 10, when the node is moved by the drag operation, the tree structure is changed accordingly, and then the callback function is set to perform the display operation of FIG. The name tag will be duplicated in sakusei due to the move, and it will be highlighted because it does not conform to DTD. Also,
Since shusai has no name, it no longer matches and is highlighted. In editing a structural document, it is convenient to be able to edit in a certain partial structure (tag including substructure) as a unit. When a tag like this method is a tree-structured node, it is conceivable to implement a mechanism for moving a partial structure by dragging the node with a mouse (claim 6).

【0019】図11は、ノード移動のフローチャートを
示す図である。以下、各ステップに従って順に説明す
る。まず、木構造のルートを着ノードとし(step1)、
着目ノードをyとする(step2)。次に、yがタグノー
ドかどうかを判断し(step3)、yがタグノードでなけ
れば処理を終了する。yがタグノードであれば、yの内
容モデルの有限オートマトンに対し、yの子供にたどっ
て遷移する(step4)。次に、遷移する途中にxと同じ
ノードが来れるかどうかを判断し(step5)、noであ
れば、後述するstep7へ行き、yes であれば、移動先リ
ストに追加する(step6)。次に、yの子供を着目ノー
ドとして再帰的に繰り返す(step7)。
FIG. 11 is a diagram showing a flow chart of node migration. Hereinafter, each step will be described in order. First, the root of the tree structure is the destination node (step 1),
Let the node of interest be y (step 2). Next, it is determined whether y is a tag node (step 3), and if y is not a tag node, the process ends. If y is a tag node, the child of y is transited to the finite state automaton of the content model of y (step 4). Next, it is determined whether the same node as x can come during the transition (step 5). If no, go to step 7 described later, and if yes, add to the destination list (step 6). Next, the child of y is recursively repeated as a node of interest (step 7).

【0020】図12(a),(b)は、マウス移動/リ
リース処理のフローチャートを示す図である。図(a)
はマウス移動コールバック、図(b)はマウスリリース
コールバックのフローチャートである。以下、各ステッ
プに従って順に説明する。図(a)において、まず、マ
ウス位置に最も近いノードを移動先リストから取り出し
(step1)、その移動先の位置にノードをドラッグする
(step2)。図(b)において、まず、ドラッグ先ノー
ド位置にドラッグされたノードを移動し(step1)、ド
ラッグ元、ドラッグ先の親ノードに対し、ノードチェッ
ク手順を呼び出す(step2)。
FIGS. 12 (a) and 12 (b) are flowcharts of the mouse movement / release processing. Figure (a)
Is a mouse movement callback, and FIG. 9B is a flowchart of mouse release callback. Hereinafter, each step will be described in order. In FIG. 10A, first, the node closest to the mouse position is taken out from the move destination list (step 1), and the node is dragged to the move destination position (step 2). In FIG. 6B, first, the dragged node is moved to the drag destination node position (step 1), and the node check procedure is called for the parent node of the drag source and the drag destination (step 2).

【0021】すなわち、この処理ではまず、ノードのW
idget のコールバック関数としてドラッグされる時に呼
ばれ、移動可能な場所を探す処理が行なわれる。移動先
の検索によって移動可能な場所のリストを得る。画面上
のドラッグ処理のコールバック関数は次のようなもので
ある。コールバックの処理は2つあり、1つは画面上の
移動、もう1つはマウスボタンがその場所で離された時
の処理である。マウスボタンがリリースされた時、移動
していたノードを自分の子供のノードを引き連れて移動
する。移動した後、ノードチェック手順を呼び出し、移
動によって親ノードの内容モデルにノード順序が適合し
ない場合、親ノードをハイライトする。
That is, in this processing, first, the W
Called when dragged as a callback function of idget, the process of searching for a moveable place is performed. Get a list of places you can go to by searching the destination. The callback function of the drag process on the screen is as follows. There are two callback processes, one is the movement on the screen, and the other is the process when the mouse button is released at that position. When the mouse button is released, it moves the node that was moving along with its child node. After the move, call the node check procedure and highlight the parent node if the move does not match the node order to the content model of the parent node.

【0022】構造単位の編集において、構造をカット&
ペーストする機構があれば便利である。従来のエディタ
では、タグの作る構造単位のカット&ペーストは存在し
ない。そのために、部分構造を保持するためのバッファ
が必要である(請求項7)。また、構造単位のペース
ト,移動を行う時、文書型定義に従った位置に挿入する
場合が多い。従って、挿入位置をタグに対して制限する
ことで、間違いなく移動,ペーストを行うことができる
(請求項8)。
In editing the structural unit, cut the structure &
It would be convenient if there was a pasting mechanism. In the conventional editor, there is no cut and paste of the structural unit that the tag makes. Therefore, a buffer for holding the partial structure is required (claim 7). In addition, when pasting or moving a structural unit, it is often inserted at a position according to the document type definition. Therefore, by restricting the insertion position with respect to the tag, it is possible to move and paste without fail (claim 8).

【0023】図13(a),(b)は、カット/ペース
ト処理のフローチャートを示す図である。図(a)はカ
ット処理、図(b)はペースト処理のフローチャートで
ある。以下、各ステップに従って順に説明する。図
(a)において、まず、着目ノードを下部構造ごと、Ya
nk buffer に移動し(step1)、着目ノードのあった場
所の親のノードに対してノードチェック手順を呼び出す
(step2)。図(b)において、まず、Yank buffer に
ノードが存在するかどうかを判断し(step1)、存在す
れば、移動先リスト作成手順を呼び出し(step2)、編
集着目位置に最も近い移動先リストの位置に Yank buff
er の内容を挿入する(step3)。
FIGS. 13A and 13B are flow charts of the cut / paste processing. FIG. 7A is a flow chart of the cutting process, and FIG. 6B is a flow chart of the paste process. Hereinafter, each step will be described in order. In the figure (a), first, the node of interest is set to Ya
Move to the nk buffer (step 1), and call the node check procedure for the parent node at the place where the target node was (step 2). In FIG. 6B, first, it is determined whether or not a node exists in the Yank buffer (step 1), and if it exists, the move destination list creation procedure is called (step 2), and the position of the move destination list closest to the edit target position is determined. At Yank buff
Insert the contents of er (step 3).

【0024】[0024]

【効果】以上の説明から明らかなように、本発明による
と、以下のような効果がある。 (1)請求項1に対応する効果:文書型定義に基づく文
書インスタンスを字下げされた木構造によって表示する
ので、使用者は文書の構造を一目で把握できる。 (2)請求項2に対応する効果:新規タグの作成時にお
いて、文書型定義に基づき、下位構造を自動挿入する
際、文書型定義に基づいて下位構造に多義性がある場
合、それを選択させる機構を有する新規タグ作成機構を
有するので、使用者は決まり切ったタグを挿入する手間
が省ける。 (3)請求項3に対応する効果:新規タグの作成時にお
いて、文書型定義に基づき、下位構造を自動的に多義性
のないノードを挿入することを特徴とする新規タグ作成
機構を有するので、対話的に自動挿入されるため、使用
者は決まり切ったタグを挿入する手間が省ける。 (4)請求項4に対応する効果:文書型定義に基づく文
書インスタンスを表示する際、あるタグの下部機構が文
書型定義を満たしていない場合、それをハイライト等で
使用者に示すので、DTDに違反するノードが表示上で
わかるため、使用者はそれにより修正すべき点がはっき
りわかる。 (5)請求項5に対応する効果:文書型定義に基づく文
書インスタンスを表示する際、あるタグの下部構造を隠
蔽する表示機構を有するので、使用者が表示上不必要だ
と思った部分を隠蔽できるため、木構造の把握をしやす
くなる。 (6)請求項6に対応する効果:文書型定義に基づく文
書インスタンスを表示する際、あるタグを下部構造を含
めて移動する機構を有するので、木構造の部分構造を移
動でき、編集の際、容易に木構造を変更できる。 (7)請求項7に対応する効果:文書型定義に基づく文
書インスタンスを表示する際、あるタグを下部構造を含
めてヤンクバッファに保管し、それを文書インスタンス
上の任意の位置に挿入できる機構を有するので、木構造
の部分構造を複写,削除を容易にでき、編集の際、容易
に木構造を変更できる。 (8)請求項8に対応する効果:文書型定義に基づく文
書インスタンスを表示する際、あるタグを移動・挿入す
る機構において、移動先を文書型定義に従い制限するの
で、DTDに適合した文書構造を作ることができる。
As is apparent from the above description, the present invention has the following effects. (1) Effect corresponding to claim 1: Since the document instance based on the document type definition is displayed by the indented tree structure, the user can grasp the structure of the document at a glance. (2) Effect corresponding to claim 2: When a substructure is automatically inserted based on the document type definition when creating a new tag, if the substructure is ambiguous based on the document type definition, select it Since it has a new tag creation mechanism having a mechanism for allowing the user to do so, the user can save time and effort for inserting a fixed tag. (3) Effect corresponding to claim 3: When a new tag is created, a new tag creation mechanism characterized by automatically inserting a node with no ambiguity in the substructure based on the document type definition is provided. , Since it is automatically inserted interactively, the user can save the trouble of inserting a fixed tag. (4) Effect corresponding to claim 4: When a document instance based on a document type definition is displayed, if the lower mechanism of a certain tag does not satisfy the document type definition, it is shown to the user by highlighting it. Since the node that violates the DTD is visible on the display, the user can clearly see the points to be corrected. (5) Effect corresponding to claim 5: When the document instance based on the document type definition is displayed, since the display mechanism for hiding the substructure of a certain tag is provided, the portion which the user thinks is unnecessary on the display is displayed. Since it can be hidden, it becomes easier to understand the tree structure. (6) Effect corresponding to claim 6: When displaying a document instance based on the document type definition, since it has a mechanism for moving a certain tag including a substructure, it is possible to move a partial structure of a tree structure and edit it. , You can easily change the tree structure. (7) Effect corresponding to claim 7: A mechanism that, when displaying a document instance based on a document type definition, stores a certain tag including a substructure in a Yank buffer and inserts it at an arbitrary position on the document instance. Since it has, the partial structure of the tree structure can be easily copied and deleted, and the tree structure can be easily changed at the time of editing. (8) Effect corresponding to claim 8: When displaying a document instance based on a document type definition, in a mechanism for moving / inserting a certain tag, the moving destination is restricted according to the document type definition, so a document structure conforming to DTD. Can be made.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明による構造文書編集方式の一実施例を
説明するための構成図である。
FIG. 1 is a configuration diagram for explaining an embodiment of a structured document editing method according to the present invention.

【図2】 本発明における有限オートマトン(DFA)
を示す図である。
FIG. 2 is a finite state automaton (DFA) according to the present invention.
FIG.

【図3】 本発明における文書保持部の機構造を示す図
である。
FIG. 3 is a diagram showing a machine structure of a document holding unit according to the present invention.

【図4】 本発明における文書型定義(DTD)の例を
示す図である。
FIG. 4 is a diagram showing an example of a document type definition (DTD) in the present invention.

【図5】 本発明におけるSGML文書例を示す図であ
る。
FIG. 5 is a diagram showing an example of an SGML document according to the present invention.

【図6】 本発明における画面例を示す図である。FIG. 6 is a diagram showing an example of a screen according to the present invention.

【図7】 本発明における新規作成コールバックの処理
手順を示すフローチャートである。
FIG. 7 is a flowchart showing a processing procedure of a newly created callback according to the present invention.

【図8】 本発明における表示処理手段を示すフローチ
ャートである。
FIG. 8 is a flowchart showing a display processing means in the present invention.

【図9】 本発明におけるノードチェック手順を示すフ
ローチャートである。
FIG. 9 is a flowchart showing a node check procedure according to the present invention.

【図10】 本発明におけるノード移動結果の画面例を
示す図である。
FIG. 10 is a diagram showing a screen example of a node movement result according to the present invention.

【図11】 本発明における移動先リスト作成手順を示
すフローチャートである。
FIG. 11 is a flowchart showing a procedure for creating a destination list in the present invention.

【図12】 本発明におけるマウス移動/リリース処理
のフローチャートである。
FIG. 12 is a flowchart of mouse movement / release processing according to the present invention.

【図13】 本発明におけるカット/ペースト処理のフ
ローチャートである。
FIG. 13 is a flowchart of cut / paste processing according to the present invention.

【符号の説明】[Explanation of symbols]

1…SGML文書、2…SGMLパーザ、3…DTD
(Document Type Definition:文書型定義)保持部、4
…文書保持部、5…DFA(有限オートマトン)、6…
編集処理部、7…文書木構造、8…Yank Buffer、9…
表示入力部。
1 ... SGML document, 2 ... SGML parser, 3 ... DTD
(Document Type Definition) holding unit, 4
... Document storage, 5 ... DFA (finite automaton), 6 ...
Edit processing part, 7 ... Document tree structure, 8 ... Yank Buffer, 9 ...
Display input section.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 7315−5L G06F 15/20 550 E 7315−5L 554 H ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Office reference number FI Technical display location 7315-5L G06F 15/20 550 E 7315-5L 554 H

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 SGML文書を入力する入力手段と、該
入力手段により入力されたSGML文書を解析する解析
手段と、該解析手段の解析結果として文書型定義に対応
して有限オートマトンを作成する作成手段と、該作成手
段により作成された有限オートマトンを保持する格納手
段と、前記SGML文書自体の解析の結果として内部に
文書構造に対応する木構造を作成する木構造作成手段
と、該木構造作成手段により作成された木構造を格納す
る文書保持手段とから成り、前記文書型定義に基づく文
書インスタンスを字下げされた木構造によって表示する
ことを特徴とする構造文書編集方式。
1. An input unit for inputting an SGML document, an analysis unit for analyzing the SGML document input by the input unit, and a creation for creating a finite automaton corresponding to a document type definition as an analysis result of the analysis unit. Means, storage means for holding the finite state automaton created by the creating means, tree structure creating means for creating a tree structure corresponding to the document structure inside as a result of analysis of the SGML document itself, and the tree structure creating And a document holding means for storing the tree structure created by the means, wherein the document instance based on the document type definition is displayed in an indented tree structure.
【請求項2】 新規タグの作成時において、前記文書型
定義に基づき下位構造を自動挿入する際、該文書型定義
に基づいて下位構造に多義性がある場合、それを選択さ
せる機構を有する新規タグ作成手段を有することを特徴
とする請求項1記載の構造文書編集方式。
2. When creating a new tag, when a substructure is automatically inserted based on the document type definition, and if the substructure has ambiguity based on the document type definition, it has a mechanism for selecting it. The structural document editing method according to claim 1, further comprising a tag creating unit.
【請求項3】 新規タグの作成時において、前記文書型
定義に基づき下位構造を自動的に多義性のないノードを
挿入する新規タグ作成手段を有することを特徴とする請
求項1記載の構造文書編集方式。
3. The structure document according to claim 1, further comprising a new tag creating means for automatically inserting a node having no ambiguity in a lower structure based on the document type definition when creating a new tag. Editing method.
【請求項4】 前記文書型定義に基づく文書インスタン
スを表示する際、あるタグの下部構造が文書型定義を満
たしていない場合、下部構造が不適合であるノードをハ
イライト等で使用者に示すことを特徴とする請求項1記
載の構造文書編集方式。
4. When displaying a document instance based on the document type definition, if the substructure of a certain tag does not satisfy the document type definition, the node whose substructure is incompatible is shown to the user by highlighting or the like. The structural document editing method according to claim 1, wherein
【請求項5】 前記文書型定義に基づく文書インスタン
スを表示する際、あるタグの下部構造を隠蔽する表示手
段を有することを特徴とする請求項1記載の構造文書編
集方式。
5. The structured document editing method according to claim 1, further comprising display means for hiding a lower structure of a certain tag when displaying a document instance based on the document type definition.
【請求項6】 前記文書型定義に基づく文書インスタン
スを表示する際、あるタグを下部構造を含めて移動する
移動手段を有することを特徴とする請求項1記載の構造
文書編集方式。
6. The structured document editing method according to claim 1, further comprising a moving unit that moves a certain tag including a lower structure when displaying a document instance based on the document type definition.
【請求項7】 前記文書型定義に基づく文書インスタン
スを表示する際、あるタグを下部構造を含めてヤンクバ
ッファに保管し、タグを文書インスタンス上の任意の位
置に挿入できる挿入手段を有することを特徴とする請求
項1記載の構造文書編集方式。
7. When displaying a document instance based on the document type definition, a tag including a substructure is stored in a Yank buffer, and an insertion unit that can insert the tag at an arbitrary position on the document instance is provided. The structural document editing method according to claim 1, characterized in that
【請求項8】 前記文書型定義に基づく文書インスタン
スを表示する際、あるタグを移動・挿入する手段におい
て、移動先を文書型定義に従い制限することを特徴とす
る請求項1記載の構造文書編集方式。
8. The structured document editing according to claim 1, wherein when displaying a document instance based on the document type definition, the moving destination of the certain tag is restricted according to the document type definition in the means for moving / inserting a certain tag. method.
JP5162327A 1993-06-30 1993-06-30 Structural document editing system Pending JPH0764972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5162327A JPH0764972A (en) 1993-06-30 1993-06-30 Structural document editing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5162327A JPH0764972A (en) 1993-06-30 1993-06-30 Structural document editing system

Publications (1)

Publication Number Publication Date
JPH0764972A true JPH0764972A (en) 1995-03-10

Family

ID=15752435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5162327A Pending JPH0764972A (en) 1993-06-30 1993-06-30 Structural document editing system

Country Status (1)

Country Link
JP (1) JPH0764972A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6202072B1 (en) 1997-05-08 2001-03-13 Jusystem Corp. Method and apparatus for processing standard generalized markup language (SGML) and converting between SGML and plain text using a prototype and document type definition

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6202072B1 (en) 1997-05-08 2001-03-13 Jusystem Corp. Method and apparatus for processing standard generalized markup language (SGML) and converting between SGML and plain text using a prototype and document type definition

Similar Documents

Publication Publication Date Title
US6792475B1 (en) System and method for facilitating the design of a website
US8078962B2 (en) Apparatus and method for generating web site navigations
US20020178184A1 (en) Software system for biological storytelling
US20050203869A1 (en) Hierarchical database apparatus, components selection method in hierarchical database, and components selection program
JPH09134282A (en) Program generation method
EP3103002B1 (en) Batch generation of links to documents based on document name and page content matching
JP3028738B2 (en) Document common logical information editing device
US20070198915A1 (en) Document Processing Device And Document Processing Method
US20070208995A1 (en) Document Processing Device and Document Processing Method
JP3444948B2 (en) Document editing apparatus and document editing method
US5765177A (en) Document processing method and apparatus for searching documents having a graph based document logic structure
JPH07239850A (en) Structured document preparation supporting system
JP3448874B2 (en) Document processing apparatus and document processing method
JPH096794A (en) Data retrieval instructing device
JPH09146931A (en) Document type definition generating device
US20090287994A1 (en) Document processing device and document processing method
US7231598B1 (en) User interface for editing documents containing markup language
JP2839555B2 (en) Information search method
JP3536863B2 (en) Multiple document processing system and method
CN112181483B (en) Plasma control system software development platform and method
JP2001344230A (en) Device and method for generating multimedia document, and recording medium with program for allowing computer to execute the method recorded thereon
JPH0764972A (en) Structural document editing system
CN101268438A (en) Data processing apparatus
JP2002140338A (en) Device and method for supporting construction of dictionary
JPH11184687A (en) Software document preparation system using hierarchical structure and relationship of software document and operation method of the system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20031224