SYSTEM FOR DISPLAY OF STRUCTURED DOCUMENTS
Field of the Invention
This invention relates in general to systems for displaying information stored on computers, and more particularly to a system for displaying structured documents stored on computers.
Background of the Invention
It is well known in the field of document display using computer hardware to strictly and unambiguously define the structure of a type of document using a formal Document Type Definition ("DTD") such as is provided for in the programming language SGML (for Structured Generalized Markup Language, ISO #8879, 1986). A DTD supplies a specification which describes what structures are permissible for a type of structured document. For example, a DTD could define a document having a title, an abstract, and one or more paragraphs. Every document specified by that DTD would have the three parts set out above, although the actual title and the content of the abstract and paragraphs, as well as the number of paragraphs, could vary from one document to another. A "structured document" is one which may be described in a DTD. Such descriptions or DTDs are useful because they are able to be manipulated by computers. However, a DTD represented in the form of SGML code is not easily understood by most document authors and therefore is not a useful tool to allow writers to understand and manipulate the structure of a document in the process of drafting.
Several systems are known to display a structured document on a computer so that the information contained in the DTD of the document is made available to the writer drafting the document. One system used is to display the ASCII text of the document with the structure which meets the specification of the DTD represented by markups in the ASCII text. This system allows the author to interpret and change the document without restrictions. This system results in a display of the document which is confusing and does not constrain the author from editing the markup in ways that contravene the rules of the DTD.
A further system known in the art includes DTD-based constraints and emphases which assist in differentiating the DTD tags from the text content. Even
with such emphases, however, it remains very difficult for an author to infer useful information from the tag display.
Another system presents the tagged content as it would appear on the printed page, allowing information about the DTD to be inferred from the layout of the document on the computer display. Such a system does not, however, retain the separation between the output format and the structure and content of the document which is a basic precept of structured document systems. Furthermore, such a system does not help an author write a document as it is only after the document is completed that the formatted contents allow inference of the relationships of structures in the document.
Thus an interactive system for the display of a document which is able to retain the separation of the display of the structure and the content of the document, and which presents the structure of the document in an readily understood format, is desirable.
Summary of the Invention
An object of one aspect of the present invention is to provide an improved interactive display for the display of a structured document.
According to the present invention, a system is provided which separates the display of the formal structure of the document based on the DTD ("the structure display") from the representation of the data contents of the document ("the content display"). In the system of the invention, the content of the document to be displayed includes the case where there is no character or other data to be displayed (for example where there is a defined structure but no content data has yet been input by the user). In other words, a document having content can include the case of null content. In the system of the invention, graphic arrays of nested rectangular elements in three dimensional relief represent the formal structure of the document. This representation is unambiguous and therefore also serves as the foundation for a graphic programming language which could be used to create document templates (documents having a structure but which may have no content which are intended to be used as models or guides for authors creating structurally identical or similar documents with content).
According to one aspect of the present invention, there is provided an interactive system for the display of a document, the document having a formal structure definition and having content, the system comprising means for accepting a user input, display means, a logical editor, a content editor, in which the logical editor comprises means for processing the user input, and means responsive to the user input for displaying a portion of a representation of the formal structure definition of the document on a first distinct predefined region of the display means, and in which the content editor comprises means for processing the user input, and means responsive to the user input for displaying a portion of a representation of the document content in a second distinct predefined region of the display means, wherein the portion of the representation of the formal structure definition displayed on the first distinct predefined region of the display means corresponds to the portion of the representation of the document content displayed on the second distinct predefined region of the display means. Preferably, the interactive system for the display of a document displays a document which includes a formal structure definition of the document which comprises elements. In the system, the representation of the formal structure definition of the document comprises one or more graphic arrays of nested rectangular elements in three-dimensional relief, each rectangular element corresponding to an element in the formal structure definition of the document, wherein a first rectangular element overlying a second rectangular element represents the corresponding first element in the formal structure definition of the document being nested within the corresponding second element in the formal structure definition of the document. Conveniently, the system of the invention provides an icon for each rectangular element which represents the characteristics of the corresponding element in the formal structure definition of the document.
In one manner of implementing the system, the icon is an empty box when the rectangular element corresponds to an element in the formal structure definition of the document which has other elements nested within it and the other elements are displayed, in the first distinct predefined region of the display means, the icon is a box with a circle inside the box when the rectangular element corresponds to an
element in the formal structure definition of the document which has other elements nested within it and such other elements are represented in the display on the second distinct predefined region of the display means, and the icon is a single circle only when the rectangular element corresponds to an element in the formal structure definition of the document which can have no elements nested within it.
In another manner of implementing the system, a different icon set is provided, in which the icon is a graphic representation of a tree when the rectangular element corresponds to an element in the formal structure definition of the document which has other elements nested within it and the other elements are displayed, in the first distinct predefined region of the display means, the icon is a graphic representation of a branch when the rectangular element corresponds to an element in the formal structure definition of the document which has other elements nested within it and such other elements are represented in the display on the second distinct predefined region of the display means, and the icon is a single circle only when the rectangular element corresponds to an element in the formal structure definition of the document which can have no elements nested within it.
Conveniently, the icon comprises a graphic representation of one or more links in a chain when the element references external data.
Preferably, the interactive system has means responsive to the user input for displaying a portion of a representation of the formal structure definition of the document on a first distinct predefined region of the display means which further comprises means responsive to the user input for collapsing and expanding the portion of the representation of the formal structure definition of the document on a first distinct predefined region of the display means wherein a collapsed portion of the representation of the formal structure definition of the document comprises a first rectangular element corresponding to a first element in the formal structure definition of the document having one or more nested elements, the first rectangular element is represented in the display as having collapsed elements, and the portion of the representation of the formal structure definition of the document displays no rectangular elements corresponding to the one or more nested elements of the formal structure definition of the document, and wherein an expanded portion of the representation of the formal structure definition of the document comprises a first
rectangular element corresponding to a first element in the formal structure definition of the document having one or more nested elements and the portion of the representation of the formal structure definition of the document displays all rectangular elements corresponding to the one or more nested elements of the formal structure definition of the document.
Conveniently, the interactive system for the display of a document includes a feature whereby the first rectangular element is represented as having collapsed elements by an icon associated with the rectangular element and the icon is a Greek cross with an elongate horizontal member or the icon is a box containing four circles. Preferably, the interactive system has a means for constructing and saving to a permanent memory store a document template.
Conveniently, the interactive system for the display of a document further comprises means to display the attributes of a selected element.
Conveniently, the interactive system for the display of a document in which the portion of the representation of the document content displayed in the second distinct predefined region of the display means is displayed in one or more distinct boxes which correspond to the formal structure definition.
Preferably, the interactive system has a logical editor which further comprises means for editing one or more subportions of the portion of the representation of the formal structure definition of the document, wherein the means for editing restricts the editing to operations which are consistent with the formal structure definition of the document.
Conveniently, the interactive system for the display of a document includes a logical editor which further comprises means for editing subportions of the portion of the representation of the formal structure definition of the document, wherein the means for cutting, pasting, copying and moving permits a limited series of cutting, pasting, copying and moving operations, some of which may be inconsistent with the formal structure definition of the document when the portion of the representation of the formal structure definition of the document which results is consistent with the formal structure definition of the document.
Preferably, the interactive system for the display of a document includes a means for editing which comprises means for cutting, pasting, copying and moving
one or more subportions and which further comprises means for saving one or more subportions in a permanent memory store.
Conveniently, the interactive system for the display of a document includes a logical editor which further comprises means responsive to the user input to select a one of the nested rectangular elements and means to display the selected one of the nested rectangular elements in indented relation to the other rectangular elements of the nested array.
Preferably, the interactive system for the display of a document includes a logical editor which further comprises means responsive to the user input to select a one of the nested rectangular elements and means to display the selected one of the nested rectangular elements, and any nested rectangular elements overlying the selected nested rectangular element in a shaded form.
Conveniently, the interactive system for the display of a document includes a logical editor which further comprises means responsive to the user input to select a one of the nested rectangular elements and means to display the selected one of the nested rectangular elements with an angular side wall so as to indicate that the rectangular element is a selected content block.
The interactive system for the display of a document may have a display means which is a video display terminal or a cathode ray terminal or a liquid crystal display device.
The interactive system for the display of a document may have a means for accepting user input which comprises a point and click device and a keypad.
Advantages of the present invention are that the structure and content of a structured document may be clearly and distinctly displayed and easily manipulated by a user of the system. An advantage of an embodiment of the present invention is that the user of the system is constrained in making modifications to a document to those modifications permitted by the document's DTD. A further advantage is that the structure of a document will be apparent to the drafter while the document is being written.
Brief Description of the Drawings
A detailed description of the preferred embodiment is provided herein below
with reference to the following drawings, in which:
Figure 1 is a reproduction of a portion of a screen display generated by a system designed in accordance with the preferred embodiment of the invention showing a graphic array representing a particular document defined by a DTD; Figure 2 is a reproduction of a screen display generated by a system designed in accordance with the preferred embodiment of the invention showing a graphic array having an alternate set of icons;
Figure 3 is a reproduction of a screen display generated by a system designed in accordance with the preferred embodiment of the invention showing a document having a text portion and a figure in a window on the right side of the screen and a graphic array in a window on the left of the display;
Figure 4 is a reproduction of a screen display generated by a system designed in accordance with the preferred embodiment of the invention showing the computer display of Figure 3 with a selected subparagraph of the document in the graphic array;
Figure 5 is a reproduction of a screen display generated by a system designed in accordance with the preferred embodiment of the invention showing the computer display of Figure 3 with a selected paragraph in the graphic array;
Figure 6 is a reproduction of a screen display generated by a system designed in accordance with the preferred embodiment of the invention showing the computer display of Figure 3 with a selected portion of the document in the content display of the system;
Figure 7 is a block diagram showing the architecture of a system used to implement preferred embodiment of the invention.
Detailed Description of the Preferred Embodiment
Turning to the Figures, a graphic array 2 of nested rectangular elements in three dimensional relief is illustrated in Figure 1 , as it appears on a computer screen of a computer which implements the system of the present invention. Such a computer must have the capability of displaying information in two or more areas. In the preferred embodiment, the computer is an IBM PC-compatible computer having the hardware necessary to run Microsoft Windows 3.1 software.
According to the system of the invention, the graphic array 2 is displayed so as to indicate the structure of a given document, as defined by its DTD. In the embodiment illustrated in Figure 1, the highest level object in the hierarchy of graphic array 2 is the rectangular element 4 denoted "DOC" in the graphic array. Elements which are nested directly below the element 4 in the hierarchy defined in the DTD of the document shown in Figure 1 are shown as rectangular elements which appear to overlie the rectangular element 4: in this case, rectangular elements 12 and 14. Successive levels of nesting are shown similarly by rectangular elements which are displayed in relief on top of other elements. The blank square icon 6 which is located in the upper left corner of rectangular element 4 in Figure 1 indicates certain characteristics or attributes of rectangular element 4. In the embodiment of the invention illustrated in Figure 1, a blank square icon shows that the rectangular element corresponds to an element in the DTD which has sub-elements nested below it in the hierarchy and that the element is fully expanded in the graphic array: there are no directly nested sub-elements in the hierarchy of the DTD which are hidden in the graphic array of the display. Alternatively, the square icon 10 which contains four raised circles 8 within it, denotes that the element of the DTD which rectangular element 12 represents has information directly nested within it which is not displayed in the graphic array 2 visible to the user.
The display of graphic array 2 contains two categories of rectangular elements: rectangular elements which correspond directly to portions of the structured document (indicated by raised circular icons such as icon 16 and sometimes referred to as "content blocks") and elements which contain nested sub-elements (these have icons consisting of square icons such as icon 6 and 10). A particular type of content block is shown by four raised circles (without an enclosing square), as in icon 18. This content block indicates that a nested structure may be found in the corresponding portion of the document but that this portion of the document is displayed with structure defining tags in the content display of the document (a "tagged stream", or "inline", display), not the structured display of the document. A further category of content block is a terminal element which has no content and no icon symbol.
Figure 2 is a reproduction of a screen display generated by a system designed
in accordance with the preferred embodiment of the invention showing windows 19 and 20. Window 19 contains a graphic array having a set of icons which is an alternative to the set shown in Figure 1. Window 20 contains boxes of content data which correspond to the rectangular elements of the nested array shown in window 19. According to the preferred embodiment of the invention each content box in the content window (window 20 in the preferred embodiment) is shown as separate from the other content boxes.
Five types of rectangular elements are shown in Figure 2, with their corresponding icons in the alternative icon set. Rectangular element 21 has icon 22 which is an empty box. Rectangular element 24 has icon 26 in the shape of plus symbol. Rectangular elements 28 and 32, having icons 30 and 34, respectively, are of the same type as rectangular element 21 and icon 22. Rectangular element 36 is configured to point towards the window 20 and has icon 38 which is a circle. Rectangular element 40 has icon 42 in the shape of a chain link. Rectangular element 44 represents an empty (or null) element and has icon 45 in the alternate icon set to indicate the empty element. Rectangular element 46 has icon 47 which is a box containing a circle. Figure 2 shows the outline of various content boxes in window 20. Content box 48 corresponds to rectangular element 40 and contains the graphic image 50 which is produced by the external application specified by the rectangular element 40. Shaded content box 52 corresponds to rectangular element 36. The symbol 54 represents a collapsed content box and corresponds to rectangular element 24.
As can be seen in Figure 2, with the alternate icon set, the different types of elements are represented by icons in the following manner. A rectangular element with any and all subelements displayed in the nested graphic display (shown in window 19 in Figure 2) is indicated by an icon such as icons 22, 30, 34. A rectangular element with such a display is termed a "fielded" display. A rectangular element which is collapsed so that none of the subelements (if any) of the rectangular element are displayed in the nested array is indicated with the icon 26 symbol. When there is content associated with a collapsed element, the content is replaced by the symbol 54 shown in window 20 of Figure 2. The content of a collapsed element may not be edited.
A rectangular element which corresponds to content only is indicated by way of icon 38, a circle. In SGML, content is specified to be character data. Such data may be represented in the implementation of the system in different forms (for example ASCII characters or UNICODE). In order to specify data other than character data, for example graphic data, SGML requires that external data be referenced by way of external applications. In the preferred embodiment an element which references external data or applications is indicated by the use of an icon like that of icon 40. Such an external reference may be an OLE link when the system of the invention is implemented in a Microsoft Windows environment, or some other environment which supports the OLE standard.
A rectangular element which represents an empty element in the document specification is indicated by an icon like that of icon 45 shown in Figure 2.
The fifth type of rectangular element is indicated by an icon like that of icon 47 and represents an element in which any subelements are displayed in the content display (window 20 in Figure 2). This method of display is referred to as "inline" display, as opposed to fielded display. Inline display is desirable to show such elements as emphasis tags which may be more usefully shown in the content display than in the nested array display.
Figure 3 illustrates the screen display of the system of the invention as it appears on a computer which implements the system of the invention. Window 104 in Figure 3 shows the display of the structure of the document; window 102 displays the content of the document. The mouse cursor 108 is shown selecting element 106, shown in the example of Figure 3 to be a "SUBPARA". Figure 4 shows the same screen display of windows 102 and 104. Figure 4 illustrates the display of the system after the user has clicked the mouse while the mouse cursor pointed at selected element 106. The result is that the display of element 106, and the elements nested within element 106, ie. elements 110, 112, 114, 116, 118 and 120, are shown highlighted and element 106 is shown indented as opposed to raised. The sections of the text displayed in window 102 are also indented and highlighted, namely the text portions 122, 124, 126, 128, 130 and the diagram 132.
Figure 5 illustrates an embodiment of the system showing the same windows 102 and 104 where the user has used the mouse cursor to point to and select content block 140. As a result, the system displays content block 140 and the associated text box 126 as highlighted and indented. The system also alters the right edge of content block 140 to point to the window 102 to indicate that the selected element corresponds directly with content (content or text box 126) shown in window 102.
Figure 6 shows windows 102 and 104 where the user has placed cursor 144 in a position to edit the content box 126. Window 102 displays triangle 142 which indicates which part of the structured document is to be edited. Element 140 in window 104 is also highlighted to indicate that editing is occurring in, or may occur in, a portion of the document corresponding to the highlighted section of the graphic array (element 140).
According to one successful prototype, an implementation of the system of the invention was realized by a system architecture as shown in the block diagram of Figure 7. The system of the preferred embodiment is implemented using an object oriented design and written in the Microsoft Windows 3.1 environment. As shown in Figure 7, the preferred embodiment has a file manager class 60 which manages the system representation of a number of documents. Document folder instances 62 and 63 are created in file manager class 60. An instance of view manager class, such as view manager instance 70, is associated with document folder instances and contains within it views such as views 72,...74. The architecture of Figure 7 shows the input interface 84 and graphic output device interface 86. The logical editor 80 and content editor 82 interface with input interface 84 and graphic output device interface 86. The editors 80, 82 also interface with the view tree 76. The DTD 64 and the document instance data 66 interface with the SGML/S Parser 65 which in turn interfaces with the Generic logical structure 68 and the specific logical tree 78.
In operation, the system permits the user of the system to move through either the nested array display or the content display. In the preferred embodiment, movement is accomplished in the manner prescribed by the Microsoft Windows environment. In moving through the content display, the user may select only one content box at a time. When moving through the nested array, the user of the system may edit only those content boxes which correspond to the rectangular element which
have been selected by the user.
According to the system of the invention, when a rectangular element is selected by the user, such as rectangular element 26 in Figure 2, the element and the elements contained within it (if any), are highlighted and the outermost element is shown as recessed instead of raised. When a content block element is selected, as is the case with rectangular element 36, the element is highlighted and the right edge of the rectangle is reconfigured to point towards the content display (window 20 in Figure 2).
By selecting a rectangular element the user is able to delete, insert or replace that element (cut, paste, move). These operations may only be performed, however, in accordance with the DTD for the document. The user may also view and edit attributes which are associated with the rectangular element selected. In the preferred embodiment of the invention, element attributes are the attributes defined by SGML (including the name of the rectangular element which may be altered by the user). According to the preferred embodiment of the invention, there is provided a scratchpad function. This permits the editing of the nested array in a manner which creates a final nested array conforming to the DTD of the document but which, in the editing process, does not necessarily conform to the DTD. This permits rectangular elements to be deleted, added, moved and copied in the nested array without regard for the DTD. Once the user indicates (by way of a predetermined input) that the editing operations are complete, the resulting nested array is compared to the DTD. If the nested array is not in conformity with the DTD the user is provided with the option of continuing with the editing process or returning to the unedited form of the nested array (which conforms to the DTD). In operation, the system as shown in Figure 7 functions such that each document representation in the system corresponds to an instance of the document folder class. This is shown in Figure 7 by document folder instance 62 and document folder instance 63. The document folder instance 62 is shown having an instance of the view manager class 70 associated with it. Document folder instance 62 also has a DTD instance 64 which in the case of the example of Figure 7 contains SGML code describing the document in question. The SGML code of DTD instance 64 is converted according to the system of the invention to a generic logical structure 68
which contains a description of the structure which the document may take as defined by the DTD instance 64. The conversion of the DTD instance 62 SGML code to the generic logical structure 68 is carried out using the SGML/S Parser 65 developed by the SGML Users Group. Such a Parser may be modified by one skilled in the art to operate in a given programming environment, where desirable. Part of the product of the SGML/S Parser 65 forms the generic logical structure 68. Change requests received by the generic logical structure 68 are compared with the end product of the SGML/S Parser 65 to determine whether the change requests meet the design criteria of the DTD for the document. Document instance data 66 is parsed by the SGML/S Parser 65 to produce the specific logical tree 78. The specific logical tree 78 has document instance data at the terminal nodes.
The view manager instance 70 contains within it a number of view instances 72,...74 shown in Figure 7. Each view instance has associated with it a view tree instance such as view tree instance 76 associated with view instance 72 in Figure 7. Each view tree instance has associated with it a logical editor object and a content editor object shown in Figure 7 as logical editor 80 and content editor 82, both associated with view tree instance 76.
According to the system of the invention, the graphic array which displays the structure of the document and which appears in the left window on the screen of the computer in the system of the preferred embodiment is one of the views which is managed by the view manager. In most cases, a second view managed by the view manager is a straightforward textual representation of the document which appears in the right window in the computer screen.
A user of the system inputs commands and data by way of input device 84. The input commands or data are interpreted by the logical editor 80 and the content editor 82 and a request that the document structure be modified or that the content of the document be modified will be passed by the logical editor 80 or the content editor 82, respectively, to the view tree 76. View tree 76 will, in turn, pass the request to the specific logical tree instance 78 which has been created in accordance with the rules set out in the generic logical structure 68.
Where a request is made by the logical editor 80 to modify the structure of the document, the specific logical tree instance 78 passes the request to the generic
logical structure instance 68. If the request conforms to the permitted structure of the document, as defined by the DTD, the generic logical structure instance 68 passes the information that permission is granted to make the modification to the specific logical tree instance 78. The representation of the document contained in the specific logical tree instance 78 is then modified. As a result, data is passed by the specific logical tree instance 78 to the view tree instance 76 which then updates the representation of the logical structure in the display of the document as shown on graphic output device interface 86.
Where a change is made to the contents of the document, as distinguished from the logical structure of the document, a similar process is initiated by the content editor instance 82. In this case, however, the view tree instance 76 passes the change in contents to specific logical tree instance 78. A corresponding change to the display is effected by specific logical tree instance 78 which passes the updated information to the view tree instance 76 which in turn passes the change data to the content editor instance 82 which effects the change in the graphic output device interface 86.
As will be apparent to one skilled in the art, although the description provided above refers to documents, the system of the invention will be suitable for any data which has a structure which can be adequately described using a DTD written in a language such as SGML. The system may be used to display both a full document or a portion of a document which is a sub-tree of the structured document. In this way, the system can be used for display and editing of documents or portions of documents retrieved from a database, for example.
Another aspect of the preferred embodiment of the invention relates to attributes which may be associated with each rectangular element of the system. SGML (ISO #8879) allows for attributes to be defined for elements which are represented by the rectangular elements in the system. The system can be used to provide a user interface for access to the attributes or to display some aspect(s) of the attributes visually in the display system. In some cases, the attributes defined in the DTD for a document are not sufficient for the user. This is particularly the case where page layout information is desirable. In such a case, the system of the preferred embodiment will permit the
user to define and use other attributes which may be associated with various elements in the system. The method set out above may also be used to access such associated information which are not defined by the DTD.
A further aspect of the preferred embodiment relates to the ability of a user of the system to use the system to construct document templates. For a given DTD it is sometimes desirable to create template documents which have no content but a defined structure. The user of the system of the invention may use the logical editor to create the nested array of rectangular element corresponding to the template which the user requires. The operations of the logical editor (cutting, pasting, copying, and so forth) may be used to generate the required template. Once the template is created, it can be save and recalled as a starting point from which the user can enter data in the content editor. Alternatively, the template may contain default content which the user may modify or add to.
The system of the preferred embodiment may also use bookmarks to enable the user to find his or her way through the document. To use a bookmark the user selects a particular point in the structured document being used. The system of the invention then permits the user to return directly to the bookmark without having to move sequentially through the structured document.
With respect to the icons used in the preferred embodiment of the system, as may be seen from the alternative icon sets shown in Figures 1 and 2, it is possible to use different sets of icons to represent the same concepts represented by the system of the invention. For example, an icon set in which on icon is the outline of a tree such as an oak tree, and another icon is an outline of branches of a tree, may be used to indicate whether the display of the element and subelements is in fielded (entire tree) or inline (branch) format.
Other embodiments and variations of the invention are possible. For example, although it is preferred that the icon 6 in Figure 1 be a indented square, other symbols may be used to convey the same or similar information regarding the rectangular element 4. Variations of rectangular elements which are not strictly rectangular may be used in the nested array, for example oval elements, as long as such elements are capable of being nested in a way which is analogous to that of the nested array of rectangular elements described above.. All such modifications and
embodiments are believed to be within the sphere and scope of the present invention as described herein.