Moving from attributes to elements, and introducing a more regular structure

[SVN r17870]
This commit is contained in:
Douglas Gregor 2003-03-13 00:29:30 +00:00
parent 4e487521c2
commit 54afa8b0a3
2 changed files with 63 additions and 12 deletions

View File

@ -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)>

View File

@ -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>&#10;</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.&#10;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"/>