WO2005098658A1 - 文書処理装置及び文書処理方法 - Google Patents

文書処理装置及び文書処理方法 Download PDF

Info

Publication number
WO2005098658A1
WO2005098658A1 PCT/JP2005/006796 JP2005006796W WO2005098658A1 WO 2005098658 A1 WO2005098658 A1 WO 2005098658A1 JP 2005006796 W JP2005006796 W JP 2005006796W WO 2005098658 A1 WO2005098658 A1 WO 2005098658A1
Authority
WO
WIPO (PCT)
Prior art keywords
document
data
unit
calculation
calculation formula
Prior art date
Application number
PCT/JP2005/006796
Other languages
English (en)
French (fr)
Inventor
Masayuki Hiyama
Nobuaki Wake
Norio Oshima
Masafumi Hara
Original Assignee
Justsystems Corporation
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 Justsystems Corporation filed Critical Justsystems Corporation
Priority to JP2006512107A priority Critical patent/JPWO2005098658A1/ja
Priority to EP05728736A priority patent/EP1768034A1/en
Priority to US11/578,126 priority patent/US20070208995A1/en
Publication of WO2005098658A1 publication Critical patent/WO2005098658A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]

Definitions

  • the present invention relates to a document processing technology, and more particularly, to a document processing device and a document processing method for processing a document described in a markup language.
  • XML has attracted attention as a format suitable for sharing data with others via a network or the like, and applications for creating, displaying, and editing XML documents have been developed (for example, Patent Document 1).
  • An XML document is created based on a vocabulary (tag set) defined by a document type definition.
  • Patent document 1 Japanese Patent Application Laid-Open No. 2001-290804
  • the present invention has been made in view of such a situation, and an object of the present invention is to provide a technique for effectively using data contained in a document described in a markup language.
  • One embodiment of the present invention relates to a document processing apparatus.
  • This document processing device displays a document described in a markup language, and refers to a processing system for accepting editing of the document by a user, and to refer to other data in an attribute value of a component included in the document.
  • a calculation unit that acquires the data of the reference destination, executes the calculation formula, and substitutes the calculation result into the element value of the component when the calculation formula described is described.
  • the markup language may be in the form of XML, for example, XHTML, SVG, MathML, etc., or SGML, HTML, or the like.
  • XML for example, XHTML, SVG, MathML, etc.
  • SGML SGML
  • HTML HyperText Markup Language
  • the data of the reference destination may be described in a markup language different from that of the constituent element of the reference source.
  • the calculation formula may be described in a markup language for describing the calculation formula.
  • the calculation unit may be provided as a plug-in that interprets and processes a dedicated markup language for describing the calculation formula.
  • the calculation formula may be described as a global attribute.
  • the calculation unit may execute the calculation formula again when the data of the reference destination is changed, and substitute a calculation result into the element value. After the new calculation result is substituted, the processing system may update the display. As a result, the data of the reference source can be appropriately updated and reflected on the display in real time.
  • the document processing apparatus further includes a generation unit configured to generate, from the document, data in a format that conforms to a document object model defined to provide an access method when the document is handled as data.
  • the unit may generate document object model data corresponding to the document, and the processing system may display the document by referring to the document object model data.
  • the calculation unit may specify and acquire the data of the reference destination from the document object model data. Even if a document is written in different markup languages, it can be accessed by the same access method by converting it into document object model data, so that the calculation unit can easily identify the data to be referenced. , Can be obtained.
  • Another embodiment of the present invention relates to a document processing method.
  • this document processing method when a document described in a markup language is displayed on a display device, a calculation formula referring to other data is described in an attribute value of a component included in the document, and the document processing method is performed. Judging whether or not, when the calculation formula is described in the attribute value, obtain the data of the reference destination, execute the calculation formula, and substitute the calculation result for the element value of the component Step to do And characterized in that:
  • FIG. 1 is a diagram showing a configuration of a document processing apparatus according to a first embodiment of the present invention.
  • FIG. 2 is a diagram illustrating an example of an XML document processed by the document processing apparatus according to the first embodiment.
  • FIG. 3 is a diagram showing an example of mapping the XML document shown in FIG. 2 to a table described in HTML.
  • FIG. 4 is a diagram showing an example of a VC definition file for mapping the XML document shown in FIG. 2 to the table shown in FIG.
  • FIG. 5 is a diagram showing an example of a screen in which the XML document shown in FIG. 2 is mapped to HTML according to the correspondence shown in FIG. 3 and displayed.
  • FIG. 6 is a diagram showing an example of a graphical user interface presented to a user by a VC definition file generation unit.
  • FIG. 7 is a diagram showing another example of the screen layout generated by the VC definition file generation unit.
  • FIG. 8 is a diagram showing an example of an editing screen of an XML document by the document processing device.
  • FIG. 9 is a diagram showing another example of the XML document processed by the document processing device according to the first embodiment.
  • FIG. 10 is a diagram showing an example of a screen displaying the document shown in FIG. 9.
  • FIG. 11 is a diagram showing a configuration of a document processing device according to a second embodiment of the present invention.
  • FIG. 12 is a diagram showing an example of a document processed by the document processing device shown in FIG. 11.
  • FIG. 13 is a diagram showing an example of a VC definition file for displaying the XML document shown in FIG. 12 by a VC function.
  • FIG. 14 is a diagram showing an example of a template for display described in the VC definition file shown in FIG. 13.
  • FIG. 15 is a diagram showing an example of a template for displaying a component storing details of a route of a business trip out of templates displayed in the VC definition file shown in FIG. is there.
  • FIG. 16 is a diagram showing an example of a calculation definition file applied to the XML document shown in FIG.
  • FIG. 17 is a diagram showing an example of a screen on which the document shown in FIG. 12 is displayed according to the VC definition files shown in FIGS. 13 to 15.
  • FIG. 18 is a diagram showing an example of a screen when an employee number is changed on the editing screen shown in FIG. 17.
  • FIG. 19 is a diagram showing an example of a screen when a detailed item of a business trip is added and the amount of transportation expenses is changed on the editing screen shown in FIG. 17.
  • FIG. 20 is a diagram showing another example of a document processed by the document processing device according to the second embodiment.
  • FIG. 21 is a diagram showing an example of a VC definition file for displaying the XML document shown in FIG. 20 by a VC function.
  • FIG. 22 is a diagram showing an example of a screen displaying the document shown in FIG. 20 according to the VC definition file shown in FIG. 21.
  • FIG. 23 is a diagram showing an example of a screen when a sample value is changed in the editing screen shown in FIG. 22.
  • 100 document processing units 110 main control unit, 120 editing unit, 130 DOM unit, 132 DOM providing unit, 134 DOM generating unit, 136 output unit, 140 CSS unit, 150 HTML unit, 160 SVG unit, 180 VC unit, 182 mapping file 184 VC definition file acquisition unit, 186 VC definition file generation unit, 190 calculation unit, 192 calculation definition file acquisition unit, 194 execution unit.
  • FIG. 1 shows a configuration of a document processing apparatus 100 according to the first embodiment of the present invention.
  • the document processing apparatus 100 processes a structured document in which data in the document is classified into a plurality of components having a hierarchical structure.
  • the document processing apparatus 100 includes a main control unit 110, an editing unit 120, a DOM unit 130, a CSS unit 140, an HTML unit 150, an SVG unit 160, and a VC unit 180 which is an example of a conversion unit.
  • these components are realized by the power of any computer, such as the CPU, memory, and programs loaded in the memory.
  • the functional blocks realized by their cooperation are depicted. Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof.
  • Main control unit 110 provides a framework for loading plug-ins and executing commands.
  • Editing unit 120 provides a framework for editing XML documents.
  • the display and editing functions of the document in the document processing apparatus 100 are realized by plug-ins, and a necessary plug-in is loaded by the main control unit 110 or the editing unit 120 according to the type of the document.
  • the main control unit 110 or the editing unit 120 determines which XML document is described by referring to the namespace of the XML document to be processed, and displays or displays the XML document corresponding to the XML document. Import an editing plug-in to display and edit.
  • the document processing apparatus 100 has a display system and an editing system for each vocabulary (tag set), such as an HTML unit 150 for displaying and editing HTML documents and an SVG unit 160 for displaying and editing SVG documents.
  • the HTML unit 150 is loaded when editing an HTML document
  • the SVG unit 160 is loaded when editing an SVG document.
  • both the HTML unit 150 and the SVG unit 160 are loaded.
  • the user can select and install only necessary functions and add or delete functions as needed, so that a recording medium such as a hard disk for storing programs can be used. Effective use of storage area and program execution Sometimes, waste of memory can be prevented. In addition, it has excellent function expandability, and as a development main body, it is possible to respond to a new vocabulary in the form of a plug-in, making development easier. Additional functions can be added at cost.
  • the editing unit 120 receives the event of the editing instruction from the user via the user interface, notifies the event to an appropriate plug-in or the like, and executes the event again (redo) or cancels the execution (undo). ) Is controlled.
  • the DOM unit 130 includes a DOM providing unit 132, a DOM generating unit 134, and an output unit 136, and is a document object model (Document Object Model) defined to provide an access method when an XML document is handled as data. : DOM) compliant functions.
  • the DOM providing unit 132 is an implementation of the DOM that satisfies the interface defined in the editing unit 120.
  • the DOM generation unit 134 generates a DOM tree from the XML document. As will be described later, when the XML document to be processed is mapped to another vocabulary by the VC unit 180, the source tree corresponding to the XML document at the mapping source and the destination tree corresponding to the XML document at the mapping destination A tree is created.
  • the output unit 136 outputs the DOM tree as an XML document at the end of editing, for example.
  • the CSS unit 140 includes a CSS analysis unit 142, a CSS providing unit 144, and a rendering unit 146, and provides a display function compliant with CSS.
  • the CSS analysis unit 142 has a function of a versa that analyzes the syntax of CSS.
  • the CSS providing unit 144 is an implementation of a CSS object, and performs a cascade process of the CSS on the DOM tree.
  • the rendering unit 146 is a CSS rendering engine, and is used to display a document described in a vocabulary such as HTML laid out using CSS.
  • the HTML unit 150 displays or edits a document described in HTML.
  • the SVG unit 160 displays or edits a document described by SVG.
  • the display Z editing system is realized in the form of a plug-in, and includes display units (Canvas) 156 and 166 for displaying a document, and control units (Editlet) 152 and 16 for transmitting and receiving an event including an edit instruction. 2. It has editing units (Zones) 154 and 164 that edit the DOM in response to an editing command. When the control unit 152 or 162 receives an external command to edit the DOM tree, Section 154 or 164 modifies the DOM tree and display 156 or 166 updates the display. These have a configuration similar to a framework called MVC (Model-View-Controller).
  • MVC Model-View-Controller
  • the display units 156 and 166 are in “View”, the control units 152 and 162 are in “Controlle”, and The entities of parts 154 and 164 and the DOM correspond to “Model”, respectively.
  • the HTML unit 150 provides a user interface for editing an HTML document in a manner similar to a word processor
  • the SVG unit 160 provides a user interface for editing an SVG document in a manner similar to an image drawing tool. Provide an interface.
  • the VC unit 180 includes a mapping unit 182, a VC definition file acquisition unit 184, and a VC definition file generation unit 186, and maps a document described by a certain vocabulary to another vocabulary to obtain a mapping destination.
  • a mapping unit 182 Provides a framework for displaying or editing a document with a display / editing plug-in that supports the Bokeh Library. In the present embodiment, this function is called a Vocabulary Connection (VC).
  • the VC definition file obtaining unit 184 obtains a script file describing the mapping definition. This VC definition file describes the correspondence (connection) between nodes for each node. At this time, whether to edit the element value or the attribute value of each node may be designated.
  • the mapping unit 182 refers to the VC definition file acquired by the VC definition file acquisition unit 184, causes the DOM generation unit 134 to generate a destination tree, and manages the correspondence between the source tree and the destination tree.
  • the VC definition file generator 186 provides a graphical user interface for the user to generate a VC definition file.
  • the VC unit 180 monitors the connection between the source tree and the destination tree, and upon receiving an editing instruction from a user via a user interface provided by a plug-in in charge of display, first, receives a source tree. Change the applicable node of. When a mutation event indicating that the source tree has been changed is issued, the VC unit 180 receives the mutation event and changes the source tree. Change the nodes in the destination tree that correspond to the changed nodes that synchronize the destination tree. The destination tree is displayed.
  • the plugin for editing for example, the HTML unit 150 receives the mutation event indicating that the destination tree has been changed, and updates the display with reference to the changed destination tree. With such a configuration, even if a document is described by a local vocabulary used by a small number of users, the document can be displayed by converting the document into another major vocabulary, and the editing environment can be improved. Provided.
  • the DOM generation unit 134 When the document processing device 100 reads a document to be processed, the DOM generation unit 134 generates a DOM tree from the XML document. Further, the main control unit 110 or the editing unit 120 refers to the name space to determine the vocabulary describing the document. If a plug-in corresponding to the ghost library is installed in the document processing apparatus 100, the plugin is loaded and the document is displayed and Z-edited. If Plug-in Adapter S is not installed, check whether the VC definition file for mapping exists.
  • the VC definition file acquisition unit 184 acquires the VC definition file, generates a destination tree according to the definition, and displays the document using a plug-in corresponding to the mapping destination vocabulary Z Edited.
  • a plug-in corresponding to the mapping destination vocabulary Z Edited In the case of a compound document including a plurality of Boki libraries, as described later, corresponding portions of the document are displayed and edited by plug-ins corresponding to the respective Boki libraries. If the VC definition file does not exist, the source or tree structure of the document is displayed, and editing is performed on the display screen.
  • FIG. 2 shows an example of an XML document to be processed.
  • This XML document is used to manage student performance data.
  • the component “grading”, which is the top node of the XML document, has a plurality of component “students” provided for each student underneath.
  • the component “student” has an attribute value “name” and child elements “national language”, “mathematics”, “science”, and “society”.
  • the attribute value “name” stores the name of the student.
  • the components “language”, “mathematics”, “science”, and “society” store the results of the national language, mathematics, science, and society, respectively.
  • a student whose name is ⁇ A has a language score of 90, a math score of 50, a science score of 75, and a social score of 60. is there.
  • the vocabulary (tag set) used in this document is referred to as a “performance management vocabulary”.
  • the document processing apparatus 100 of the present embodiment does not have a plug-in corresponding to the display and editing of the grade management vocabulary Z, it is necessary to display this document by a method other than the source display and the tree display.
  • the VC function described above is used. That is, it is necessary to prepare a VC definition file for mapping the grade management vocabulary to another vocabulary provided with a plug-in, for example, HTML or SVG.
  • the user interface for creating the user's own definition file will be described later. Here, the description will proceed assuming that the VC definition file has already been prepared.
  • FIG. 3 shows an example of mapping the XML document shown in FIG. 2 to a table described in HTML.
  • the "student" node of the grade management vocabulary is associated with the row ("TR" node) of the table ("TABLE” node) in HTML, and the first column of each row has the attribute value "name”.
  • the XML document shown in FIG. 2 can be displayed in an HTML table format.
  • these attribute values and element values can be edited, and the user can edit these values by using the editing function of the HTML unit 150 on a display screen in HTML.
  • the formula for calculating the weighted average of the results of the Japanese language, mathematics, science, and society is specified, and the average score of the student's performance is displayed. As described above, by allowing the calculation expression to be specified in the VC definition file, more flexible display is possible, and user convenience during editing can be improved.
  • the sixth column specifies that editing is not allowed, and only the average score cannot be edited individually. In this way, by allowing the user to specify whether or not editing is possible in the mapping definition, erroneous operations of the user can be prevented.
  • FIG. 4 shows an example of a VC definition file for mapping the XML document shown in FIG. 2 to the table shown in FIG.
  • This VC definition file is described in a script language defined for the VC definition file.
  • the VC definition file describes command definitions and display templates.
  • the commands "Add Student” and "Delete Student” An operation of inserting the node “student” into the source tree and an operation of deleting the node “student” from the source library are associated with each other. Also, as a template
  • FIG. 5 shows an example of a screen in which an XML document described in the performance management vocabulary shown in FIG. 2 is mapped to HTML according to the correspondence shown in FIG. 3 and displayed.
  • Table 200 displays, from the left, the name of each student, the grade in the language, the grade in mathematics, the grade in science, the grade in society, and the average score.
  • the user can edit the XML document on this screen. For example, changing the value of the second row and the third column to “70” changes the element value of the source tree corresponding to this node, that is, the math result of the student “B” to “70”.
  • the VC unit 180 changes the corresponding part of the destination tree to make the destination tree follow the source tree, and updates the display based on the changed destination tree. Therefore, in the table on the screen, the student's “B” mathematics result is changed to “70”, and the average score is changed to “55”.
  • the commands “Add Student” and “Delete Student” are displayed in the S menu. User power S When these commands are selected, the node "Student" is added or deleted in the source tree.
  • the editing function of such a structure may be provided to the user in the form of a command.
  • a command for adding or deleting a row in a table may be associated with an operation for adding or deleting a node “student”.
  • a command for embedding another ghost library may be provided to the user.
  • new student grade data can be added in a fill-in-the-blank format.
  • the display of the HTML unit 150 using the VC function Z While using the editing function, it is possible to edit documents described in the grade management vocabulary.
  • FIG. 6 shows an example of a graphical user interface presented to the user by the VC definition file generator 186 in order for the user to generate a VC definition file.
  • a mapping source XML document is displayed in a tree format.
  • the area 204 on the right side of the screen shows the screen layout of the XML document to be mapped.
  • This screen layout can be edited by the HTML unit 150, and the user creates a screen layout for displaying a document in the area 204 on the right side of the screen.
  • the node of the mapping source XML document displayed in the area 202 on the left side of the screen is dragged and dropped into the HTML screen layout displayed in the area 204 on the right side of the screen.
  • the connection between the mapping source node and the mapping destination node is specified. For example, if you drop “Mathematics”, which is a child element of the element “Student”, in the first row and third column of Table 200 on the HTML screen, the “Mathematics” node and the “TD” node in the third column A connection is established.
  • Each node can specify whether or not it can be edited. Further, an arithmetic expression can be embedded in the display screen.
  • the VC definition file generation unit 186 generates a VC definition file that describes the connection between the screen layout and the nodes.
  • FIG. 7 shows another example of the screen layout generated by the VC definition file generation unit 186.
  • a table 200 and a pie chart 206 are created on a screen for displaying an XML document described in the grade management vocabulary.
  • This pie chart 206 is described by SVG.
  • the document processing apparatus 100 of the present embodiment can process a compound document including a plurality of ghost libraries in one XML document.
  • a table 200 described in HTML and a pie chart 206 described in SVG can be displayed on one screen.
  • FIG. 8 shows an example of an editing screen of the XML document by the document processing device 100.
  • one screen is divided into a plurality of screens, and the XML document to be processed is displayed in a plurality of different display formats in each area.
  • the area 210 displays the source of the document
  • the area 212 displays the tree structure of the document
  • the area 214 displays the table described in HTML shown in FIG. Have been.
  • Documents can be edited on any of these screens, and when a user edits on any of the screens, the source tree is changed, and the plug-in responsible for displaying each screen changes to the source tree. Update the screen to reflect the changes in.
  • the display unit of the plug-in that is in charge of displaying each editing screen is registered, and V, any of the plug-ins or VC units are registered.
  • V any of the plug-ins or VC units are registered.
  • the source tree is changed by 180, all the display units displaying the edit screen receive the issued mutation event and update the screen.
  • the VC unit 180 changes the destination tree following the change in the source tree, and then refers to the changed destination tree to change the plug-in.
  • the in-display unit updates the screen.
  • the source display plug-in and the tree display plug-in directly refer to the source tree without using the destination tree.
  • the source display plug-in and the tree display plug-in directly refer to the source tree without using the destination tree.
  • the source display plug-in and tree display plug-in update the screen with reference to the changed source tree, and are in charge of the screen in area 214.
  • the HTML tree 150 updates the screen by referring to the changed destination tree following the change in the source tree.
  • the source display and the tree display can also be realized by using the VC function. That is, the source and tree structure may be laid out by HTML, an XML document may be mapped to the HTML, and displayed by the HTML unit 150. In this case, three destination trees are generated: source format, tree format, and table format. Any screen When the editing is performed in, the VC unit 180 changes the source tree, and then changes each of the three destination trees of the source format, the tree format, and the table format, and the HTML unit 150 modifies the destination trees. See and update 3 screens
  • the user can display and edit the document in a visually comprehensible format using the table 200 or the like while grasping the hierarchical structure of the document by the source display or the tree display.
  • one screen may be divided and displayed in multiple display formats at the same time.
  • One display format may be displayed on one screen, and the display format may be switched by the user's instruction.
  • the main control unit 110 receives a request to switch the display format from the user, and switches the display by instructing each plug-in.
  • FIG. 9 shows another example of the XML document edited by the document processing apparatus 100.
  • the XHTML document is embedded in the "foreignObject" tag of the SVG document, and the XHTML document contains mathematical expressions described in MathML.
  • the editing unit 120 refers to the name space and allocates the drawing operation to an appropriate display system.
  • the editing unit 120 first causes the SVG unit 160 to draw a square, and then causes the HTML unit 150 to draw an XHTML document.
  • a mathematical expression is drawn by a MathML unit (not shown). In this way, a compound document including a plurality of ghost libraries is appropriately displayed.
  • Figure 10 shows the display results.
  • a plug-in or a VC unit 180 responsible for the edited part changes the source tree. Mutation event listeners can be registered in the source tree for each node. Normally, the plug-in display section or VC cutout 180 corresponding to the vocabulary to which each node belongs is registered as a listener. Is done.
  • the DOM providing unit 132 traces the changed node to a higher hierarchy, and if there is a registered listener, issues a mutation event to that listener. For example, in the document shown in Fig.
  • the mutation event is notified to the registered HTML unit 150, and the mutation event is also notified to the SVG unit 160 registered as a listener in the higher svg> node.
  • the HTML unit 150 updates the display by referring to the changed source tree.
  • the SVG unit 160 may ignore the mutation event because the node belonging to its own vocabulary has been changed.
  • the layout of the display area for each plug-in is updated by a configuration for managing the screen layout, for example, a plug-in that is responsible for displaying the highest node.
  • a configuration for managing the screen layout for example, a plug-in that is responsible for displaying the highest node.
  • the HTML unit 150 first draws a part in charge of itself and determines the size of the display area. Then, the configuration for managing the screen layout is notified of the size of the display area after the change, and the layout is requested to be updated.
  • the configuration that manages the screen layout re-lays out the display area for each plug-in upon receiving the notification.
  • the display of the edited portion is appropriately updated, and the layout of the entire screen is updated.
  • the displayed menu may be switched according to the position of the cursor (carriage). That is, when the cursor is within the area where the SVG document is displayed, the menu provided by the SVG unit 160 or the command defined in the VC definition file for mapping the SVG document is displayed, and the cursor is displayed.
  • the menu provided by the HTML unit 150 or the command defined in the VC definition file for mapping the XHTML document is displayed. Thereby, an appropriate user interface can be provided according to the editing position.
  • a tag of another bokeh library may be used.
  • This XML document is not valid, but if it is well-formed (welH rmed), it can be processed as a valid XML document.
  • the inserted tag of the other vocabulary may be mapped by the VC definition file and processed by the VC unit 180.
  • tags such as "important" and "most important” may be used, and a portion surrounded by these tags may be highlighted, or displayed by sorting in order of importance.
  • Another advantage of data being described on a text basis is that, for example, in a compound document, in a portion described by a certain vocabulary, data of a portion described by another vocabulary in the same document is referred to. can do. For example, you can refer to data described in other vocabulary in a calculation formula, etc., and when performing a search in an HTML document, search for text strings embedded in figures such as SVG in the document You can also.
  • the application does not know the format of the embedded data and can not interpret the data correctly Therefore, the embedded data is treated as a so-called black box, and the contents cannot be referred to.
  • FIG. 11 shows the overall configuration of a document processing apparatus 100 according to the second embodiment of the present invention.
  • the document processing device 100 according to the present embodiment is a plug-in that performs a calculation process with reference to other data in addition to the configuration of the document processing device 100 according to the first embodiment shown in FIG. 190 is further provided.
  • the calculation unit 190 processes a document described in a vocabulary & 1 ( ⁇ 1 ⁇ vocabulary for describing a calculation formula and the like.
  • the calculation unit 190 is a component element included in the document to be processed. Value or attribute value power, etc.
  • the data of the reference destination may be described in the same vocabulary as the reference source, or may be described in a different vocabulary. Further, data described in another document may be referred to. When referring to the data of another document, the document processing apparatus 100 may read the document in which the data of the reference destination is described, and acquire the data of the reference destination. Other configurations and operations are the same as those of the first embodiment, and the same components are denoted by the same reference numerals.
  • the calculation unit 190 includes a calculation definition file obtaining unit 192 for obtaining a calculation definition file described in a calculation vocabulary and an execution unit 194 for executing a calculation formula described in the calculation definition file. Including.
  • the calculation definition file acquisition unit 192 acquires the calculation definition file and the execution unit 194 describes the calculation definition file. Execute the calculated formula and substitute the calculated result.
  • the execution unit 194 receives the mutation event indicating that the node storing the referenced data has been updated, and executes the calculation formula again. Assign to the data of the referrer.
  • the plug-in responsible for displaying the node updates the display, and the calculation result is reflected in the display.
  • FIG. 12 shows an example of a document processed by the document processing apparatus 100 according to the present embodiment.
  • This XML document is used to apply for travel expenses.
  • This XML document is described by “ryohi”, a voyage library for travel expense settlement, and “office”, a ghost library for employee data management.
  • ryohiseisan.vcdj a definition file for the calculation should be performed by referring to the calculation definition file "ryohiseisan.calcj”.
  • the component “ryohiseisan”, which is the top node, is a component of the “ryohi” vocabulary. It has the components “period”, “place”, “business”, “items”, and “total price”.
  • the component element “person” stores the data of the applicant for travel expenses, and stores "department-code” under which the department code to which the applicant belongs is stored. ⁇ Department-namej '' to store the department name of the applicant, ⁇ rank '' to store the rank of the applicant, ⁇ number '' to store the employee number of the applicant, ⁇ name '' to store the name of the applicant, and the applicant "Tel” that stores the telephone number of the user.
  • Component “persondb” is to store the data of the employees, as the attribute values of a plurality of components provided under the control of its “re C ord", employee number “number”, the name “name”, the telephone number " tel “is stored.
  • the component “period” stores the travel period, and the attribute value "start” stores the start date and the attribute value "end” stores the end date.
  • the component “place” stores a business trip destination.
  • the component “business stores the business travel requirements.
  • the component” items “stores the details of the travel expenses, and the date” datetime " , Departure place "route-stai:”, destination place “route-end”, type “type” and price “price” are stored.
  • the component “tota price” stores the total amount of travel expenses. The total travel expenses are calculated according to a formula described in a definition file for calculation, as described later.
  • FIG. 13 shows an example of a VC definition file for displaying the XML document shown in FIG. 12 by the VC function.
  • the VC definition file "ryohisaisan.vcd” contains command definitions and display templates.
  • "add route” and “delete route” are defined as commands.
  • the operation of inserting the node “ryohi: item” into the source tree and the source tree The operation for deleting "ryohi: item” is associated with.
  • the display template is actually described in the “conversion template” part of the VC definition file shown in FIG. 13, but is shown here separately in FIGS. 14 and 15.
  • FIG. 14 shows an example of a display template described in the VC definition file shown in FIG.
  • the XML document shown in FIG. 12 is converted into an HTML document according to the template shown in FIG. 14 and displayed.
  • the part describing the display style is omitted.
  • the “office: person / office: number” that stores the employee number specifies “text-of” that indicates that editing is possible, and the “office: person / office: name” that stores the name of the employee And the extension number "olhce: person / oftice: tel” in the string contains "value-of" indicating that editing is not possible.
  • the calculation unit 190 automatically changes the name and extension number, so that the name and extension number cannot be edited.
  • FIG. 15 shows a template for displaying a component "ryohi: item” that stores details of a travel expense route, among the display templates described in the VC definition file shown in FIG.
  • a component "ryohi: item” that stores details of a travel expense route
  • FIG. 15 shows a template for displaying a component "ryohi: item” that stores details of a travel expense route, among the display templates described in the VC definition file shown in FIG.
  • an “Add” button for adding a route and a “Delete” button for deleting a route are displayed in each row that shows the details of the route.
  • the "Add” button is associated with the command "Add route” in the VC definition file shown in Fig. 13, and the "Delete” button is associated with "Delete route", and the user clicks the button. As a result, the corresponding command is executed.
  • FIG. 16 shows an example of a calculation definition file applied to the XML document shown in FIG.
  • This calculation definition file is described by a vocabulary for describing the calculation formula.
  • the first key ⁇ ⁇ calc: Dind '', ⁇ , ⁇ ⁇ ⁇ ryohi: ryohiseisan / office: person / office: name '', ⁇ ⁇ ⁇ Do ⁇ office: persondb '' number-th "Roh ⁇ ⁇ door ⁇ office: record ⁇ of values of" "that the na me" is substituted are described. That is, when the applicant's employee number is changed, the name of the employee with the employee number described in the employee list is substituted for the applicant's name.
  • the second element “calc: bind” describes that when the employee number of the applicant changes, the extension number of the employee of the employee number is substituted for the extension number of the applicant. ing.
  • the third element “calc: bind" contains the node "
  • ryohi ryohiseisan / ryohi: tota pricej is substituted with the perfect value of “ ⁇ nce” of “ryohi: item”. In other words, the total value of each detail of the travel expenses is substituted for the total travel expenses.
  • FIG. 17 shows an example of a screen on which the document shown in FIG. 12 is displayed according to the VC definition file shown in FIGS. 13 to 15.
  • the contents of the second element “ryohi: item” under the element “ryohi: items” of the document shown in FIG. 12 are displayed on the second line of the table for displaying details.
  • the attribute values "route-start”, “route-end”, and "type” have no value, but according to the definition described in the VC definition file shown in Fig. 15, there is no alternative when there is no value. Text is displayed.
  • FIG. 18 shows an example of a screen when the employee number is changed on the editing screen shown in FIG.
  • the user rewrites the column of the employee number of the applicant from “1821” to “1318”, first, the corresponding node in the source tree is changed to “1318”. At this time, this node A mutation event indicating that the change has been made is issued to the calculation unit 190.
  • the execution unit 194 of the calculation unit 190 changes the source tree according to the rules described in the calculation definition file. Here, the applicant's name and extension are changed.
  • a mutation event to that effect is issued to the VC unit 180, and the VC unit 180 changes the destination area.
  • a mutation event indicating that the destination tree has been changed is issued to the HTML unit 150, and the display is updated by the HTML unit 150.
  • FIG. 19 shows an example of a screen when a detailed item of a business trip is added to the editing screen shown in FIG. 17 and the amount of the transportation fee is changed.
  • the node “ryohi: item” is added to the source tree according to the definition of the command described in the VC definition file, and a line for the detailed item of the business trip is added.
  • the execution unit 194 of the calculation unit 190 updates the total travel expenses according to the definition described in the calculation definition file. Then, the display is updated in the same manner as the procedure described above.
  • FIG. 20 shows another example of a document processed by the document processing apparatus 100 according to the present embodiment.
  • This XML document is described by a vocabulary “sample” and a calculation vocabulary “calculation”.
  • this document should be displayed by the VC function with reference to the VC definition file “embed.vcd” and that the calculation should be performed by the calculation unit 190.
  • the component “sample” which is the top node is a component of the “sample” vocabulary, and as child elements, the component “value”, the component “value-total abs", and the component “value” -tota ref ”.
  • the component “value” stores a value referred to in the calculation formula.
  • the component rvalue-total-absj and the component “value—total—ref” store the sum of the element values of the component “value”.
  • the components “value-tota abs” and “value-tota ref” each include the attribute “cal expression”.
  • the attribute “calc: expression” includes the component “value” A calculation formula for calculating the sum of the values is described, and the calculation result is stored as an element value.
  • the attribute value “calc: expression” of the component “value-to-abtoabs” contains the The node is described with an absolute path, and the attribute value “calc: expressionJ" of the component “value-totaref” has the force that the referenced node is described with a relative path. : value ", the same total value is calculated.
  • the attribute "calc: expression” is specified as a global attribute with a namespace prefix.
  • the global attribute can be specified as an attribute with the same meaning for any Boki library component. In other words, it functions as an attribute “expression” that expresses a calculation expression in the optional bokeh library “calculation” for a component of the bokeh library.
  • the value of the calculation formula described as the attribute value is calculated by the calculation unit 190 and substituted into the element value of the component.
  • FIG. 21 shows an example of a VC definition file for displaying the XML document shown in FIG. 20 by the VC function.
  • the VC definition file “embed.vcd” describes command definitions and display templates.
  • “delete node” and “expression attribute delete script” are defined as commands, and the source tree power is also set to the node “
  • sample sample / sample: value— tota to absj x ⁇
  • FIG. 22 shows an example of a screen displaying the document shown in FIG. 20 according to the VC definition file shown in FIG.
  • the first component “sample: valuej element value” 100 ", the second component” sample: value “element value” 200 ", and the third component” sample: value of the element value “300” of the “value” is calculated by the execution unit 194 of the calculation unit 190, and the constituent elements “sample: value-to-
  • FIG. 23 shows an example of a screen when the sample value 1 is changed in the editing screen shown in FIG.
  • the user rewrites the sample value 1 column from “100” to “500”
  • the element value of the corresponding node “sample: sample / sample: value” in the source tree is changed to “500”.
  • a mutation event indicating that this node has been changed is issued to the computation cut 190.
  • the execution unit 194 of the calculation unit 190 receives the component “sample: sample / sample: value—total abs” and the component “ sample: sample / sample: value—Changes the source tree by using the expression S described in the attribute value of totaHrefJ.
  • the total value of the sample values is changed.
  • a mutation event to that effect is issued to the VC unit 180, and the VC unit 180 changes the destination tree.
  • a mutation event indicating that the destination tree has been changed is issued to the HTML unit 150, and the display is updated by the HTML unit 150.
  • the calculation formula may be in any format.For example, it may be a calculation formula that substitutes the same data in order to synchronize data among a plurality of components, or may be an arithmetic formula or a character string. It may be an operation.
  • the document processing apparatus 100 is capable of processing a document described in another markup language, for example, SGML, HTML, or the like. Can be processed similarly.
  • the present invention is applicable to a document processing device that processes a document described in a markup language.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

 マークアップ言語により記述された文書に含まれるデータを有効に利用する技術を提供する。  文書処理装置100は、HTML文書を表示/編集するHTMLユニット150、SVG文書を表示/編集するSVGユニット160など、ボキャブラリごとに、表示/編集を行う処理系をプラグインにより実現する。計算ユニット190は、計算式を記述するためのボキャブラリを処理するプラグインであり、処理対象となる文書に含まれる構成要素の属性値に、他のデータを参照した計算式が記述されているときに、参照先のデータを取得して計算式を実行し、計算結果をその構成要素の要素値に代入する。

Description

明 細 書
文書処理装置及び文書処理方法
技術分野
[0001] 本発明は、文書処理技術に関し、特に、マークアップ言語により記述された文書を 処理する文書処理装置及び文書処理方法に関する。
背景技術
[0002] XMLは、ネットワークなどを介して他者とデータを共有するのに適した形式として注 目されており、 XML文書を作成、表示、編集するためのアプリケーションが開発され ている(たとえば、特許文献 1参照)。 XML文書は、文書型定義などにより定義された ボキヤブラリ(タグセット)に基づいて作成されている。
特許文献 1:特開 2001— 290804号公報
発明の開示
発明が解決しょうとする課題
[0003] 従来、あるアプリケーションで作成した文書中に、他のアプリケーションで作成した データや文書などが埋め込まれて 、る場合、埋め込まれたデータは!、わゆるブラック ボックスとして扱われ、内容を参照することができな力つた。し力しながら、文書中の データを有効利用するためには、任意のデータを参照可能とする技術が求められる
[0004] 本発明はこうした状況に鑑みてなされたものであり、その目的は、マークアップ言語 により記述された文書に含まれるデータを有効に利用するための技術を提供すること にある。
課題を解決するための手段
[0005] 本発明のある態様は、文書処理装置に関する。この文書処理装置は、マークアップ 言語により記述された文書を表示し、ユーザによる前記文書の編集を受け付けるた めの処理系と、前記文書に含まれる構成要素の属性値に、他のデータを参照した計 算式が記述されているときに、参照先のデータを取得して前記計算式を実行し、計 算結果を前記構成要素の要素値に代入する計算ユニットと、を備えることを特徴とす る。
[0006] マークアップ言語は、 XMLのー开態、例えば、 XHTML, SVG, MathMLなどで あってもよぐ SGML, HTMLなどであってもよい。他のデータを参照した計算式を 記述可能とすることにより、データをより有効に活用することができ、ユーザの利便性 を向上させることができる。前記参照先のデータは、参照元の前記構成要素とは異な るマークアップ言語により記述されて 、てもよ!/、。
[0007] 前記計算式は、前記計算式を記述するためのマークアップ言語により記述されても よい。この場合、計算ユニットは、計算式を記述するための専用のマークアップ言語 を解釈して処理するプラグインとして提供されてもよい。前記計算式は、大域属性とし て記述されてもよい。
[0008] 前記計算ユニットは、前記参照先のデータが変更されたときに、前記計算式を再実 行し、計算結果を前記要素値に代入してもよい。新たな計算結果が代入された後、 処理系が表示を更新してもよい。これにより、参照元のデータを適切に更新し、リアル タイムに表示に反映させることができる。
[0009] 文書処理装置は、前記文書から、文書をデータとして扱うときのアクセス方法を提 供するために定められた文書オブジェクトモデルに準拠した形式のデータを生成す る生成部を更に備え、前記生成部は、前記文書に対応する文書オブジェクトモデル データを生成し、前記処理系は、前記文書オブジェクトモデルデータを参照して、前 記文書を表示してもよい。前記計算ユニットは、前記文書オブジェクトモデルデータ の中から、前記参照先のデータを特定して取得してもよい。異なる複数のマークアツ プ言語により記述された文書であっても、文書オブジェクトモデルデータに変換する ことで、同じアクセス方法によりアクセス可能であるから、計算ユニットが参照先のデ ータを容易に特定し、取得することが可能となる。
[0010] 本発明の別の態様は、文書処理方法に関する。この文書処理方法は、マークアツ プ言語により記述された文書を表示装置に表示する際に、前記文書に含まれる構成 要素の属性値に、他のデータを参照した計算式が記述されて 、る力否かを判断する ステップと、前記属性値に前記計算式が記述されていたときに、参照先のデータを取 得して前記計算式を実行し、計算結果を前記構成要素の要素値に代入するステップ と、を含むことを特徴とする。
[0011] なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システムな どの間で変換したものもまた、本発明の態様として有効である。
発明の効果
[0012] 本発明によれば、マークアップ言語により記述された文書に含まれるデータを有効 に利用する技術を提供することができる。
図面の簡単な説明
[0013] [図 1]本発明の第 1の実施の形態に係る文書処理装置の構成を示す図である。
[図 2]第 1の実施の形態の文書処理装置により処理される XML文書の例を示す図で ある。
[図 3]図 2に示した XML文書を HTMLで記述された表にマッピングする例を示す図 である。
[図 4]図 2に示した XML文書を図 3に示した表にマッピングするための VC定義フアイ ルの例を示す図である。
[図 5]図 2に示した XML文書を図 3に示した対応により HTMLにマッピングして表示 した画面の例を示す図である。
[図 6]VC定義ファイル生成部がユーザに提示するグラフィカルユーザインターフエ一 スの例を示す図である。
[図 7]VC定義ファイル生成部により生成された画面レイアウトの他の例を示す図であ る。
[図 8]文書処理装置による XML文書の編集画面の一例を示す図である。
[図 9]第 1の実施の形態の文書処理装置により処理される XML文書の他の例を示す 図である。
[図 10]図 9に示した文書を表示した画面の例を示す図である。
[図 11]本発明の第 2の実施の形態に係る文書処理装置の構成を示す図である。
[図 12]図 11に示した文書処理装置により処理される文書の例を示す図である。
[図 13]図 12に示した XML文書を VC機能により表示するための VC定義ファイルの 例を示す図である。 [図 14]図 13に示した VC定義ファイル中に記述されて 、る表示用のテンプレートの例 を示す図である。
[図 15]図 13に示した VC定義ファイル中に記述されて 、る表示用のテンプレートのう ち、出張旅費の経路の詳細を格納した構成要素を表示するためのテンプレートの例 を示す図である。
[図 16]図 12に示した XML文書に適用される計算定義ファイルの例を示す図である。
[図 17]図 12に示した文書を、図 13から図 15に示した VC定義ファイルにしたがって 表示した画面の例を示す図である。
[図 18]図 17に示した編集画面において、社員番号が変更されたときの画面の例を示 す図である。
[図 19]図 17に示した編集画面において、出張の詳細項目が追加され、さらに交通費 の金額が変更されたときの画面の例を示す図である。
[図 20]第 2の実施の形態の文書処理装置により処理される文書の別の例を示す図で ある。
[図 21]図 20に示した XML文書を VC機能により表示するための VC定義ファイルの 例を示す図である。
[図 22]図 20に示した文書を図 21に示した VC定義ファイルにしたがって表示した画 面の例を示す図である。
[図 23]図 22に示した編集画面において、サンプル値が変更されたときの画面の例を 示す図である。
符号の説明
[0014] 100 文書処理装置、 110 主制御ユニット、 120 編集ユニット、 130 DOMュ- ット、 132 DOM提供部、 134 DOM生成部、 136 出力部、 140 CSSユニット、 150 HTMLユニット、 160 SVGユニット、 180 VCユニット、 182 マッピング杳^ 184 VC定義ファイル取得部、 186 VC定義ファイル生成部、 190 計算ユニット、 192 計算定義ファイル取得部、 194 実行部。
発明を実施するための最良の形態
[0015] (第 1の実施の形態) 図 1は、本発明の第 1の実施の形態に係る文書処理装置 100の構成を示す。文書 処理装置 100は、文書内のデータが階層構造を有する複数の構成要素に分類され た構造ィ匕文書を処理するが、本実施の形態では構造ィ匕文書の一例として XML文書 を処理する例について説明する。文書処理装置 100は、主制御ユニット 110、編集 ユニット 120、 DOMユニット 130、 CSSユニット 140、 HTMLユニット 150、 SVGュ- ット 160、及び変換部の一例である VCユニット 180を備える。これらの構成は、ハード ウェアコンポーネントでいえば、任意のコンピュータの CPU、メモリ、メモリにロードさ れたプログラムなどによって実現される力 ここではそれらの連携によって実現される 機能ブロックを描いている。したがって、これらの機能ブロックがハードウェアのみ、ソ フトウェアのみ、またはそれらの糸且合せによっていろいろな形で実現できることは、当 業者には理解されるところである。
[0016] 主制御ユニット 110は、プラグインのロードや、コマンド実行のフレームワークを提供 する。編集ユニット 120は、 XML文書を編集するためのフレームワークを提供する。 文書処理装置 100における文書の表示及び編集機能は、プラグインにより実現され ており、文書の種別に応じて必要なプラグインが主制御ユニット 110又は編集ュ-ッ ト 120によりロードされる。主制御ユニット 110又は編集ユニット 120は、処理対象とな る XML文書の名前空間を参照して、 XML文書がいずれのボキヤブラリにより記述さ れて ヽるかを判別し、そのボキヤブラリに対応した表示又は編集用のプラグインを口 ードして表示や編集を実行させる。例えば、文書処理装置 100には、 HTML文書の 表示及び編集を行う HTMLユニット 150、 SVG文書の表示及び編集を行う SVGュ ニット 160など、ボキヤブラリ(タグセット)ごとに表示系及び編集系がプラグインとして 実装されており、 HTML文書を編集するときは HTMLユニット 150が、 SVG文書を 編集するときは SVGユニット 160が、それぞれロードされる。後述するように、 HTML と SVGの双方の構成要素を含む複合文書が処理対象となって ヽる場合は、 HTML ユニット 150と SVGユニット 160の双方がロードされる。
[0017] このような構成によれば、ユーザは、必要な機能のみを選択してインストールし、後 力 適宜機能を追加又は削除することができるので、プログラムを格納するハードデ イスクなどの記録媒体の記憶領域を有効に活用することができ、また、プログラム実行 時にも、メモリの浪費を防ぐことができる。また、機能拡張性に優れており、開発主体 としても、プラグインの形で新たなボキヤブラリに対応することが可能なので開発が容 易となり、ユーザとしても、プラグインの追カ卩により容易かつ低コストにて機能を追カロ することができる。
[0018] 編集ユニット 120は、ユーザインターフェースを介してユーザ力も編集指示のィベン トを受け付け、そのイベントを適切なプラグインなどに通知するともに、イベントの再実 行 (リドウ)又は実行の取消(アンドゥ)などの処理を制御する。
[0019] DOMユニット 130は、 DOM提供部 132、 DOM生成部 134、及び出力部 136を 含み、 XML文書をデータとして扱うときのアクセス方法を提供するために定められた 文書オブジェクトモデル(Document Object Model: DOM)に準拠した機能を実現す る。 DOM提供部 132は、編集ユニット 120に定義されているインタフェースを満たす DOMの実装である。 DOM生成部 134は、 XML文書から DOMツリーを生成する。 後述するように、処理対象となる XML文書力 VCユニット 180により他のボキヤブラ リにマッピングされる場合は、マッピング元の XML文書に対応するソースツリーと、マ ッビング先の XML文書に対応するデスティネーションツリーが生成される。出力部 13 6は、例えば編集終了時に、 DOMツリーを XML文書として出力する。
[0020] CSSユニット 140は、 CSS解析部 142、 CSS提供部 144、及びレンダリング部 146 を含み、 CSSに準拠した表示機能を提供する。 CSS解析部 142は、 CSSの構文を 解析するバーサの機能を有する。 CSS提供部 144は、 CSSオブジェクトの実装であ り、 DOMツリーに対して CSSのカスケード処理を行う。レンダリング部 146は、 CSS のレンダリングエンジンであり、 CSSを用いてレイアウトされる HTMLなどのボキヤブ ラリで記述された文書の表示に用いられる。
[0021] HTMLユニット 150は、 HTMLにより記述された文書を表示又は編集する。 SVG ユニット 160は、 SVGにより記述された文書を表示又は編集する。これらの表示 Z編 集系は、プラグインの形で実現されており、それぞれ、文書を表示する表示部( Canvas) 156、 166、編集指示を含むイベントを送受信する制御部(Editlet) 152、 16 2、編集コマンドを受けて DOMに対して編集を行う編集部(Zone) 154、 164を備える 。制御部 152又は 162が外部力も DOMツリーの編集コマンドを受け付けると、編集 部 154又は 164が DOMツリーを変更し、表示部 156又は 166が表示を更新する。こ れらは、 MVC (Model-View-Controller)と呼ばれるフレームワークに類似する構成を とっており、概ね、表示部 156及び 166が「View」に、制御部 152及び 162が「 Controlle に、編集部 154及び 164と DOMの実体が「Model」に、それぞれ対応す る。本実施の形態の文書処理装置 100では、 XML文書をツリー表示形式で編集す るだけでなぐそれぞれのボキヤブラリに応じた編集を可能とする。例えば、 HTMLュ ニット 150は、 HTML文書をワードプロセッサに類似した方式で編集するためのユー ザインターフェースを提供し、 SVGユニット 160は、 SVG文書を画像描画ツールに類 似した方式で編集するためのユーザインターフェースを提供する。
[0022] VCユニット 180は、マッピング部 182、 VC定義ファイル取得部 184、及び VC定義 ファイル生成部 186を含み、あるボキヤブラリにより記述された文書を、他のボキヤブ ラリにマッピングすることにより、マッピング先のボキヤブラリに対応した表示編集用プ ラグインで文書を表示又は編集するためのフレームワークを提供する。本実施の形 態では、この機能を、ボキヤブラリコネクション (Vocabulary Connection: VC)と呼ぶ。 VC定義ファイル取得部 184は、マッピングの定義を記述したスクリプトファイルを取 得する。この VC定義ファイルは、ノードごとに、ノード間の対応(コネクション)を記述 する。このとき、各ノードの要素値や属性値の編集の可否を指定してもよい。また、ノ ードの要素値や属性値を用いた演算式を記述してもよ 、。これらの機能にっ 、ては、 後で詳述する。マッピング部 182は、 VC定義ファイル取得部 184が取得した VC定 義ファイルを参照して、 DOM生成部 134にデスティネーションツリーを生成させ、ソ ースツリーとデスティネーションツリーの対応関係を管理する。 VC定義ファイル生成 部 186は、ユーザが VC定義ファイルを生成するためのグラフィカルユーザインターフ エースを提供する。
[0023] VCユニット 180は、ソースツリーとデスティネーションツリーの間のコネクションを監 視し、表示を担当するプラグインにより提供されるユーザインタフェースを介してユー ザから編集指示を受け付けると、まずソースツリーの該当するノードを変更する。 DO Mユニット 130力 ソースツリーが変更された旨のミューテーシヨンイベントを発行する と、 VCユニット 180は、そのミューテーシヨンイベントを受けて、ソースツリーの変更に デスティネーションツリーを同期させるベぐ変更されたノードに対応するデスティネー シヨンツリーのノードを変更する。デスティネーションツリーを表示 z編集するプラグィ ン、例えば HTMLユニット 150は、デスティネーションツリーが変更された旨のミュー テーシヨンイベントを受けて、変更されたデスティネーションツリーを参照して表示を 更新する。このような構成により、少数のユーザにより利用されるローカルなボキヤブ ラリにより記述された文書であっても、他のメジャーなボキヤブラリに変換することで、 文書を表示することができるとともに、編集環境が提供される。
[0024] 文書処理装置 100により文書を表示又は編集する動作について説明する。文書処 理装置 100が処理対象となる文書を読み込むと、 DOM生成部 134が、その XML文 書から DOMツリーを生成する。また、主制御ユニット 110又は編集ユニット 120は、 名前空間を参照して文書を記述しているボキヤブラリを判別する。そのボキヤブラリに 対応したプラグインが文書処理装置 100にインストールされている場合は、そのブラ グィンをロードして、文書を表示 Z編集させる。プラグインカ Sインストールされていない 場合は、マッピング用の VC定義ファイルが存在するか否かを確認する。 VC定義ファ ィルが存在する場合、 VC定義ファイル取得部 184が VC定義ファイルを取得し、その 定義に従って、デスティネーションツリーが生成され、マッピング先のボキヤブラリに対 応するプラグインにより文書が表示 Z編集される。複数のボキヤブラリを含む複合文 書である場合は、後述するように、それぞれのボキヤブラリに対応したプラグインによ り、文書の該当箇所がそれぞれ表示,編集される。 VC定義ファイルが存在しない場 合は、文書のソース又はツリー構造を表示し、その表示画面において編集が行われ る。
[0025] 図 2は、処理対象となる XML文書の例を示す。この XML文書は、生徒の成績デー タを管理するために用いられる。 XML文書のトップノードである構成要素「成績」は、 配下に、生徒ごとに設けられた構成要素「生徒」を複数有する。構成要素「生徒」は、 属性値「名前」と、子要素「国語」、「数学」、「理科」、「社会」を有する。属性値「名前」 は、生徒の名前を格納する。構成要素「国語」、「数学」、「理科」、「社会」は、それぞ れ、国語、数学、理科、社会の成績を格納する。例えば、名前カ^ A」である生徒の国 語の成績は「90」、数学の成績は「50」、理科の成績は「75」、社会の成績は「60」で ある。以下、この文書で使用されているボキヤブラリ(タグセット)を、「成績管理ボキヤ ブラリ」と呼ぶ。
[0026] 本実施の形態の文書処理装置 100は、成績管理ボキヤブラリの表示 Z編集に対応 したプラグインを有しないので、この文書をソース表示、ツリー表示以外の方法で表 示するためには、前述した VC機能が用いられる。すなわち、成績管理ボキヤブラリを 、プラグインが用意された別のボキヤブラリ、例えば、 HTMLや SVGなどにマツピン グするための VC定義ファイルを用意する必要がある。ユーザ自身力 定義フアイ ルを作成するためのユーザインターフェースについては後述することにして、ここでは 、既に VC定義ファイルが用意されて 、るとして説明を進める。
[0027] 図 3は、図 2に示した XML文書を HTMLで記述された表にマッピングする例を示 す。図 3の例では、成績管理ボキヤブラリの「生徒」ノードを、 HTMLにおける表(「 TABLE」ノード)の行(「TR」ノード)に対応づけ、各行の第 1列には属性値「名前」を、 第 2列には「国語」ノードの要素値を、第 3列には「数学」ノードの要素値を、第 4列に は「理科」ノードの要素値を、第 5列には「社会」ノードの要素値を、それぞれ対応付 ける。これにより、図 2に示した XML文書を、 HTMLの表形式で表示することができ る。また、これらの属性値及び要素値は、編集可能であることが指定されており、ユー ザが HTMLによる表示画面上で、 HTMLユニット 150の編集機能により、これらの 値を編集することができる。第 6列には、国語、数学、理科、社会の成績の加重平均 を算出する演算式が指定されており、生徒の成績の平均点が表示される。このように 、 VC定義ファイルに演算式を指定可能とすることにより、より柔軟な表示が可能となり 、編集時のユーザの利便性を向上させることができる。なお、第 6列は、編集不可で あることが指定されており、平均点のみを個別に編集することができな 、ようにして ヽ る。このように、マッピング定義において、編集の可否を指定可能とすることにより、ュ 一ザの誤操作を防ぐことができる。
[0028] 図 4は、図 2に示した XML文書を図 3に示した表にマッピングするための VC定義フ アイルの例を示す。この VC定義ファイルは、 VC定義ファイル用に定義されたスクリブ ト言語により記述される。 VC定義ファイルには、コマンドの定義と、表示のテンプレー トが記述されている。図 4の例では、コマンドとして、「生徒の追加」と「生徒の削除」が 定義されており、それぞれ、ソースツリーにノード「生徒」を挿入する操作と、ソースッリ 一からノード「生徒」を削除する操作が対応付けられている。また、テンプレートとして
、表の第 1行に「名前」、「国語」などの見出しが表示され、第 2行以降に、ノード「生徒 」の内容が表示されることが記述されて 、る。ノード「生徒」の内容を表示するテンプレ ート中、「text-of」と記述された項は「編集可能」であることを意味し、「value-of」と記述 された項は「編集不可能」であることを意味する。また、ノード「生徒」の内容を表示す る行のうち、第 6列には、「(src:国語 + src:数学 + src:理科 + src:社会) div 4」という計 算式が記述されており、生徒の成績の平均が表示されることを意味する。
[0029] 図 5は、図 2に示した成績管理ボキヤブラリで記述された XML文書を、図 3に示した 対応により HTMLにマッピングして表示した画面の例を示す。表 200の各行には、 左から、各生徒の名前、国語の成績、数学の成績、理科の成績、社会の成績、及び 平均点が表示されている。ユーザは、この画面上で、 XML文書を編集することがで きる。たとえば、第 2行第 3列の値を「70」に変更すると、このノードに対応するソース ツリーの要素値、すなわち、生徒「B」の数学の成績が「70」に変更される。このとき、 VCユニット 180は、デスティネーションツリーをソースツリーに追従させるベぐデステ イネーシヨンツリーの該当箇所を変更し、 HTMLユニット 150力 変更されたデスティ ネーシヨンツリーに基づいて表示を更新する。したがって、画面上の表においても、 生徒「B」の数学の成績が「70」に変更され、更に、平均点が「55」に変更される。
[0030] 図 5に示した画面には、図 4に示した VC定義ファイルに定義されたように、「生徒の 追加」及び「生徒の削除」のコマンド力 Sメニューに表示される。ユーザ力 Sこれらのコマ ンドを選択すると、ソースツリーにおいて、ノード「生徒」が追加又は削除される。この ように、本実施の形態の文書処理装置 100では、階層構造の末端の構成要素の要 素値を編集するのみではなぐ階層構造を編集することも可能である。このようなッリ 一構造の編集機能は、コマンドの形でユーザに提供されてもよい。また、例えば、表 の行を追加又は削除するコマンドが、ノード「生徒」を追加又は削除する操作に対応 づけられてもよい。また、他のボキヤブラリを埋め込むコマンドがユーザに提供されて もよい。この表を入力用テンプレートとして、穴埋め形式で新たな生徒の成績データ を追加することもできる。以上のように、 VC機能により、 HTMLユニット 150の表示 Z 編集機能を利用しつつ、成績管理ボキヤブラリで記述された文書を編集することが可 能となる。
[0031] 図 6は、ユーザが VC定義ファイルを生成するために、 VC定義ファイル生成部 186 がユーザに提示するグラフィカルユーザインターフェースの例を示す。画面左側の領 域 202には、マッピング元の XML文書がツリー表示されている。画面右側の領域 20 4には、マッピング先の XML文書の画面レイアウトが示されている。この画面レイァゥ トは、 HTMLユニット 150により編集可能となっており、ユーザは、画面右側の領域 2 04において、文書を表示するための画面レイアウトを作成する。そして、例えば、マウ スなどのポインティングデバイスにより、画面左側の領域 202に表示されたマッピング 元の XML文書のノードを、画面右側の領域 204に表示された HTMLによる画面レ ィアウト中へドラッグ &ドロップ操作を行うことにより、マッピング元のノードと、マツピン グ先のノードとのコネクションが指定される。例えば、要素「生徒」の子要素である「数 学」を、 HTML画面の表 200の第 1行第 3列にドロップすると、「数学」ノードと、 3列目 の「TD」ノードの間にコネクションが張られる。各ノードには、編集の可否が指定でき るようになっている。また、表示画面中には、演算式を埋め込むこともできる。画面の 編集が終わると、 VC定義ファイル生成部 186は、画面レイアウトとノード間のコネクシ ヨンを記述した VC定義ファイルを生成する。
[0032] XHTML, MathML、 SVGなどの主要なボキヤブラリに対応したビューヮゃエディ タは既に開発されて 、るが、図 2に示した文書のようなオリジナルなボキヤブラリで記 述された文書に対応したビューヮゃエディタを開発するのは現実的でな 、。しかし、 上記のように、他のボキヤブラリにマッピングするための VC定義ファイルを作成すれ ば、ビューヮゃエディタを開発しなくても、 VC機能を利用して、オリジナルなボキヤブ ラリで記述された文書を表示 ·編集することができる。
[0033] 図 7は、 VC定義ファイル生成部 186により生成された画面レイアウトの他の例を示 す。図 7の例では、成績管理ボキヤブラリで記述された XML文書を表示するための 画面に、表 200と、円グラフ 206が作成されている。この円グラフ 206は、 SVGにより 記述される。後述するように、本実施の形態の文書処理装置 100は、一つの XML文 書内に複数のボキヤブラリを含む複合文書を処理することができるので、この例のよう に、 HTMLで記述された表 200と、 SVGで記述された円グラフ 206とを、一つの画 面上に表示することができる。
[0034] 図 8は、文書処理装置 100による XML文書の編集画面の一例を示す。図 8の例で は、一つの画面が複数に分割されており、それぞれの領域において、処理対象とな る XML文書を異なる複数の表示形式により表示している。領域 210には、文書のソ ースが表示されており、領域 212には、文書のツリー構造が表示されており、領域 21 4には、図 5に示した HTMLにより記述された表が表示されている。これらのいずれ の画面上においても、文書の編集が可能であり、いずれかの画面上でユーザが編集 を行うと、ソースツリーが変更され、それぞれの画面の表示を担当するプラグインが、 ソースツリーの変更を反映すべく画面を更新する。具体的には、ソースツリーの変更 を通知するミューテーシヨンイベントのリスナーとして、それぞれの編集画面の表示を 担当するプラグインの表示部を登録しておき、 V、ずれかのプラグイン又は VCユニット 180によりソースツリーが変更されたときに、編集画面を表示中の全ての表示部が、 発行されたミューテーシヨンイベントを受け取って画面を更新する。このとき、プラグィ ンが VC機能により表示を行っている場合は、 VCユニット 180がソースツリーの変更 に追従してデスティネーションツリーを変更した後、変更されたデスティネーションッリ 一を参照してプラグインの表示部が画面を更新する。
[0035] 例えば、ソース表示及びツリー表示を、専用のプラグインにより実現している場合は 、ソース表示用プラグインとツリー表示用プラグインは、デスティネーションツリーを用 いず、直接ソースツリーを参照して表示を行う。この場合、いずれかの画面において 編集が行われると、ソース表示用プラグインとツリー表示用プラグインは、変更された ソースツリーを参照して画面を更新し、領域 214の画面を担当している HTMLュ-ッ ト 150は、ソースツリーの変更に追従して変更されたデスティネーションツリーを参照 して画面を更新する。
[0036] ソース表示及びツリー表示は、 VC機能を利用して実現することもできる。すなわち 、ソース、ツリー構造を HTMLによりレイアウトし、その HTMLに XML文書をマツピン グして、 HTMLユニット 150により表示してもよい。この場合、ソース形式、ツリー形式 、表形式の 3つのデスティネーションツリーが生成されることになる。いずれかの画面 において編集が行われると、 VCユニット 180は、ソースツリーを変更した後、ソース形 式、ツリー形式、表形式の 3つのデスティネーションツリーをそれぞれ変更し、 HTML ユニット 150は、それらのデスティネーションツリーを参照して、 3つの画面を更新する
[0037] このように、一つの画面上に複数の表示形式で文書を表示することにより、ユーザ の利便性を向上させることができる。例えば、ユーザは、ソース表示又はツリー表示 により文書の階層構造を把握しつつ、表 200などを用いて視覚的に分力りやすい形 式で文書を表示し、編集することができる。上記の例では、一つの画面を分割して複 数の表示形式による画面を同時に表示した力 一つの画面に一つの表示形式による 画面を表示し、表示形式をユーザの指示により切り替え可能としてもよい。この場合、 主制御ユニット 110が、ユーザから表示形式の切り替え要求を受け付け、各プラグィ ンに指示して表示を切り替える。
[0038] 図 9は、文書処理装置 100により編集される XML文書の他の例を示す。図 9に示し た XML文書では、 SVG文書の「foreignObject」タグの中に XHTML文書が埋め込 まれており、さら〖こ、 XHTML文書の中に MathMLで記述された数式が入っている 。このような場合、編集ユニット 120が、名前空間を参照して、適切な表示系に描画 作業を振り分ける。図 9の例では、編集ユニット 120は、まず、 SVGユニット 160に四 角开を描画させ、つづいて、 HTMLユニット 150に XHTML文書を描画させる。さら に、図示しない MathMLユニットに、数式を描画させる。こうして、複数のボキヤブラリ を包含する複合文書が適切に表示される。表示結果を図 10に示す。
[0039] 図 10に示した編集画面において、ユーザにより文書が編集されると、編集された部 分を担当するプラグイン又は VCユニット 180がソースツリーを変更する。ソースツリー には、ノードごとにミューテーシヨンイベントのリスナーを登録できるようになっており、 通常は、各ノードが属するボキヤブラリに対応したプラグインの表示部又は VCュ-ッ ト 180がリスナーとして登録される。 DOM提供部 132は、ソースツリーが変更されると 、変更されたノードから上位の階層へたどって、登録されたリスナーがあれば、そのリ スナ一へミューテーシヨンイベントを発行する。例えば、図 9に示した文書において、 < html >ノードの下位のノードが変更された場合、く html >ノードにリスナーとして 登録された HTMLユニット 150にミューテーシヨンイベントが通知されるとともに、その 上位のく svg>ノードにリスナーとして登録された SVGユニット 160にもミューテーシ ヨンイベントが通知される。このとき、 HTMLユニット 150は、変更されたソースツリー を参照して表示を更新する。 SVGユニット 160は、自身のボキヤブラリに属するノード が変更されて 、な 、ので、ミューテーシヨンイベントを無視してもよ 、。
[0040] 編集の内容によっては、 HTMLユニット 150による表示の更新に伴って、全体のレ ィアウトが変わる可能性がある。この場合は、画面のレイアウトを管理する構成、例え ば最上位のノードの表示を担当するプラグインにより、プラグインごとの表示領域のレ ィアウトが更新される。例えば、 HTMLユニット 150による表示領域が以前より大きく なった場合、 HTMLユニット 150は、まず自身の担当する部分を描画して、表示領 域の大きさを決定する。そして、画面のレイアウトを管理する構成に、変更後の表示 領域の大きさを通知し、レイアウトの更新を依頼する。画面のレイアウトを管理する構 成は、通知を受けて、プラグインごとの表示領域を再レイアウトする。こうして、編集さ れた部分の表示が適切に更新されるとともに、画面全体のレイアウトが更新される。
[0041] 文書編集中、カーソル (キャリッジ)の位置に応じて、表示されるメニューを切り替え てもよい。すなわち、カーソルが、 SVG文書が表示された領域内に存在するときは、 SVGユニット 160が提供するメニュー、又は SVG文書をマッピングするための VC定 義ファイルに定義されたコマンドを表示し、カーソルが、 XHTML文書が表示された 領域内に存在するときは、 HTMLユニット 150が提供するメニュー、又は XHTML文 書をマッピングするための VC定義ファイルに定義されたコマンドを表示する。これに より、編集位置に応じて適切なユーザインターフェースを提供することができる。
[0042] 複合文書にお!、て、あるボキヤブラリに対応する適切なプラグイン又はマッピング用 の VC定義ファイルがな力つた場合は、そのボキヤブラリにより記述された部分は、ソ ース表示又はツリー表示されてもよい。従来、ある文書に他の文書を埋め込んだ複 合文書を開くとき、埋め込まれた文書を表示するアプリケーション力インストールされ ていないと、その内容を表示することができなかったが、本実施の形態では、表示用 のアプリケーションが存在しなくても、テキストデータにより構成された XML文書をソ ース表示又はツリー表示することにより内容を把握することができる。これは、テキスト ベースである XMLなどの文書ならではの特徴といえる。
[0043] あるボキヤブラリにより記述された文書内に、他のボキヤブラリのタグを用いてもよい 。この XML文書は、妥当(valid)ではないが、整形式 (welH rmed)であれば、有効な XML文書として処理可能である。この場合、挿入された他のボキヤブラリのタグは、 V C定義ファイルによりマッピングされ、 VCユニット 180により処理されてもよい。例えば 、 XHTML文書中に、「重要」、「最重要」などのタグを使用し、これらのタグで囲まれ た部分を強調表示してもよ 、し、重要度の順にソートして表示してもよ 、。
[0044] データがテキストベースで記述されることの他の利点として、例えば、複合文書中の 、あるボキヤブラリにより記述される部分において、同一文書内の他のボキヤブラリで 記述された部分のデータを参照することができる。例えば、計算式などにおいて他の ボキヤブラリで記述されたデータを参照することもできるし、 HTML文書内で検索を 実行する時に、文書中の SVGなどの図に埋め込まれた文字列も検索対象とすること もできる。通常、あるアプリケーションで作成した文書中に、他のアプリケーションで作 成したデータや文書などを埋め込む場合、アプリケーションは、埋め込まれたデータ のフォーマットを把握しておらず、データを正しく解釈することができないので、埋め 込まれたデータは 、わゆるブラックボックスとして扱われ、内容を参照することができ ない。しかしながら、このような複合文書を扱うアプリケーション力 埋め込まれたデー タのフォーマットを把握し、内容を正しく解釈することができれば、埋め込まれたデー タを、文書中の他の部分力も参照することが可能となる。 XML文書は、テキストベー スで記述されるため、上述したような機能を実現するのに適している。以下、第 2の実 施の形態として、このような機能を実現する文書処理装置 100について説明する。
[0045] (第 2の実施の形態)
図 11は、本発明の第 2の実施の形態に係る文書処理装置 100の全体構成を示す 。本実施の形態の文書処理装置 100は、図 1に示した第 1の実施の形態の文書処理 装置 100の構成に加えて、他のデータを参照した計算処理を実行するプラグインで ある計算ユニット 190を更に備える。計算ユニット 190は、計算式などを記述するため のボキヤブラリである &1(^1 ^ボキヤブラリで記述された文書を処理する。計算ュ ニット 190は、処理対象となる文書に含まれる構成要素の要素値又は属性値力 他 のデータを参照した計算式により記述されているときに、参照先のデータを取得して 計算式を実行し、計算結果をその要素値又は属性値に代入する。参照先のデータ は、参照元と同一のボキヤブラリで記述されていてもよいし、異なるボキヤブラリで記 述されていてもよい。また、他の文書に記述されたデータを参照してもよい。他の文 書のデータを参照する場合、文書処理装置 100は、参照先のデータが記述された文 書を読み込んで、参照先のデータを取得すればよい。その他の構成及び動作は第 1 の実施の形態と同様であり、同様の構成には同じ符号を付して 、る。
[0046] 計算ユニット 190は、計算用のボキヤブラリで記述された計算用の定義ファイルを取 得する計算定義ファイル取得部 192と、計算定義ファイルに記述された計算式を実 行する実行部 194とを含む。文書が読み込まれたときに、その文書に計算定義フアイ ルを外部参照すべき旨が記述されていた場合は、計算定義ファイル取得部 192がそ の計算定義ファイルを取得し、実行部 194が記述された計算式を実行して、計算結 果を代入する。また、計算式が参照しているデータが更新されたとき、実行部 194は 、参照先データが格納されたノードが更新された旨のミューテーシヨンイベントを受信 し、計算式を再実行して参照元のデータに代入する。参照元のデータが更新される と、そのノードの表示を担当するプラグインが表示を更新し、計算結果が表示に反映 される。
[0047] 図 12は、本実施の形態の文書処理装置 100により処理される文書の例を示す。こ の XML文書は、出張旅費を申請するために用いられる。この XML文書は、旅費精 算用のボキヤブラリである「ryohi」と、社員データ管理用のボキヤブラリである「office」 とにより記述されている。文書の冒頭部分には、この文書を VC定義ファイル「 ryohiseisan.vcdjを参照して VC機能により表示すべきことと、計算定義ファイル「 ryohiseisan.calcjを参照して計算を実行すべきことが宣言されて!、る。
[0048] トップノードである構成要素「ryohiseisan」は、「ryohi」ボキヤブラリの構成要素であり 、配下に、「office」ボキヤブラリの構成要素である「person」及び「persondb」と、「ryohi」 ボキヤブラリの構成要素である「period」、「place」、「business」、「items」、及び「 tota卜 price」とを有している。構成要素「person」は、出張旅費の申請者のデータを格 納し、配下に、申請者の所属する部門コードを格納する「department- code」、申請者 の所属部署名を格納する「department- namej、申請者のランクを格納する「rank」、 申請者の社員番号を格納する「number」、申請者の氏名を格納する「name」、及び申 請者の電話番号を格納する「tel」を有する。構成要素「persondb」は社員のデータを 格納しており、その配下に設けられた複数の構成要素「reCord」の属性値として、社 員番号「number」、氏名「name」、電話番号「tel」がそれぞれ格納されている。構成要 素「period」は出張期間を格納しており、属性値「start」に開始日力 属性値「end」に 終了日が格納される。構成要素「place」は、出張の用務先を格納する。構成要素「 business は、出張の用件を格納する。構成要素「items」は出張旅費の詳細を格納し ており、配下に設けられた複数の構成要素「item」の属性値として、 日付「datetime」、 出発地「route-stai:」、到着地「route-end」、種別「type」、金額「price」が格納される。 構成要素「tota卜 price」は、出張旅費の総額を格納する。出張旅費の総額は、後述す るように、計算用の定義ファイルに記述された計算式にしたがって計算される。
[0049] 図 13は、図 12に示した XML文書を VC機能により表示するための VC定義フアイ ルの例を示す。 VC定義ファイル「ryohisaisan.vcd」には、コマンドの定義と、表示用の テンプレートが記述されている。図 13の例では、コマンドとして、「経路の追加」と「経 路の削除」が定義されており、それぞれ、ソースツリーにノード「ryohi:item」を挿入す る操作と、ソースツリー力もノード「ryohi:item」を削除する操作が対応付けられている 。表示用のテンプレートは、実際には図 13に示した VC定義ファイルの「変換テンプ レート」の部分に記述されて 、るが、ここでは図 14及び図 15に分割して示す。
[0050] 図 14は、図 13に示した VC定義ファイル中に記述されている表示用のテンプレート の例を示す。図 12に示した XML文書は、図 14に示したテンプレートにしたがって H TML文書に変換されて表示される。なお、テンプレート中、表示のスタイルを記述し た部分は省略している。社員番号を格納した「office:person/office:number」には、編 集可能であることを示す「text-of」が指定されており、社員の氏名を格納した「 office:person/ office:name」及び内線番号 格糸内した「olhce:person/ oftice:tel」に【ま、 編集不可能であることを示す「value-of」が指定されている。後述するように、ユーザ が社員番号を変更したときに、計算ユニット 190が氏名及び内線番号を自動的に変 更するので、氏名及び内線番号は編集不可能とされている。 [0051] 図 15は、図 13に示した VC定義ファイル中に記述されている表示用のテンプレート のうち、出張旅費の経路の詳細を格納した構成要素「ryohi: item」を表示するための テンプレートの例を示す。出張旅費の詳細を表示した表において、経路の詳細を表 示する行のそれぞれに、経路を追加するための「追加」ボタンと、経路を削除するた めの「削除」ボタンが表示される。「追加」ボタンは、図 13に示した VC定義ファイル中 のコマンド「経路の追加」に、「削除」ボタンは、「経路の削除」に、それぞれ対応付け られており、ユーザがボタンをクリックすることにより、該当するコマンドが実行される。
[0052] 図 16は、図 12に示した XML文書に適用される計算定義ファイルの例を示す。この 計算定義ファイルは、計算式を記述するためのボキヤブラリにより記述されている。最 初の要 ^「calc:Dind」に【ま、 ' ~~ト「ryohi:ryohiseisan/office:person/ office: name」に、 ' ~~ド「office:persondb」の目 下の弟「office:number」番目のノ ~~ト ι office:record」の厲 性値「name」が代入されることが記述されている。すなわち、申請者の社員番号が変 更されたときに、社員名簿中に記述された、その社員番号の社員の氏名が、申請者 の氏名に代入される。二番目の要素「calc:bind」には、同様に、申請者の社員番号が 変更されたときに、その社員番号の社員の内線番号が、申請者の内線番号に代入さ れることが記述されている。三番目の要素「calc:bind」には、ノード「
ryohi:ryohiseisan/ ryohi: tota卜 pricejに、 ' ~~ 「ryohi:item」の禺'性値「pnce」の合十 値が代入されることが記述されている。すなわち、出張旅費の各詳細の金額の合計 値が、出張旅費の総額に代入される。
[0053] 図 17は、図 12に示した文書を、図 13から図 15に示した VC定義ファイルにしたが つて表示した画面の例を示す。詳細を表示するテーブルの 2行目には、図 12に示し た文書の要素「ryohi:items」の配下の二番目の要素「ryohi:item」の内容が表示され ている。文書中では、属性値「route-start」、「route-end」、「type」には値がないが、 図 15に示した VC定義ファイルに記述された定義にしたがって、値がないときの代替 テキストが表示されている。
[0054] 図 18は、図 17に示した編集画面において、社員番号が変更されたときの画面の例 を示す。ユーザが、申請者の社員番号の欄を「1821」から「1318」に書き換えると、 まず、ソースツリーの対応するノードが「1318」に変更される。このとき、このノードが 変更された旨のミューテーシヨンイベントが計算ユニット 190に対して発行される。計 算ユニット 190の実行部 194は、ミューテーシヨンイベントを受けて、計算定義フアイ ルに記述された規則にしたがって、ソースツリーを変更する。ここでは、申請者の氏名 と内線番号が変更される。ソースツリーが変更されると、その旨のミューテーシヨンィ ベントが VCユニット 180に対して発行され、 VCユニット 180がデスティネーションッリ 一を変更する。さらに、デスティネーションツリーが変更された旨のミューテーシヨンィ ベントが HTMLユニット 150に対して発行され、 HTMLユニット 150により表示が更 新される。
[0055] 図 19は、図 17に示した編集画面において、出張の詳細項目が追加され、さらに交 通費の金額が変更されたときの画面の例を示す。ユーザが、追加ボタンをクリックす ると、 VC定義ファイルに記述されたコマンドの定義にしたがって、ソースツリーにノー ド「ryohi:item」が追加され、出張の詳細項目の行が追加される。さらに、ユーザが、交 通費の金額を記入すると、計算定義ファイルに記述された定義にしたがって、計算ュ ニット 190の実行部 194が出張旅費の総額を更新する。そして、上述した手順と同様 に、表示が更新される。
[0056] 図 20は、本実施の形態の文書処理装置 100により処理される文書の別の例を示す 。この XML文書は、ボキヤブラリ「sample」と、計算用ボキヤブラリ「calculation」とにより 記述されている。文書の冒頭部分には、この文書を VC定義ファイル「embed.vcd」を 参照して VC機能により表示すべきことと、計算ユニット 190により計算を実行すべき ことが宣言されている。
[0057] トップノードである構成要素「sample」は、「sample」ボキヤブラリの構成要素であり、 子要素として、構成要素「value」と、構成要素「value- tota卜 abs」と、構成要素「 value-tota卜 ref」とを含む。構成要素「value」は、計算式で参照される値を格納する。 構成要素 rvalue-total-absj及び構成要素「value— total— ref」は、構成要素「value」の 要素値の合計を格納する。構成要素「value-tota卜 abs」及び「value-tota卜 ref」は、そ れぞれ属'性値「cal expressionを含む。属'性値「calc:expression」には、構成要素「 value]の合計値を計算する計算式が記述されており、この計算結果が要素値として 格納される。構成要素「value- tota卜 abs」の属性値「calc:expression」には、参照先の ノードが絶対パスで記述されており、構成要素「value-tota卜 ref」の属性値「 calc:expressionJには、参照先のノードが相対パスで記述されている力 これらは両方 とも同じノード「sample:value」を参照しているので、同じ合計値が算出される。
[0058] 属性「calc:expression」は、名前空間接頭辞を付した大域 (グローバル)属性として 指定されている。大域属性は、任意のボキヤブラリの構成要素に、同じ意味を持つ属 性として指定可能である。すなわち、任意のボキヤブラリの構成要素に対して、ボキヤ ブラリ「calculation」において計算式を表現する属性「expression」として機能する。こ れにより、属性値として記述された計算式の値が、計算ユニット 190により計算され、 その構成要素の要素値に代入される。
[0059] 図 21は、図 20に示した XML文書を VC機能により表示するための VC定義フアイ ルの例を示す。 VC定義ファイル「embed.vcd」には、コマンドの定義と、表示用のテン プレートが記述されている。図 20の例では、コマンドとして、「ノードの削除」と「式属 性削除スクリプト」が定義されており、それぞれ、ソースツリー力もノード「
sample:sample/ sample:value— tota卜 abs」を削除する操作と、ノード「
sample:sample/sample:value— totaト absj x^り、 十算式を g己述し 7こ属'性「
calc:expressionJを削除する操作が対応付けられて 、る。
[0060] 図 22は、図 20に示した文書を、図 21に示した VC定義ファイルにしたがって表示し た画面の例を示す。計算用プラグインにより計算された、一番目の構成要素「 sample:valuejの要素値「100」、二番目の構成要素「sample:value」の要素値「200」、 三番目の構成要素「sample:value」の要素値「300」の合計値力 計算ユニット 190の 実行部 194により計算され、構成要素「sample:value- tota卜 abs」及び「
value-total-refjに代入されて表示されて 、る。
[0061] 図 23は、図 22に示した編集画面において、サンプル値 1が変更されたときの画面 の例を示す。ユーザが、サンプル値 1の欄を「100」から「500」に書き換えると、まず、 ソースツリーの対応するノード「sample:sample/sample:value」の要素値が「500」に変 更される。このとき、このノードが変更された旨のミューテーシヨンイベントが計算ュ- ット 190に対して発行される。計算ユニット 190の実行部 194は、ミューテーシヨンィべ ントを受けて、構成要素「sample:sample/sample:value— tota卜 abs」及び構成要素「 sample: sample/sample:value— totaHrefJの属'性値に記述された言十算式にした力 Sつて、 ソースツリーを変更する。ここでは、サンプル値の合計値が変更される。ソースツリー が変更されると、その旨のミューテーシヨンイベントが VCユニット 180に対して発行さ れ、 VCユニット 180がデスティネーションツリーを変更する。さらに、デスティネーショ ンツリーが変更された旨のミューテーシヨンイベントが HTMLユニット 150に対して発 行され、 HTMLユニット 150により表示が更新される。
[0062] このように、本実施の形態の文書処理装置 100によれば、計算定義ファイルに記述 された計算式や、 XML文書の構成要素に大域属性として記述された計算式におい て、他の任意のデータを参照することができる。これにより、文書内のデータを有効に 活用することが可能となる。計算式は、任意の形式であってよぐ例えば、複数の構 成要素の間でデータを同期させるために、同一のデータを代入させる計算式であつ てもよいし、算術式、文字列の操作などであってもよい。
[0063] 以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それ らの各構成要素や各処理プロセスの組合せに 、ろ 、ろな変形例が可能なこと、また そうした変形例も本発明の範囲にあることは当業者に理解されるところである。
[0064] 実施の形態では、 XML文書を処理する例につ 、て説明したが、本実施の形態の 文書処理装置 100は、他のマークアップ言語、例えば、 SGML, HTMLなどで記述 された文書も同様に処理可能である。
産業上の利用可能性
[0065] 本発明は、マークアップ言語により記述された文書を処理する文書処理装置に利 用可能である。

Claims

請求の範囲
[1] マークアップ言語により記述された文書を表示し、ユーザによる前記文書の編集を 受け付けるための処理系と、
前記文書に含まれる構成要素の属性値に、他のデータを参照した計算式が記述さ れているときに、参照先のデータを取得して前記計算式を実行し、計算結果を前記 構成要素の要素値に代入する計算ユニットと、
を備えることを特徴とする文書処理装置。
[2] 前記計算式は、前記計算式を記述するためのマークアップ言語により記述されるこ とを特徴とする請求項 1に記載の文書処理装置。
[3] 前記計算式は、大域属性として記述されることを特徴とする請求項 1又は 2に記載 の文書処理装置。
[4] 前記参照先のデータは、参照元の前記構成要素とは異なるマークアップ言語によ り記述されることを特徴とする請求項 1から 3のいずれかに記載の文書処理装置。
[5] 前記計算ユニットは、前記参照先のデータが変更されたときに、前記計算式を再実 行し、計算結果を前記要素値に代入することを特徴とする請求項 1から 4の 、ずれか に記載の文書処理装置。
[6] 前記文書から、文書をデータとして扱うときのアクセス方法を提供するために定めら れた文書オブジェクトモデルに準拠した形式のデータを生成する生成部を更に備え 前記生成部は、前記文書に対応する文書オブジェクトモデルデータを生成し、 前記処理系は、前記文書オブジェクトモデルデータを参照して、前記文書を表示 することを特徴とする請求項 1から 5のいずれかに記載の文書処理装置。
[7] 前記計算ユニットは、前記文書オブジェクトモデルデータの中から、前記参照先の データを特定して取得することを特徴とする請求項 6に記載の文書処理装置。
[8] マークアップ言語により記述された文書を表示装置に表示する際に、前記文書に 含まれる構成要素の属性値に、他のデータを参照した計算式が記述されて!、るか否 かを判断するステップと、
前記属性値に前記計算式が記述されていたときに、参照先のデータを取得して前 記計算式を実行し、計算結果を前記構成要素の要素値に代入するステップと、 を含むことを特徴とする文書処理方法。
コンピュータに、
マークアップ言語により記述された文書を表示装置に表示する際に、前記文書に 含まれる構成要素の属性値に、他のデータを参照した計算式が記述されて!、るか否 かを判断する機能と、
前記属性値に前記計算式が記述されていたときに、参照先のデータを取得して前 記計算式を実行し、計算結果を前記構成要素の要素値に代入する機能と、 を実現させることを特徴とするコンピュータプログラム。
PCT/JP2005/006796 2004-04-08 2005-04-06 文書処理装置及び文書処理方法 WO2005098658A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2006512107A JPWO2005098658A1 (ja) 2004-04-08 2005-04-06 文書処理装置及び文書処理方法
EP05728736A EP1768034A1 (en) 2004-04-08 2005-04-06 Document processing device and document processing method
US11/578,126 US20070208995A1 (en) 2004-04-08 2005-04-06 Document Processing Device and Document Processing Method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004-114710 2004-04-08
JP2004114710 2004-04-08

Publications (1)

Publication Number Publication Date
WO2005098658A1 true WO2005098658A1 (ja) 2005-10-20

Family

ID=35125267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/006796 WO2005098658A1 (ja) 2004-04-08 2005-04-06 文書処理装置及び文書処理方法

Country Status (5)

Country Link
US (1) US20070208995A1 (ja)
EP (1) EP1768034A1 (ja)
JP (1) JPWO2005098658A1 (ja)
CN (1) CN1950817A (ja)
WO (1) WO2005098658A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2005098660A1 (ja) * 2004-04-08 2008-02-28 株式会社ジャストシステム 文書処理装置及び文書処理方法
WO2008044335A1 (fr) * 2006-10-10 2008-04-17 Justsystems Corporation Dispositif et procédé de traitement de données

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7865820B2 (en) * 2006-08-29 2011-01-04 Sap Ag Generating a business document model
JP5209051B2 (ja) * 2007-06-28 2013-06-12 テレフオンアクチーボラゲット エル エム エリクソン(パブル) データシステム及び方法
CN102096593B (zh) * 2011-02-16 2013-11-27 普元技术股份有限公司 基于Flex技术的Web端业务流程图形化编辑框架系统及方法
CN104504218A (zh) * 2015-01-08 2015-04-08 北京恒华伟业科技股份有限公司 一种cad图形处理方法、装置及cad软件插件
CN107766359B (zh) * 2016-08-17 2022-03-15 阿里巴巴(中国)有限公司 一种将页面内容转换为图片的方法、装置以及计算设备
CN111768823B (zh) * 2020-05-28 2021-04-27 上海森亿医疗科技有限公司 基于svg元素医学表达式编辑方法、装置、设备和介质

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11259460A (ja) * 1998-03-10 1999-09-24 Toshiba Corp 文書処理装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0107784D0 (en) * 2001-03-28 2001-05-16 Hewlett Packard Co Improvement relating to developing documents
JP3692054B2 (ja) * 2001-05-21 2005-09-07 株式会社東芝 文書構造変換方法および文書構造変換装置およびプログラム
US20030018661A1 (en) * 2001-07-19 2003-01-23 Darugar Parand Tony XML smart mapping system and method
JP2003067185A (ja) * 2001-08-14 2003-03-07 Internatl Business Mach Corp <Ibm> アプリケーション編集装置、データ処理方法及びプログラム
JP3857663B2 (ja) * 2002-04-30 2006-12-13 株式会社東芝 構造化文書編集装置、構造化文書編集方法及びプログラム
US7228496B2 (en) * 2002-07-09 2007-06-05 Kabushiki Kaisha Toshiba Document editing method, document editing system, server apparatus, and document editing program
US7069504B2 (en) * 2002-09-19 2006-06-27 International Business Machines Corporation Conversion processing for XML to XML document transformation
US20040237040A1 (en) * 2003-05-19 2004-11-25 Malkin Wayne Allan System and method of processing an electronic form using layered aspects
CN1977259A (zh) * 2004-04-08 2007-06-06 佳思腾软件公司 文档处理装置和文档处理方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11259460A (ja) * 1998-03-10 1999-09-24 Toshiba Corp 文書処理装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2005098660A1 (ja) * 2004-04-08 2008-02-28 株式会社ジャストシステム 文書処理装置及び文書処理方法
WO2008044335A1 (fr) * 2006-10-10 2008-04-17 Justsystems Corporation Dispositif et procédé de traitement de données
JP2008097215A (ja) * 2006-10-10 2008-04-24 Just Syst Corp データ処理装置

Also Published As

Publication number Publication date
JPWO2005098658A1 (ja) 2008-02-28
US20070208995A1 (en) 2007-09-06
EP1768034A1 (en) 2007-03-28
CN1950817A (zh) 2007-04-18

Similar Documents

Publication Publication Date Title
US20100199167A1 (en) Document processing apparatus
US20090021767A1 (en) Document processing device
WO2005098658A1 (ja) 文書処理装置及び文書処理方法
WO2005098660A1 (ja) 文書処理装置及び文書処理方法
JP2008234370A (ja) 文書処理装置及び文書処理方法
WO2005098663A1 (ja) 情報管理装置
US20100100807A1 (en) Data processing device, and data processing method
WO2007081017A1 (ja) 文書処理装置
JPWO2006051869A1 (ja) 文書処理装置及び文書処理方法
JP4566196B2 (ja) 文書処理方法および装置
WO2005098662A1 (ja) 文書処理装置及び文書処理方法
WO2005098661A1 (ja) 文書処理装置及び文書処理方法
US20100077295A1 (en) Document processing device and document processing module
JPWO2007052680A1 (ja) 文書処理装置及び文書処理方法
US20080270887A1 (en) Document Processing Device And Document Processing Method
WO2006001393A1 (ja) 文書処理方法および装置
JP4417384B2 (ja) 文書処理装置および文書処理方法
JP2007183849A (ja) 文書処理装置
WO2005098698A1 (ja) 文書処理装置
WO2005098659A1 (ja) 文書処理装置及び文書処理方法
JP4719743B2 (ja) グラフ処理装置
US20090094509A1 (en) Document processing device, and document processing method
JP2008257277A (ja) 文書処理装置、方法、及びプログラム
JP2009110338A (ja) 文書処理装置及び文書処理方法
JP2008225931A (ja) 文書処理装置及び文書処理方法

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006512107

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 200580011934.4

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 11578126

Country of ref document: US

Ref document number: 2007208995

Country of ref document: US

WWW Wipo information: withdrawn in national office

Ref document number: DE

WWE Wipo information: entry into national phase

Ref document number: 2005728736

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 2005728736

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 11578126

Country of ref document: US