From: Steve Ball Date: Sun, 26 Dec 2004 01:40:12 +0000 (+0000) Subject: attributes spec X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c23e53ab80eee85ce448131bbd86e250528881e6;p=docbook-dsssl attributes spec --- diff --git a/xsl/wordml/docbook.xsl b/xsl/wordml/docbook.xsl index 74754e60b..3fba58f15 100755 --- a/xsl/wordml/docbook.xsl +++ b/xsl/wordml/docbook.xsl @@ -195,6 +195,9 @@ + + + @@ -233,9 +236,18 @@ - - - + + + + + + + + + + + + @@ -883,7 +895,7 @@ keywordset| msg'/> - + encountered @@ -1063,7 +1075,9 @@ - + + + diff --git a/xsl/wordml/specifications.xml b/xsl/wordml/specifications.xml index e0cd73a6f..9cce83c85 100755 --- a/xsl/wordml/specifications.xml +++ b/xsl/wordml/specifications.xml @@ -112,9 +112,6 @@ dated 5 November, 2004 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. -Attributes are a feature of DocBook XML that have no direct counterpart in Word. One approach is to 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. -[Alternatively, we could use hidden text for attributes.] -[Do we need a parameter to specify whether titles should be placed in the *info subelement?] DocBook to WordML styles
+
+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. + + +
diff --git a/xsl/wordml/wordml-final.xsl b/xsl/wordml/wordml-final.xsl index 913684b21..ef6e508fe 100644 --- a/xsl/wordml/wordml-final.xsl +++ b/xsl/wordml/wordml-final.xsl @@ -112,6 +112,9 @@ + + + @@ -1048,7 +1051,7 @@ - + @@ -1059,6 +1062,7 @@ +