mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Moving from attributes to elements, and introducing a more regular structure
[SVN r17870]
This commit is contained in:
parent
4e487521c2
commit
54afa8b0a3
@ -187,11 +187,9 @@
|
||||
<!ELEMENT type ANY>
|
||||
<!ATTLIST type %boost.common.attrib;>
|
||||
|
||||
<!ELEMENT typedef (type?, purpose?, description?)>
|
||||
<!ELEMENT typedef (type, purpose?, description?)>
|
||||
<!ATTLIST typedef
|
||||
type CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
comment CDATA #IMPLIED
|
||||
%boost.common.attrib;>
|
||||
|
||||
<!ELEMENT enum (enumvalue*, purpose?, description?)>
|
||||
@ -204,11 +202,9 @@
|
||||
name CDATA #REQUIRED
|
||||
%boost.common.attrib;>
|
||||
|
||||
<!ELEMENT static-constant EMPTY>
|
||||
<!ELEMENT static-constant (type, default, purpose?, description?)>
|
||||
<!ATTLIST static-constant
|
||||
type CDATA #REQUIRED
|
||||
name CDATA #REQUIRED
|
||||
value CDATA #REQUIRED
|
||||
%boost.common.attrib;>
|
||||
|
||||
<!ELEMENT data-member (type)>
|
||||
|
67
xsl/type.xsl
67
xsl/type.xsl
@ -229,8 +229,8 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:when test="@type">
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: `type' attribute of `typedef' element is deprecated. Use 'type' element instead.</xsl:text>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:message>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
<xsl:value-of select="string-length(@type)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@ -315,18 +315,73 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:param name="indentation"/>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:variable name="type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type">
|
||||
<xsl:value-of select="@type"/>
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: `type' attribute of `static-constant' element is deprecated. Use 'type' element instead.</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="type/*|type/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="default">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@value">
|
||||
<xsl:value-of select="@value"/>
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: `value' attribute of `static-constant' element is deprecated. Use 'default' element instead.</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="default/*|default/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="purpose">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@comment">
|
||||
<xsl:value-of select="@comment"/>
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: `comment' attribute of `static-constant' element is deprecated. Use 'purpose' element instead.</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="purpose/*|purpose/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="concat('static const ', @type, ' ',
|
||||
@name, ' = ', @value,';')"/>
|
||||
<xsl:with-param name="text" select="'static const '"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:copy-of select="$type"/>
|
||||
|
||||
<xsl:if test="@comment">
|
||||
<xsl:text> = </xsl:text>
|
||||
|
||||
<xsl:copy-of select="$default"/>
|
||||
|
||||
<xsl:text>;</xsl:text>
|
||||
|
||||
<xsl:if test="not(string($purpose)='')">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="highlight-comment">
|
||||
<xsl:with-param name="text" select="concat('// ', @comment)"/>
|
||||
<xsl:with-param name="text">
|
||||
<xsl:text>// </xsl:text>
|
||||
<xsl:copy-of select="$purpose"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
@ -579,8 +634,8 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:if test="para">
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: Use of 'para' elements in 'class' element is deprecated. Wrap them in a 'description' element.</xsl:text>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:message>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
<xsl:apply-templates select="para" mode="annotation"/>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="description"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user