Reference: Publishing to the Web

This section contains detailed information about publishing documents to XML.


Publishing documents to XML

WordPerfect Office btnbacktotopproc Reference: Publishing to the Web

This section contains information about publishing WordPerfect documents using the Docbook 4.2 XML DTD. The section also lists the categories of items contained in a WordPerfect document and which Docbook DTD elements they are mapped to when publishing to XML.

The categories are as follows:

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


General document notes

When you publish a WordPerfect document to XML, each XML document begins with the standard <?xml?> processing instruction. Each XML document contains the following attributes: UTF encoding, UTF-8, and the XML specification version 1.0. In addition, each document contains a <!DOCTYPE> tag to specify that the Docbook 4.2 XML DTD is used by the xml document.

Each document will begin with the root element <book>. A book will consist of at least one chapter, which is contained in the <chapter> element.

If the WordPerfect document contains document properties, the XML document includes a <bookinfo> element. The elements contained within <bookinfo> contain the document properties. For information about document properties see “Using document summaries.”

WordPerfect document summary content
Docbook element/attribute
Details
Abstract
<abstract>
<abstract> is a child of <bookinfo> and can contain 1 or many <para> elements (one <para> element per hard return).
Author
<author>
<author> is a child of <bookinfo> and contains the docum
ent author’s name.
Creation date
<date>
<date> is a child of bookinfo> and contains the document’s creation date.
Keywords
<keywordset>
<keywordset> is a child of <bookinfo> and the parent of <keyword>. <keywordset> can contain 1 or many <keyword> elements.
 
<keyword>
Each <keyword> element contains a keyword and space delimiter.


Paragraph and text

WordPerfect document content
Docbook element/attribute
Details
Paragraphs
<para>
Text is published as it appears in a WordPerfect document, except for extended characters (symbols). Characters or symbols are published using the entity value, which is similar to what happens in HTML.


Text attributes

The only text attributes that are published to XML are bold, italic, underline, superscript, and subscript. All other attributes are ignored.

WordPerfect document content
Docbook element/attribute
Bold
<emphasis role=“bold”>
Italic
<emphasis role=“italic”>
Underline
<emphasis role=“underline”>
Superscript
<superscript>
Subscript
<subscript>


Styles

The only styles that are published to XML are heading styles (heading1 to heading9) and the address style.

All other styles are ignored when publishing a document to XML.

WordPerfect document content
Docbook element/attribute
Details
Heading1 to Heading9
<section role=“headingx”>
Where “x” is 1 to 9
Address style
<address>
 

WordPerfect Office note Reference: Publishing to the Web

 
The <section> element is not valid in tables. Therefore, these features will not export in tables or anywhere else where <section> is invalid.


Tables

WordPerfect document content
Docbook element/attribute
Details
Tables
<table>
Each table contains one <tgroup> (table group) tag which is used to group all table elements.
Table names, for example TABLE A
<title>
The <title> element is a child of the <table> element .
Columns
<colspec> 
Each column contains three attributes: colname, colwidth, and align.
 
colname attribute of <colspec>
colname identifies a generated column name which may be used for cells that span horizontally.
 
colwidth attribute of <colspec>
colwidth specifies column width in inches.
 
align attribute of <colspec>
align specifies column text alignment (justification).
Table headers
<thead>
<thead> is a child of the <tgroup> element. If applicable, it specifies the header rows in a table. Each <thead> element contains one or more <row> elements, one for each header row in the table. For information about table header rows, see “Creating table header rows and adjusting table rows.”
Table rows
<row>
<row> can be a child of the <thead> or <tbody> element.
Table body
<tbody>
<tbody> is a child of the <tgroup> element. It contains all non-header rows. Each <tbody> element contains one or more <row> elements, one for each row in the table.
Table cells
<entry>
The <entry> element can contain the following attributes: align, valign, morerows, namest, and nameend.
 
align attribute of <entry>
Specifies the text justification in a cell.
 
valign attribute of <entry>
Specifies the vertical alignment in a cell.
 
morerows attribute of <entry>
Specifies that the row spans vertically.
 
namest of <entry>
Specifies the column name of the first column for column spanning.
 
nameend of <entry>
Specifies the column name of the last column for column spanning.


Hyperlinks and bookmarks

WordPerfect document content
Docbook element/attribute
Details
Hyperlinks (internal)
<link>
Specifies that the hyperlink references a bookmark in the same document.
Bookmark name
linkend attribute of <link>
Specifies the name of a bookmark.
Hyperlinks (external)
<ulink>
Specifies that the hyperlink references an external document or any other URL. The <ulink> tag contains a url attribute.
 
url attribute of <ulink>
Specifies a URL.
Bookmarks (no text selection)
<anchor>
Specifies a single bookmark. The <anchor> tag has an id attribute.
 
id attribute of <anchor>
Specifies the bookmark name.
Bookmarks (with text selection)
<phrase>
Specifies a paired bookmark. The <phrase> tag has an id attribute.
 
