From: Steve Ball Date: Mon, 31 Oct 2005 05:19:09 +0000 (+0000) Subject: added callouts X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=098d8999335c69be3e7d05790851213676e2c019;p=docbook-dsssl added callouts --- diff --git a/xsl/wordml/docbook-pages.xsl b/xsl/wordml/docbook-pages.xsl index d035863d4..8dc5ad5f1 100644 --- a/xsl/wordml/docbook-pages.xsl +++ b/xsl/wordml/docbook-pages.xsl @@ -12,7 +12,7 @@ xmlns:doc='http://www.oasis-open.org/docbook/xml/4.0' exclude-result-prefixes='doc xi w wx aml'> - + @@ -430,7 +441,7 @@ - + @@ -450,7 +461,7 @@ - + @@ -530,7 +541,7 @@ - + @@ -582,36 +593,64 @@ - + - + + - - - - - - - - - - - - + - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + -imagedata + + + + + + + + + + + + @@ -925,6 +964,10 @@ + + + + @@ -936,7 +979,14 @@ - - + + + + + + + + @@ -946,6 +996,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -966,7 +1073,7 @@ - + @@ -1055,9 +1162,9 @@ - However, they may need to be added (perhaps as hidden text) - for round-tripping. --> - diff --git a/xsl/wordml/docbook.xsl b/xsl/wordml/docbook.xsl index eeb92695b..90bd73efb 100755 --- a/xsl/wordml/docbook.xsl +++ b/xsl/wordml/docbook.xsl @@ -12,7 +12,7 @@ xmlns:doc='http://www.oasis-open.org/docbook/xml/4.0' exclude-result-prefixes='doc'> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text Object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -880,9 +1034,9 @@ - However, they may need to be added (perhaps as hidden text) - for round-tripping. --> - diff --git a/xsl/wordml/pages-normalise.xsl b/xsl/wordml/pages-normalise.xsl index fcb6e6091..06725c204 100644 --- a/xsl/wordml/pages-normalise.xsl +++ b/xsl/wordml/pages-normalise.xsl @@ -36,7 +36,7 @@ ******************************************************************** --> - + - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + @@ -128,11 +209,10 @@ - - - + + diff --git a/xsl/wordml/specifications.xml b/xsl/wordml/specifications.xml index e02f64dbd..a5614cf63 100755 --- a/xsl/wordml/specifications.xml +++ b/xsl/wordml/specifications.xml @@ -1,619 +1,673 @@ - - +
-DocBook-WordML Conversion Specifications -BobStaytonSagehill -Enterprises -SteveBallZveno -Version 1.2, dated 13 Octobber 2005 - - -This document specifies how DocBook elements can be mapped to Microsoft Word styles. The specifications will be used to write conversions between DocBook XML and Microsoft's WordProcessingML (WordML). - -
-Introduction -Microsoft Word 2003 introduced WordProcessingML (WordML), an XML vocabulary for Word documents. By converting Word to XML, it becomes possible to convert a Word document to DocBook and vice versa using XSL transformations. Such conversions would then enable the following. - - -DocBook content creators could write in Word, a familiar wordprocessing application, rather than learning a new XML editing application. - - -DocBook XML documents could be styled for output using the typesetting features of Word. - - -This specification describes how DocBook elements could map to a set of Word paragraph and character styles. It defines a specific set of style names for which a Word style template can be created. The style names would also be used in XSLT template match patterns for conversion. Although originally targetted to MS Word, the system has subsequently been extended to use other word processors, notably Apple's Pages. -
-
-Project goals -The goal of this project is to enable Microsoft Word to be used with DocBook files. The specific goals include: - - -Enable authoring of basic DocBook documents in Word. - - -Enable importing of basic DocBook XML documents into Word. - - -To meet these goals, the project will produce a toolkit that can be immediately put to use. The kit will include: - - -A Word template with formatting styles attached to the style names. - - -A wordml-to-docbook XSLT stylesheet, which can convert a Word document that is authored with the Word template into a DocBook XML file. - - -A docbook-to-wordml XSLT stylesheet, which can convert a DocBook document into a WordML document that can be opened in Word with the attached Word template. - - -
-Why basic DocBook? -It isn't clear that this project will ever be able to support all DocBook elements and structure. The project will initially focus on a basic set of commonly used DocBook elements to demonstrate the feasibility and usefulness of using Word with DocBook. -One problem facing this conversion project is the sheer number of DocBook elements, over 400 in DocBook 4.3. To support DocBook structural models, several of the elements will require more than one Word style. This could lead to a very long and unwieldy list of styles in the Word interface. That would make authoring less efficient and discourage users. -So this project assumes that authors who need the full set of DocBook elements will use an XML authoring tool that better supports them. This project will enable authors to write basic DocBook documents using Word. Because Word is so widespread, this project will help a lot of new DocBook users get started with familiar tools. They can then graduate to more advanced tools as their needs develop. -
-
-
-Project Non-Goals -The following goals are not in the scope of this project: - - -Support of versions of Word that do not feature reading/writing WordML (XML). That is, all versions prior to Word 11 (Office 2003). - - -Supporting user-defined style names. However, this system should not prevent, or make difficult, adding such support via a customisation layer. - - -Support of arbitrarily defined styles. This system may expect certain styles to be defined in a particular fashion (in particular, those defining the title of components and divisions). - - -
-
-Mapping elements to styles -Although WordML and DocBook are both XML, there several challenges when trying to convert between them. -The basic problem in mapping Word styles to DocBook elements is that Word documents support far less structure than DocBook. DocBook permits nesting of elements within other elements, providing multiple levels of context for each element. -Word's only structural feature is the outlining mode. In Word outlining, certain paragraph styles are assigned outline levels. When a user applies those styles, they effectively create logical structure in the Word document. Unfortunately, Word itself attempts to automatically determine which paragraphs are headings, and so this method is unreliable. -Instead of relying on Word's built-in outlining mode, this system uses only the names of styles to determine document structure. Certain hueristics are applied to build the DocBook element structure from the (relatively flat) word processing structure. Titles and other features are used to mark the beginning of a structure, and all paragraphs following that are included in that structure until the beginning of the next structure is found. Problems may arise when a structure should end, but there is no Word feature that marks the endpoint. -Nesting of block elements is another commonly used feature of DocBook. It is not possible to use Word's outline mode for blocks if it is being used for components and sections. So in this specification, nesting of block elements is indicated by adding a number suffix to a style. So a Word paragraph with style orderedlist2 is considered to be contained within a preceding paragraph with style listitem. In Word, paragraph indent levels will be used to visually indicate nesting of blocks. -Nesting of inline DocBook elements is particularly difficult to support because Word does not nest character styles. That means a nested inline would require a separate Word style to indicate the parent-child relationship. Given the large number of combinations possible, a prohibitively large number of character styles would have to be created. In this project, nesting of character styles will not be supported in the first release. Nested inlines being imported from DocBook will be converted to a sequence of single-name Word character styles. -In many cases, DocBook structure can be derived from the flat Word sequence of paragraphs based on sibling relationships. For example, when a paragraph styled as para is followed by a paragraph styled as itemizedlist, the conversion to DocBook will output a para element and then start an itemizedlist element, with the second paragraph as its first listitem. All itemizedlist paragraphs that follow without interruption are put in the same itemizedlist element. -Some combinations of elements cannot be supported (at least not with the techniques as described in this document). An example is informalexample and its permitted content; there is no title to mark the beginning of the element and no marker for the end of the element, also there are too many parent-child combinations to reasonably define style names. -Here are the design principles used in this project for selecting Word style names: - - -Where Word, by default, has a style or feature that corresponds directly to a DocBook element then that style or feature will be used (and documented in this document). For example, the Normal paragraph style maps to a DocBook para element, and a Word table (w:tbl) maps to a DocBook tableIn some cases Word may posess a feature, but it doesn't function in an acceptable manner. For example, lists. In these cases the feature is to be avoided, and a workaround provided.. - - -Word paragraph and character style names will match DocBook element names as much as possible. This will enable authors to learn DocBook element names, and help debug problems with conversion. - - -A style may indicate a parent-child relationship, but the paragraph for such an element may only occur after a paragraph that denotes the beginning of the parent structure. In this case the element name is used as the style name. For example, a personblurb paragraph may only occur after an author, editor or othercontrib paragraph. If a paragraph occurs without the appropriate preceding paragraph, then an error is signalled. - - -Some styles may also indicate a parent-child relationship, but either the parent structure is ambiguous or the paragraph starts the parent structure. For example, chapter-title indicates that the paragraph is a title whose DocBook parent is a chapter. - - -Some style names are simplified to make them easier to use in Word. For example, a paragraph in an orderedlist requires three elements in DocBook: orderedlist, listitem, and para. The paragraph style name in Word is shortened from orderedlist-listitem-para to just orderedlist. In the case of lists (see below), the list level is appended so this example becomes orderedlist1 - - -Style names with a number suffix indicate a nesting level, as described above. - - -Style names with continue indicate that the paragraph is part of the preceding element. For example, a para paragraph is used for a single paragraph para element. This would cause any preceding list to be closed. If a list item in the preceding list is to contain more than one paragraph, then the subsequent paragraphs in Word would get a para-continue style. - - -Character styles map to elements that are children of the element for the paragraph, hence there is no need to encode parent-child relationships. For example, a surname character style in an author paragraph becomes a surname child element of the author element. - - -Empty paragraph and character styles are ignored. - - -The first paragraph style in the Word document is used to define the root element of the DocBook document. For example, if a Word document starts with book-title, then the DocBook document will have book as its root element. All the rest of the document content will be contained in that root element. - - -Sequential structures are colesced into a single parent element. For example, a sequence of itemizedlist paragraphs becomes a single itemizedlist element with several listitem children. - -DocBook to WordML styles - - - - - -DocBook element -WordML styles -Comments - - - - -Components and sections - - -book/bookinfo/title -book-title - - - -book/bookinfo/subtitle -book-subtitle - - - -book/bookinfo/titleabbrev -book-titleabbrev - - - -chapter/chapterinfo/title -chapter-title -Assigned Word outline level 1. - - -chapter/chapterinfo/subtitle -chapter-subtitle - - - -chapter/chapterinfo/titleabbrev -chapter-titleabbrev - - - -appendix/appendixinfo/title -appendix-title -Assigned Word outline level 1. - - -preface/prefaceinfo/title -preface-title -Assigned Word outline level 1. - - -article/articleinfo/title -article-title -Assigned Word outline level 1. - - -article/articleinfo/subtitle -article-subtitle - - - -article/articleinfo/titleabbrev -article-titleabbrev - - - -bibliography/bibliographyinfo/title -bibliography-title -Assigned Word outline level 1. - - -glossary/glossaryinfo/title -glossary-title -Assigned Word outline level 1. - - -index/indexinfo/title -index-title -Assigned Word outline level 1. - - -sect1/sect1info/title -sect1-title -Assigned Word outline level 2. - - -sect1/sect1info/subtitle -sect1-subtitle - - - -sect1/sect1info/titleabbrev -sect1-titleabbrev - - - -sect2/sect2info/title -sect2-title -Assigned Word outline level 3. - - -sect2/sect2info/subtitle -sect2-subtitle - - - -sect2/sect2info/titleabbrev -sect2-titleabbrev - - - -sect3/sect3info/title -sect3-title -Assigned Word outline level 4. - - -sect3/sect3info/subtitle -sect3-subtitle - - - -sect3/sect3info/titleabbrev -sect3-titleabbrev - - - -sect4/sect4info/title -sect4-title -Assigned Word outline level 5. - - -sect4/sect4info/subtitle -sect4-subtitle - - - -sect4/sect4info/titleabbrev -sect4-titleabbrev - - - -sect5/sect5info/title -sect5-title -Assigned Word outline level 6. - - -sect5/sect5info/subtitle -sect5-subtitle - - - -sect5/sect5info/titleabbrev -sect5-titleabbrev - - - -section -sectN-title -Unnumbered sections are mapped to their numbered equivalent. A parameter (named?) may be set to map numbered sections (sect1, etc) back to unnumbered sections. - - -Block-level elements - - -para -para, Normal -Any Word paragraph with style Normal will also be converted to a para element. - - -abstract -abstract,abstract-title -abstract/para. - - -note/para -note -Consecutive paragraphs with style "note" after the first note are to be treated as part of the same note element. That is, consecutive notes are coalesced. - - -note/title -note-title - - - -caution/para -caution -Consecutive cautions are coalesced. - - -warning/para -warning -Consecutive warnings are coalesced. - - -important/para -important -Consecutive importants are coalesced. - - -tip/para -tip -Consecutive tips are coalesced. - - -itemizedlist/listitem/para -itemizedlist1 + DocBook-WordML Conversion Specifications + + + Bob + Stayton + + Sagehill Enterprises + + + + Steve + Ball + + Explain + + + + + 1.3 + 2005-10-31 + SRB + Added mediaobjectco, imageobjectco, programlistingco, areaspec, area, calloutlist. + + + 1.2 + 2005-10-13 + SRB + Version prior to using revhistory. + + + + + This document specifies how DocBook elements can be mapped to Microsoft Word styles. The specifications will be used to write conversions between DocBook XML and Microsoft's WordProcessingML (WordML). + +
+ Introduction + Microsoft Word 2003 introduced WordProcessingML (WordML), an XML vocabulary for Word documents. By converting Word to XML, it becomes possible to convert a Word document to DocBook and vice versa using XSL transformations. Such conversions would then enable the following. + + + DocBook content creators could write in Word, a familiar wordprocessing application, rather than learning a new XML editing application. + + + DocBook XML documents could be styled for output using the typesetting features of Word. + + + This specification describes how DocBook elements could map to a set of Word paragraph and character styles. It defines a specific set of style names for which a Word style template can be created. The style names would also be used in XSLT template match patterns for conversion. Although originally targetted to MS Word, the system has subsequently been extended to use other word processors, notably Apple's Pages. +
+
+ Project goals + The goal of this project is to enable Microsoft Word to be used with DocBook files. The specific goals include: + + + Enable authoring of basic DocBook documents in Word. + + + Enable importing of basic DocBook XML documents into Word. + + + To meet these goals, the project will produce a toolkit that can be immediately put to use. The kit will include: + + + A Word template with formatting styles attached to the style names. + + + A wordml-to-docbook XSLT stylesheet, which can convert a Word document that is authored with the Word template into a DocBook XML file. + + + A docbook-to-wordml XSLT stylesheet, which can convert a DocBook document into a WordML document that can be opened in Word with the attached Word template. + + +
+ Why basic DocBook? + It isn't clear that this project will ever be able to support all DocBook elements and structure. The project will initially focus on a basic set of commonly used DocBook elements to demonstrate the feasibility and usefulness of using Word with DocBook. + One problem facing this conversion project is the sheer number of DocBook elements, over 400 in DocBook 4.3. To support DocBook structural models, several of the elements will require more than one Word style. This could lead to a very long and unwieldy list of styles in the Word interface. That would make authoring less efficient and discourage users. + So this project assumes that authors who need the full set of DocBook elements will use an XML authoring tool that better supports them. This project will enable authors to write basic DocBook documents using Word. Because Word is so widespread, this project will help a lot of new DocBook users get started with familiar tools. They can then graduate to more advanced tools as their needs develop. +
+
+
+ Project Non-Goals + The following goals are not in the scope of this project: + + + Support of versions of Word that do not feature reading/writing WordML (XML). That is, all versions prior to Word 11 (Office 2003). + + + Supporting user-defined style names. However, this system should not prevent, or make difficult, adding such support via a customisation layer. + + + Support of arbitrarily defined styles. This system may expect certain styles to be defined in a particular fashion (in particular, those defining the title of components and divisions). + + +
+
+ Mapping elements to styles + Although WordML and DocBook are both XML, there several challenges when trying to convert between them. + The basic problem in mapping Word styles to DocBook elements is that Word documents support far less structure than DocBook. DocBook permits nesting of elements within other elements, providing multiple levels of context for each element. + Word's only structural feature is the outlining mode. In Word outlining, certain paragraph styles are assigned outline levels. When a user applies those styles, they effectively create logical structure in the Word document. Unfortunately, Word itself attempts to automatically determine which paragraphs are headings, and so this method is unreliable. + Instead of relying on Word's built-in outlining mode, this system uses only the names of styles to determine document structure. Certain hueristics are applied to build the DocBook element structure from the (relatively flat) word processing structure. Titles and other features are used to mark the beginning of a structure, and all paragraphs following that are included in that structure until the beginning of the next structure is found. Problems may arise when a structure should end, but there is no Word feature that marks the endpoint. + Nesting of block elements is another commonly used feature of DocBook. It is not possible to use Word's outline mode for blocks if it is being used for components and sections. So in this specification, nesting of block elements is indicated by adding a number suffix to a style. So a Word paragraph with style orderedlist2 is considered to be contained within a preceding paragraph with style listitem. In Word, paragraph indent levels will be used to visually indicate nesting of blocks. + Nesting of inline DocBook elements is particularly difficult to support because Word does not nest character styles. That means a nested inline would require a separate Word style to indicate the parent-child relationship. Given the large number of combinations possible, a prohibitively large number of character styles would have to be created. In this project, nesting of character styles will not be supported in the first release. Nested inlines being imported from DocBook will be converted to a sequence of single-name Word character styles. + In many cases, DocBook structure can be derived from the flat Word sequence of paragraphs based on sibling relationships. For example, when a paragraph styled as para is followed by a paragraph styled as itemizedlist, the conversion to DocBook will output a para element and then start an itemizedlist element, with the second paragraph as its first listitem. All itemizedlist paragraphs that follow without interruption are put in the same itemizedlist element. + Some combinations of elements cannot be supported (at least not with the techniques as described in this document). An example is informalexample and its permitted content; there is no title to mark the beginning of the element and no marker for the end of the element, also there are too many parent-child combinations to reasonably define style names. + Here are the design principles used in this project for selecting Word style names: + + + Where Word, by default, has a style or feature that corresponds directly to a DocBook element then that style or feature will be used (and documented in this document). For example, the Normal paragraph style maps to a DocBook para element, and a Word table (w:tbl) maps to a DocBook tableIn some cases Word may posess a feature, but it doesn't function in an acceptable manner. For example, lists. In these cases the feature is to be avoided, and a workaround provided.. + + + Word paragraph and character style names will match DocBook element names as much as possible. This will enable authors to learn DocBook element names, and help debug problems with conversion. + + + A style may indicate a parent-child relationship, but the paragraph for such an element may only occur after a paragraph that denotes the beginning of the parent structure. In this case the element name is used as the style name. For example, a personblurb paragraph may only occur after an author, editor or othercontrib paragraph. If a paragraph occurs without the appropriate preceding paragraph, then an error is signalled. + + + Some styles may also indicate a parent-child relationship, but either the parent structure is ambiguous or the paragraph starts the parent structure. For example, chapter-title indicates that the paragraph is a title whose DocBook parent is a chapter. + + + Some style names are simplified to make them easier to use in Word. For example, a paragraph in an orderedlist requires three elements in DocBook: orderedlist, listitem, and para. The paragraph style name in Word is shortened from orderedlist-listitem-para to just orderedlist. In the case of lists (see below), the list level is appended so this example becomes orderedlist1 + + + Style names with a number suffix indicate a nesting level, as described above. + + + Style names with continue indicate that the paragraph is part of the preceding element. For example, a para paragraph is used for a single paragraph para element. This would cause any preceding list to be closed. If a list item in the preceding list is to contain more than one paragraph, then the subsequent paragraphs in Word would get a para-continue style. + + + Character styles map to elements that are children of the element for the paragraph, hence there is no need to encode parent-child relationships. For example, a surname character style in an author paragraph becomes a surname child element of the author element. + + + Empty paragraph and character styles are ignored. + + + The first paragraph style in the Word document is used to define the root element of the DocBook document. For example, if a Word document starts with book-title, then the DocBook document will have book as its root element. All the rest of the document content will be contained in that root element. + + + Sequential structures are colesced into a single parent element. For example, a sequence of itemizedlist paragraphs becomes a single itemizedlist element with several listitem children. +
+ DocBook to WordML styles + + + + + + + DocBook element + WordML styles + Comments + + + + + + Components and sections + + + + book/bookinfo/title + book-title + + + + book/bookinfo/subtitle + book-subtitle + + + + book/bookinfo/titleabbrev + book-titleabbrev + + + + chapter/chapterinfo/title + chapter-title + Assigned Word outline level 1. + + + chapter/chapterinfo/subtitle + chapter-subtitle + + + + chapter/chapterinfo/titleabbrev + chapter-titleabbrev + + + + appendix/appendixinfo/title + appendix-title + Assigned Word outline level 1. + + + preface/prefaceinfo/title + preface-title + Assigned Word outline level 1. + + + article/articleinfo/title + article-title + Assigned Word outline level 1. + + + article/articleinfo/subtitle + article-subtitle + + + + article/articleinfo/titleabbrev + article-titleabbrev + + + + bibliography/bibliographyinfo/title + bibliography-title + Assigned Word outline level 1. + + + glossary/glossaryinfo/title + glossary-title + Assigned Word outline level 1. + + + index/indexinfo/title + index-title + Assigned Word outline level 1. + + + sect1/sect1info/title + sect1-title + Assigned Word outline level 2. + + + sect1/sect1info/subtitle + sect1-subtitle + + + + sect1/sect1info/titleabbrev + sect1-titleabbrev + + + + sect2/sect2info/title + sect2-title + Assigned Word outline level 3. + + + sect2/sect2info/subtitle + sect2-subtitle + + + + sect2/sect2info/titleabbrev + sect2-titleabbrev + + + + sect3/sect3info/title + sect3-title + Assigned Word outline level 4. + + + sect3/sect3info/subtitle + sect3-subtitle + + + + sect3/sect3info/titleabbrev + sect3-titleabbrev + + + + sect4/sect4info/title + sect4-title + Assigned Word outline level 5. + + + sect4/sect4info/subtitle + sect4-subtitle + + + + sect4/sect4info/titleabbrev + sect4-titleabbrev + + + + sect5/sect5info/title + sect5-title + Assigned Word outline level 6. + + + sect5/sect5info/subtitle + sect5-subtitle + + + + sect5/sect5info/titleabbrev + sect5-titleabbrev + + + + section + sectN-title + Unnumbered sections are mapped to their numbered equivalent. A parameter (named?) may be set to map numbered sections (sect1, etc) back to unnumbered sections. + + + + Block-level elements + + + + para + para, Normal + Any Word paragraph with style Normal will also be converted to a para element. + + + abstract + abstract,abstract-title + abstract/para. + + + note/para + note + Consecutive paragraphs with style "note" after the first note are to be treated as part of the same note element. That is, consecutive notes are coalesced. + + + note/title + note-title + + + + caution/para + caution + Consecutive cautions are coalesced. + + + warning/para + warning + Consecutive warnings are coalesced. + + + important/para + important + Consecutive importants are coalesced. + + + tip/para + tip + Consecutive tips are coalesced. + + + itemizedlist/listitem/para + + itemizedlist1 itemizedlist1 itemizedlist2 itemizedlist3 -itemizedlist4 -A number suffix indicates a nesting level within other lists. - - -orderedlist/listitem/para -orderedlist1 +itemizedlist4 + + A number suffix indicates a nesting level within other lists. + + + orderedlist/listitem/para + + orderedlist1 orderedlist1 orderedlist2 orderedlist3 -orderedlist4 - - - -variablelist/varlistentry/term -variablelist1-term +orderedlist4 + + + + + variablelist/varlistentry/term + + variablelist1-term variablelist2-term variablelist3-term variablelist4-term -variablelist5-term -A variablelist in Word should be a sequence of alternating paragraphs styled as variablelist-term and variablelist. - - -variablelist/varlistentry/listitem/para -variablelist1 +variablelist5-term + + A variablelist in Word should be a sequence of alternating paragraphs styled as variablelist-term and variablelist. + + + variablelist/varlistentry/listitem/para + + variablelist1 variablelist1 variablelist2 variablelist3 -variablelist4 - - - -listitem/para[position() != 1] -para-continue -This paragraph is included in the immediately preceding listitem. - - -example with title and programlisting children -example-title followed by programlisting - - - -example with title and literallayout children -example-title followed by literallayout - - - -example with title and mediaobject children -example-title followed by image styled with example style - - - -figure with title and programlisting children -figure-title followed by programlisting - - - -figure with title and literallayout children -figure-title followed by literallayout - - - -figure with title and mediaobject children -figure-title followed by image styled with figure style - - - -informalfigure -image tagged as figure style -with no figure-title above or below - - -informalfigure/mediaobject/imageobject/imagedata/@fileref -informalfigure-imagedata -The content of the paragraph is taken as the URI for the image. For use in cases where the image is not embedded in the Word document. - - -table -Word table - - - -table/title -table-title - - - -informaltable -Word table -with no table-title above or below - - -literallayout -literallayout -Inside a literallayout paragraph in Word, lines should be separated by line break (Shift-Enter) rather than paragraph break (Enter). - - -programlisting -programlisting -Inside a programlisting paragraph in Word, lines should be separated by line break (Shift-Enter) rather than paragraph break (Enter). Tabs are not supported. - - -blockquote/para -blockquote - - - -blockquote/title -blockquote-title -Should immediately precede a blockquote paragraph in Word. - - -blockquote/attribution -blockquote-attribution -Should immediately follow a blockquote paragraph in Word. - - -highlights/para -highlights -Consecutive highlights paragraphs are coalesced into a single highlights parent. - - -highlights/itemizedlist/listitem/para -highlights-itemizedlist -Nested lists are not currently supported. - - -highlights/orderedlist/listitem/para -highlights-orderedlist -Nested lists are not currently supported. - - -highlights/caution -highlights-caution - - - -highlights/important -highlights-important - - - -highlights/note -highlights-note - - - -highlights/tip -highlights-tip - - - -highlights/warning -highlights-warning - - - -Inline elements - - -emphasis -emphasis - - - -emphasis with @role="bold" -emphasis-bold - - - -footnote -Word footnote - - - -link -link -In Word, hyperlink properties identify the DocBook linkend. - - -xref -xref -In Word, hyperlink properties identify the DocBook linkend. Some placeholder text can be used in Word, but it will be discarded when exported to DocBook where xref is an empty element. - - -olink -olink -In Word, hyperlink properties identify the DocBook targetdoc and targetptr. - - -ulink -ulink -In Word, hyperlink properties identify the url. - - -glossterm -glossterm -In Word, hyperlink properties identify the DocBook linkend. - - -firstterm -firstterm -In Word, hyperlink properties identify the DocBook linkend. - - -computeroutput -computeroutput - - - -literal -literal - - - -replaceable -replaceable - - - -userinput -userinput - - - -command -command - - - -filename -filename - - - -option -option - - - -parameter -parameter - - - -systemitem -systemitem - - - -releaseinfo -releaseinfo - - - -author -author - - - -surname -surname -Character style. Must occur in an appropriate parent paragraph, such as author. - - -firstname -firstname -Character style. Must occur in an appropriate parent paragraph, such as author. - - - -
-
-Attributes -Attributes are a feature of DocBook XML that have no direct counterpart in Word. Several approaches are possible: - - - Use Word comments; the currently implemented approach. Some dummy text (just a space, using a character style that includes the hidden property) anchors the comment. Within the comment text, character types are used to indicate attribute names and values (these must be paired). This approach keeps the attributes separate to the main body and allows multiple attributes to be encoded. - A disadvantage to this approach (which also applies to the other approaches below) is that a paragraph may be related to more than one element, but the attributes are associated with only one element (by default the parent). For example, a section may have an attribute as well as the title child element, but only a single paragraph (with paragraph style section-title) represents both elements. Any attribute defined in a comment would be associated with the section element. - - - Use Word Bookmarks for attributes. For example, a Word Bookmark named att_role_foobar could be inserted into a paragraph. When converted to DocBook XML, this would become a role="foobar" attribute on the element derived from the paragraph containing the Bookmark. - - - Use hidden text. Define character styles that have their text hidden, and place these at the beginning of a paragraph. - - -
-
+variablelist4 + + + + + listitem/para[position() != 1] + para-continue + This paragraph is included in the immediately preceding listitem. + + + example with title and programlisting children + example-title followed by programlisting + + + + example with title and literallayout children + example-title followed by literallayout + + + + example with title and mediaobject children + example-title followed by image styled with example style + + + + figure with title and programlisting children + figure-title followed by programlisting + + + + figure with title and literallayout children + figure-title followed by literallayout + + + + figure with title and mediaobject children + figure-title followed by image styled with figure style + + + + informalfigure + image tagged as figure style + with no figure-title above or below + + + informalfigure/mediaobject/imageobject/imagedata/@fileref + informalfigure-imagedata + The content of the paragraph is taken as the URI for the image. For use in cases where the image is not embedded in the Word document. + + + mediaobjectco/imageobjectco/*[self::imagedata/@fileref|areaspec|calloutlist] + mediaobjectco-title, imageobjectco-imagedata, areaspec, area, callout + The content of the imageobjectco-imagedata paragraph is taken as the URI for the image. May be preceded by areaspec and area paragraphs, and followed by callout paragraphs (these are ignored if not associated with an imageobjectco or programlistingco). areaspec and area are normally empty paragraphs, but may have attributes encoded in the usual fashion. callout paragraphs are collected together into a calloutlist, and may have nested lists. + + + programlistingco/*[self::programlisting|areaspec|calloutlist] + programlistingco, areaspec, area, callout + programlistingco may be preceded by areaspec and area paragraphs, and followed by callout paragraphs (these are ignored if not associated with an imageobjectco or programlistingco). areaspec and area are normally empty paragraphs, but may have attributes encoded in the usual fashion. callout paragraphs are collected together into a calloutlist, and may have nested lists. + + + table + Word table + + + + table/title + table-title + + + + informaltable + Word table + with no table-title above or below + + + literallayout + literallayout + Inside a literallayout paragraph in Word, lines should be separated by line break (Shift-Enter) rather than paragraph break (Enter). + + + programlisting + programlisting + Inside a programlisting paragraph in Word, lines should be separated by line break (Shift-Enter) rather than paragraph break (Enter). Tabs are not supported. + + + blockquote/para + blockquote + + + + blockquote/title + blockquote-title + Should immediately precede a blockquote paragraph in Word. + + + blockquote/attribution + blockquote-attribution + Should immediately follow a blockquote paragraph in Word. + + + highlights/para + highlights + Consecutive highlights paragraphs are coalesced into a single highlights parent. + + + highlights/itemizedlist/listitem/para + highlights-itemizedlist + Nested lists are not currently supported. + + + highlights/orderedlist/listitem/para + highlights-orderedlist + Nested lists are not currently supported. + + + highlights/caution + highlights-caution + + + + highlights/important + highlights-important + + + + highlights/note + highlights-note + + + + highlights/tip + highlights-tip + + + + highlights/warning + highlights-warning + + + + + Inline elements + + + + emphasis + emphasis + + + + emphasis with @role="bold" + emphasis-bold + + + + footnote + Word footnote + + + + link + link + In Word, hyperlink properties identify the DocBook linkend. + + + xref + xref + In Word, hyperlink properties identify the DocBook linkend. Some placeholder text can be used in Word, but it will be discarded when exported to DocBook where xref is an empty element. + + + olink + olink + In Word, hyperlink properties identify the DocBook targetdoc and targetptr. + + + ulink + ulink + In Word, hyperlink properties identify the url. + + + glossterm + glossterm + In Word, hyperlink properties identify the DocBook linkend. + + + firstterm + firstterm + In Word, hyperlink properties identify the DocBook linkend. + + + computeroutput + computeroutput + + + + literal + literal + + + + replaceable + replaceable + + + + userinput + userinput + + + + command + command + + + + filename + filename + + + + option + option + + + + parameter + parameter + + + + systemitem + systemitem + + + + releaseinfo + releaseinfo + + + + author + author + + + + surname + surname + Character style. Must occur in an appropriate parent paragraph, such as author. + + + firstname + firstname + Character style. Must occur in an appropriate parent paragraph, such as author. + + + orgname + orgname + + + + + +
+ Attributes + Attributes are a feature of DocBook XML that have no direct counterpart in Word. Several approaches are possible: + + + Use Word comments (annotations); the currently implemented approach. Some dummy text (just a space, using a character style that includes the hidden property) anchors the comment. Within the comment text, character types are used to indicate attribute names and values (these must be paired). This approach keeps the attributes separate to the main body and allows multiple attributes to be encoded. + A disadvantage to this approach (which also applies to the other approaches below) is that a paragraph may be related to more than one element, but the attributes are associated with only one element (by default the parent). For example, a section may have an attribute as well as the title child element, but only a single paragraph (with paragraph style section-title) represents both elements. Any attribute defined in a comment would be associated with the section element. + Pages does not have annotations, so the character styles attribute-name and attribute-value are used. + + + Use Word Bookmarks for attributes. For example, a Word Bookmark named att_role_foobar could be inserted into a paragraph. When converted to DocBook XML, this would become a role="foobar" attribute on the element derived from the paragraph containing the Bookmark. + + + Use hidden text. Define character styles that have their text hidden, and place these at the beginning of a paragraph. + + +
+
diff --git a/xsl/wordml/template-pages.xml b/xsl/wordml/template-pages.xml index 3f87af926..2068eaab9 100644 --- a/xsl/wordml/template-pages.xml +++ b/xsl/wordml/template-pages.xml @@ -1,2 +1,2 @@ -Lorem ipsum dolor sit ametConsectetur adipiscing elitEset eiusmod tempor incidunt et labore et dolore magna aliquam. Ut enim ad minim veniam, quis nostrud exerc. Irure dolor in reprehend incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse molestaie cillum. Tia non ob ea soluad incommod quae egen ium improb fugiend. Officia deserunt mollit anim id est laborum Et harumd dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda et tam. Neque pecun modut est neque nonor et imper ned libidig met, consectetur adipiscing elit, sed ut labore et dolore magna aliquam is nostrud exercitation ullam mmodo consequet.Duis aute in voluptate velit esseCillum dolore eu fugiat nulla pariatur. At vver eos et accusam dignissum qui blandit est praesent. Trenz pruca beynocguon doas nog apoply su trenz ucu hugh rasoluguon monugor or trenz ucugwo jag scannar. Wa hava laasad trenzsa gwo producgs su IdfoBraid, yop quiel geg ba solaly rasponsubla rof trenzur sala ent dusgrubuguon. Offoctivo immoriatoly, hawrgasi pwicos asi sirucor. Thas sirutciun applios tyu thuso itoms ghuso pwicos gosi sirucor in mixent gosi sirucor ic mixent ples cak ontisi sowios uf Zerm hawr rwivos. Unte af phen neige pheings atoot Prexs eis phat eit sakem eit vory gast te Plok peish ba useing phen roxas. Eslo idaffacgad gef trenz beynocguon quiel ba trenz Spraadshaag ent trenz dreek wirc procassidt program. Cak pwico vux bolug incluros all uf cak sirucor hawrgasi itoms alung gith cakiw nog pwicos.Plloaso mako nuto uf cakso dodtosKoop a cupy uf cak vux noaw yerw phuno. Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad. Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona. Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow. Trens roxas eis ti Plokeing quert loppe eis yop prexs. Piy opher hawers, eit yaggles orn ti sumbloat alohe plok. Su havo loasor cakso tgu pwuructs tyu InfuBwain, ghu gill nug bo suloly sispunsiblo fuw cakiw salo anr ristwibutiun. Hei muk neme eis loppe. Treas em wankeing ont sime ploked peish rof phen sumbloat syug si phat phey gavet peish ta paat ein pheeir sumbloats. Aslu unaffoctor gef cak siructiun gill bo cak spiarshoot anet cak GurGanglo gur pwucossing pwutwam. Ghat dodtos, ig pany, gill bo maro tyu ucakw suftgasi pwuructs hod yot tyubo rotowminor. Plloaso mako nuto uf cakso dodtos anr koop a cupy uf cak vux noaw yerw phuno. Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad. Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona. Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow. Trens roxas eis ti Plokeing quert loppe eis yop prexs. Piy opher hawers, eit yaggles orn ti sumbloat alohe plok. Su havo loasor cakso tgu pwuructs tyu.Document TemplateInsert content here +Lorem ipsum dolor sit ametConsectetur adipiscing elitEset eiusmod tempor incidunt et labore et dolore magna aliquam. Ut enim ad minim veniam, quis nostrud exerc. Irure dolor in reprehend incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse molestaie cillum. Tia non ob ea soluad incommod quae egen ium improb fugiend. Officia deserunt mollit anim id est laborum Et harumd dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda et tam. Neque pecun modut est neque nonor et imper ned libidig met, consectetur adipiscing elit, sed ut labore et dolore magna aliquam is nostrud exercitation ullam mmodo consequet.Duis aute in voluptate velit esseCillum dolore eu fugiat nulla pariatur. At vver eos et accusam dignissum qui blandit est praesent. Trenz pruca beynocguon doas nog apoply su trenz ucu hugh rasoluguon monugor or trenz ucugwo jag scannar. Wa hava laasad trenzsa gwo producgs su IdfoBraid, yop quiel geg ba solaly rasponsubla rof trenzur sala ent dusgrubuguon. Offoctivo immoriatoly, hawrgasi pwicos asi sirucor. Thas sirutciun applios tyu thuso itoms ghuso pwicos gosi sirucor in mixent gosi sirucor ic mixent ples cak ontisi sowios uf Zerm hawr rwivos. Unte af phen neige pheings atoot Prexs eis phat eit sakem eit vory gast te Plok peish ba useing phen roxas. Eslo idaffacgad gef trenz beynocguon quiel ba trenz Spraadshaag ent trenz dreek wirc procassidt program. Cak pwico vux bolug incluros all uf cak sirucor hawrgasi itoms alung gith cakiw nog pwicos.Plloaso mako nuto uf cakso dodtosKoop a cupy uf cak vux noaw yerw phuno. Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad. Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona. Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow. Trens roxas eis ti Plokeing quert loppe eis yop prexs. Piy opher hawers, eit yaggles orn ti sumbloat alohe plok. Su havo loasor cakso tgu pwuructs tyu InfuBwain, ghu gill nug bo suloly sispunsiblo fuw cakiw salo anr ristwibutiun. Hei muk neme eis loppe. Treas em wankeing ont sime ploked peish rof phen sumbloat syug si phat phey gavet peish ta paat ein pheeir sumbloats. Aslu unaffoctor gef cak siructiun gill bo cak spiarshoot anet cak GurGanglo gur pwucossing pwutwam. Ghat dodtos, ig pany, gill bo maro tyu ucakw suftgasi pwuructs hod yot tyubo rotowminor. Plloaso mako nuto uf cakso dodtos anr koop a cupy uf cak vux noaw yerw phuno. Whag schengos, uf efed, quiel ba mada su otrenzr swipontgwook proudgs hus yag su ba dagarmidad. Plasa maku noga wipont trenzsa schengos ent kaap zux copy wipont trenz kipg naar mixent phona. Cak pwico siructiun ruos nust apoply tyu cak UCU sisulutiun munityuw uw cak UCU-TGU jot scannow. Trens roxas eis ti Plokeing quert loppe eis yop prexs. Piy opher hawers, eit yaggles orn ti sumbloat alohe plok. Su havo loasor cakso tgu pwuructs tyu.Document TemplateInsert content here diff --git a/xsl/wordml/wordml-final.xsl b/xsl/wordml/wordml-final.xsl index 8a55f7c14..a84ebe2ff 100644 --- a/xsl/wordml/wordml-final.xsl +++ b/xsl/wordml/wordml-final.xsl @@ -21,9 +21,16 @@ + + + + + + + @@ -31,7 +38,10 @@ + + + @@ -85,6 +95,8 @@ + + ]> @@ -821,12 +834,21 @@
- + + + + + + + + + @@ -957,20 +979,50 @@ - + + + + + + + + + + + @@ -979,18 +1031,29 @@ - + - - + + + + + + + + + + + + + + + @@ -1001,11 +1064,7 @@ - @@ -1016,11 +1075,7 @@ - @@ -1035,9 +1090,105 @@ mode='mediaobject'/> - - + + + + + + + + + + + + + + + + bad content () in an areaspec + bad content () in an areaspec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1303,15 +1454,6 @@ - - @@ -1552,46 +1694,78 @@ - - - - - - - - + - + + + + + + + + + + - - - + - - - - - - + + + + - + + [self::&exampletitle;]]" + priority="2" + mode="group"/> + priority="2" + mode="group"/> + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1606,7 +1780,7 @@ + select='$node/w:r[w:rPr/w:rStyle/@w:val = "attributes"]'/>