Match attributes
Because the DITA DTD defines a default class attribute value for each element, the parser automatically adds this attribute to each element when validating. As a result, when structured FrameMaker reads your document, each element will have a class attribute. These class attributes have no meaning to structured FrameMaker and can potentially confuse people working on the files, so the stylesheet ignores them.
The template matches all attributes and uses an <xsl:choose> statement to handle class attributes. The template copies any attributes that are not named class.
<xsl:template match="@*" mode="identity">
<xsl:choose>
<xsl:when
test="name() = 'class'">
<!-- Do nothing. -->
</xsl:when>
<xsl:otherwise>
<xsl:copy/>
</xsl:otherwise>
</xsl:choose></xsl:template>
There are other attributes you might want to handle, such as domains and ditaarch:DITAArchVersion.
Next Page:
Match other nodes