id attribute of <phrase>
Specifies the bookmark name.


Comments

WordPerfect document content
Docbook element/attribute
Details
Comments
<note>
The contents of comments are published to XML following the same rules as general WordPerfect document contents.


Footnotes and endnotes

The Docbook 4.2 XML DTD does not contain an element that is specific to endnotes. Therefore, the endnotes are stored in the <footnote> element.

WordPerfect document content
Docbook element/attribute
Details
Footnotes
<footnote>
 
Endnotes
<footnote>
For endnotes, the <footnote> tag contains a role attribute.
 
role attribute of <footnote>
Specifies that the footnote is an endnote.


Chapters

WordPerfect uses chapter numbers to create chapters. For each chapter number that appears in a document, a new chapter is created in an XML document using the <chapter> tag.

WordPerfect document content
Docbook element/attribute
Details
Chapters
<chapter>
The <chapter> tag is a child of the root element <book>. Each <chapter> tag has a label attribute.
 
label attribute of <chapter>
Specifies the chapter number.


Graphics

WordPerfect document content
Docbook element/attribute
Details
Graphics box (anchored to a page or a paragraph)
<graphic>
The <graphic> element can contain the following attributes: align, valign, width, depth, and format.
Graphics box (anchored to a character)
<inlinegraphic>
The <inlinegraphic> element can contain the following attributes: align, valign, width, depth, and format.
 
align attribute of <graphic> or <inlinegraphic>
Specifies the horizontal alignment of a graphic.
 
valign attribute of <graphic> or <inlinegraphic>
Specifies the vertical alignment of a graphic.
 
format attribute of <graphic> or <inlinegraphic>
Specifies that a graphic is a GIF or JPG. The value depends on the option chosen in the Publish to XML dialog box.
 
width attribute of <graphic> or <inlinegraphic>
An optional attribute which specifies the width of a graphic in inches.
 
depth attribute of <graphic> or <inlinegraphic>
An optional attribute which specifies the height of a graphic in inches.

WordPerfect Office note Reference: Publishing to the Web

 
A graphic can include an OLE object, but the OLE links will not work in the XML document. You can publish only the graphic portion of the OLE object.


Text boxes and legacy equations (Equation editor 5.1 to 7.0)

WordPerfect document content
Docbook element/attribute
Details
Text boxes
<section>
The <section> element has a role attribute of “textbox.”
 
role “textbox” attribute of <section>
Specifies that the <section> element plays the role of “textbox.”
Equations
<section>
The <section> element has a role attribute of “legacy_equation” and a label attribute.
 
role “legacy_equation” attribute of <section>
Specifies that the <section> element plays the role of “legacy_equation.”
 
label attribute of section
Defines the box anchoring type: paragraph, page, or inline.

WordPerfect Office note Reference: Publishing to the Web

 
The <section> element is not valid in tables. Therefore, these features will not export in tables or anywhere else where <section> is invalid.


Outlines

WordPerfect document content
Docbook element/attribute
Details
Bulleted lists
<itemizedlist>
 
 
mark attribute of <itemizedlist>
Specifies the bullet character.
Numbered lists
<orderedlist>
 
List items (bulleted or numbered)
<listitem>
 
 
numeration attribute of <orderedlist>
Specifies the numbering type of the outline. For example, arabic or roman.
 
continuation attribute of <orderedlist>
Specifies if the numbering continues from the previous outline or restarts.
 
inheritnum attribute of <orderedlist>
Specifies if the numbering of the interior levels s
hould contain the number of previous levels (for example, 4.2.3) or their own number (for example, 3).


Table of contents

WordPerfect document content
Docbook element/attribute
Details
Table of contents
<toc>
 
 
<tocpart>
 
 
<tocchap>
 
Table of contents entries
<tocentry>
Includes a series of levels <toclevel1> to <toclevel5> which represent the levels found in the table of contents entries.


Table of authorities

Docbook does not have an equivalent element for tables of authorities.

WordPerfect document content
Docbook element/attribute
Details
Table of authorities
<section>
The <section> element has a role attribute of “TableofAuthority.”
 
role “TableofAuthority” attribute of <section>
Specifies that the <section> element plays the role of TableofAuthority.
Each entry in the table of authorities
<para>
The <para> element is a child of the <section> element. It contains a role attribute of “TOAEntry.”
 
role “TOAEntry” attribute of <para>
Specifies each entry in the table of authorities.


Lists

WordPerfect document content
Docbook element/attribute
Lists
<lot>
Each entry in the list
<lotentry>


Indexes

WordPerfect document content
Docbook element/attribute
Indexes
<index>
First level index entries
<primaryie>
Second level index entries
<secondaryie>
Combinations of first level and second level entries
<lotentry>


Cross-references

WordPerfect document content
Docbook element/attribute
Details
Cross-references
<xref>
Can contain a linkend attribute.
 
linkend attribute of <xref>
Specifies the bookmark name of the anchor point that it references.

Reference: Publishing to the Web