Using references, notations, cross-references, and tables of contents
WordPerfect lets you create and insert references.
In this section, you'll learn about
inserting text references
working with file references
using notations to identify external data
creating cross-references
creating a table of contents
creating lists of document items
marking sections in a document
Inserting text references
You can reference external information by using text references. Text references include processing instructions and specific character data.
To insert text references
1 Click InsertText references.
2 In the Reference type area, enable one of the following options:
Text (Generic, CDATA)-displays existing text references
Processing instruction (PI)-displays existing text references and processing instructions
Specific character data (SDATA)-displays existing text references and specific character data
3 Choose a text reference from the Text reference list.
4 Click Insert.
Notes
Character mappings are not displayed in the Text reference list.
If entities of the selected reference type are not defined in the document, or WordPerfect template, the Text reference list remains empty.
Working with file references
You can reference external information by using file references. File references, or external entities, link information in external files to an XML document. For example, file references can include graphics, non-XML data and user-declared references such as charts, sound, or video.
Some document type definitions (DTD) define external entity references so that any document using that DTD can access the same resources. You can define file references in the DTD. When you define a file reference, you can also define a public identifier, system identifier, path and filename.
You can also edit or delete file references when changes are necessary or linked information is no longer needed.
To create file references
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Insert File references.
3 In the Reference type area, enable the User declared option.
4 Click New.
5 Type a reference name in the Name box.
6 Choose a data type from the Data type list.
If you specified NDATA, SDATA, or CDATA as the data type, choose the notation name from the Notation list and click Attributes.
You can also
Include a public identifier Type the public identifier in the Public ID box.
Include a path and filename Click the folder icon next to the File path box, and locate the external entity file.
Notes
If there is not a corresponding external entity declaration in the document, or WordPerfect template, file references are not validated.
XML uses public identifiers to distinguish an entity for a receiving system. A public identifier is a label that identifies an entity to a receiving system without including the path and filename of the entity on that system.
To insert file references
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Insert File references.
3 In the Reference type area, enable one of the following options:
All-displays all file references
User declared-displays user-defined file references
DTD declared-displays DTD-defined file references
4 Choose a file reference from the File reference list.
5 Click Insert.
To edit file references
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Insert File references.
3 In the Reference type area, enable the User declared option.
4 Choose a file reference from the File reference list.
5 Click Edit.
You can also
Edit a public identifier Select the public identifier in the Public ID box.
Edit a path and filename Click the folder icon next to the File path box, and locate an external entity file.
Notes
If there is not a corresponding external entity declaration in the document, document type, or WordPerfect template, file references are not validated.
XML uses public identifiers to distinguish an entity for a receiving system. A public identifier is a label that identifies an entity to a receiving system without including the path and filename of the entity on that system
To delete file references
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Insert File references.
3 In the Reference type area, enable the User declared option.
4 Choose a file reference from the File reference box.
5 Click Delete.
Using notations to identify external data
Notations are defined in the DTD. They are used to identify the type of data contained in an external entity. You can specify data attributes for a specific notation when you create or edit a file reference, or external entity. You can also edit a notation attribute value.
To specify an attribute value for a notation
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Insert File references.
3 In the Reference type area, enable the User declared option.
4 Click New.
5 Type a name for the file reference in the Name box.
6 Choose a data type from the Data type list.
7 Choose a notation from the Notation list.
8 Click Attributes.
The Attributes button is available only when you have a valid element.
9 Choose an attribute in the Errors/present/attributes box.
10 Double-click an attribute in the Attributes list.
A check mark indicates that the attribute is selected.
To edit a notation attribute
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Insert File references.
3 In the Reference type area, enable the User declared option.
4 Choose a file reference from the File reference list, and click Edit.
5 Click Attributes.
The attributes button is available only when you have a valid element.
6 Choose an attribute in the Errors/present/attributes box.
7 Click Edit value.
8 Type a value for the attribute.
Creating cross-references
Creating cross-references in XML documents is very similar to creating cross-references in WordPerfect documents except that in XML documents you mark elements, not text, and you use attributes, not identifying names, to link a reference to a target.
In order to create a cross-reference, you must first mark the target and then mark the reference. The target is the item or text to which you are referring; for example, a page number, figure, or note. The reference is the document text that you use to refer to the page number, figure, or note; for example, "See page 23."
Cross-references in XML documents are linked through the attributes of the target element and the reference element. Therefore, only elements with attributes can be cross-referenced; for example, a cross-reference element, such as Xref, must be defined in the DTD. You can also generate cross-references.
For more information about creating cross-references, see Creating cross-references in the WordPerfect Help.
To mark a target for cross-references
1 In the WordPerfect XML Project Designer, open or create a layout.
2 Choose an element from the Element rule list.
3 Click Edit Edit Rule.
4 Click Insert Cross-reference.
5 Choose an attribute from the Attribute target list.
6 In the Reference area, enable one of the following options:
Page creates a cross reference to a page.
Secondary page creates a cross-reference to a secondary page.
Chapter creates a cross-reference to a chapter.
Volume creates a cross-reference to a volume.
Paragraph/outline creates a cross-reference to a paragraph or outline.
Footnote creates a cross-reference to a footnote.
Endnote creates a cross-reference to a endnote.
Caption number creates a cross-reference to a caption.
Counter creates a cross-reference to a counter.
Text/list creates a cross-reference to text or to a list.
7 Click Mark target.
Tip
You can also choose an element by clicking the Elements button on the property bar.
To mark a reference for cross-references
1 In the WordPerfect XML Project Designer, open or create a layout.
2 Choose an element from the Element rule list.
3 Click Edit Edit rule.
4 Click in the Rule entry for start tag box.
5 Click Insert Cross-reference.
6 Choose an attribute from the Attribute target box.
7 In the Reference area, enable one of the following options:
Page creates a cross reference to a page.
Secondary page creates a cross-reference to a secondary page.
Chapter creates a cross-reference to a chapter.
Volume creates a cross-reference to a volume.
Paragraph/outline creates a cross-reference to a paragraph or outline.
Footnote creates a cross-reference to a footnote.
Endnote creates a cross-reference to a endnote.
Caption number creates a cross-reference to a caption.
Counter creates a cross-reference to a counter.
Text/list creates a cross-reference to text or to a list.
8 Click Mark reference.
9 Choose a cross-reference element.
Tip
You can also choose an element by clicking the Elements button on the property bar.
To mark a cross-reference
1 In the WordPerfect XML Editor, open or create an XML document.
2 Position your cursor after the start tag of an element.
3 Click Insert Edit attributes.
4 Click Edit value.
5 Type a unique cross-reference ID in the Value box.
For example, heading 1.
6 Click Validate.
7 Click Next tag.
To generate a cross-reference
1 In the WordPerfect XML Editor, open or create an XML document.
2 Click Tools Reference Generate.
Notes
To set up a cross-reference, you must have a cross-reference element (such as XRef) defined in the DTD.
A question mark appears where you have marked references until you use the Generate command. Once you generate, the reference number is inserted or updated.
Creating a table of contents
Creating and defining a table of contents for XML documents is very similar to creating a table of contents for WordPerfect documents. You must mark entries, specify the number of levels, and the numbering format for the table of contents. Entries include section, heading, subheading, and chapter entries.
To make information easier to find in an XML document, you can generate a table of contents with up to five levels of detail.
If the table of contents is not surrounded by WordPerfect Data codes, the XML document and its table of contents are exported as text.
For more information about creating a table of contents, see Generating and updating tables of contents in the WordPerfect Help.
To define a table of contents
1 In the XML Project Designer, open or create a layout file.
2 Place the cursor where you want to display the table of contents.
3 Choose an element from the Element rule list.
4 Click edit Edit rule.
5 Click Insert Table of contents Define.
6 Type a value in the Number of levels (1-5) box.
Level 1 through level 5 each correspond to a level of indentation.
7 In the Numbering format area, choose a value from the Position box.
You can also
Choose the style for each level in the table of contents Click Styles.
Choose the format for page numbers in the table of contents Click Page numbering.
Tip
You can also define a table of contents by choosing an element rule in the Start tag or End tag dialog box, and clicking Insert Table of contents Define.
To mark elements for the table of contents
1 In the XML Project Designer, open or create a layout file.
2 Choose an element from the Element rule list.
3 Click Edit Edit rule.
4 Choose the last item in the Rule entry for start tag list.
5 Click Insert Table of contents Mark 1 Begin.
6 Click in the Rule entry for end tag (before revert) list.
7 Click Insert Table of contents Mark 1 End.
To create a table of contents
1 In the WordPerfect XML Editor, position your cursor where you want the table of contents to appear.
2 Click Tools Reference Table of contents.
3 Click Generate on the property bar.
4 Click any of the following check boxes:
Save subdocuments-lets you save changes to subdocuments
Build hyperlinks-creates hyperlinks from the table of contents to related sections in the document
Notes
If you want to create a table of contents for the final export of an XML document, make sure you have table of contents elements defined in the DTD.
When the XML Project Designer discovers a table of contents begin code without a corresponding end code, it will automatically insert a table of contents end code. The XML Project Designer will delete any table of contents end code that does not have a corresponding table of contents begin code.
Creating lists of document items
To create a list you must first create a definition for the list and mark elements using the WordPerfect XML Project Designer. You then generate the list just as you would generate a list for any WordPerfect document. If the list in the XML document is not surrounded by WordPerfect Data codes, it is exported as text.
You can create lists of items in a document such as figures, illustrations, and tables. Creating a list of items in XML documents is the same as creating lists in WordPerfect documents. However, you must mark the elements you want to include in the list before you generate it.
For more information about creating lists, see Using bulleted lists, numbered lists, and outlines in the WordPerfect Help.
To mark elements for a list
1 In the WordPerfect XML Project Designer, open or create a layout.
2 Choose an element from the Element rule list.
3 Position the cursor in the Start tag entries list.
4 Click Insert Reference list.
5 Choose a list definition in the List name list.
6 Click Mark.
To create and insert a list definition
1 In the WordPerfect XML Project Designer, open or create a layout.
2 Choose the element in the Element rule list where you want the reference list inserted.
3 Position the cursor in the Start tag entries list
4 Click Insert Reference list.
5 Click Create.
6 Type a name in the List box.
7 In the Numbering format area, choose a value from the Position list.
You can also
Choose the page numbering format Click Page numbering.
Choose the list style Click Change.
Include captions Choose a box type from the List box captions automatically list.
Marking sections in a document
You can mark a section of an XML document with special tags that affect the way that section is read. You can only insert CDATA marked sections into XML documents.
A processing instruction contains data that is not considered part of a document or DTD. This data may take the form of formatting commands, a command line for an external process, or any number of other formats.
XML processors do not act directly on such data but may pass it on to its intended target.
You can mark sections of an XML document so that when you publish the document in the WordPerfect format, the marked sections are included as part of the WordPerfect document. The marked information is not considered part of the XML document and is not validated or exported.
To mark a CDATA section in XML documents
1 In the WordPerfect XML Editor, open or create an XML document.
2 Select the information that you want to mark.
3 Click Insert CDATA section.
To create a processing instruction
1 In the WordPerfect XML Editor, open or create an XML document.
2 Position the cursor where you want to insert the processing instruction.
3 Click Insert Processing instruction.
4 Click New.
You can also
Insert a processing instruction Click Insert Processing instruction Insert.
Edit a processing instruction Click Insert Processing instruction Edit.
Delete a processing instruction Click Insert Processing instruction Delete.
Note
In XML, the first word in each processing instruction is the name of the intended "target," which must match the name of a notation declared in the DTD.
In SGML, processing instructions without target names are supported for the notation name.
To tag information for inclusion in WordPerfect documents
1 In WordPerfect, open or create an XML document.
2 Select the text and tags that you want to include.
3 Click XML WP DATA.
Note
You can also insert WP DATA codes, then type the text you want included in the WordPerfect document.