]> granicus.if.org Git - docbook-dsssl/commitdiff
Handle fixed attributes
authorNorman Walsh <ndw@nwalsh.com>
Tue, 25 Oct 2005 23:27:21 +0000 (23:27 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 25 Oct 2005 23:27:21 +0000 (23:27 +0000)
docbook/relaxng/tools/xml2dtd.xsl

index 62b7497fab378426a1663999cc6d07cdafab6437..557a353758498936cf1cc90b2e027aa80e4a00c0 100644 (file)
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
+       <xsl:when test="@occurs='fixed'">
+         <xsl:text>CDATA&#9;#FIXED&#9;'</xsl:text>
+         <xsl:value-of select="."/>
+         <xsl:text>'</xsl:text>
+       </xsl:when>
        <xsl:when test="string-length(.) != 0">
          <!-- handle the special case of duplicate lists, etc. -->
          <xsl:choose>
        <xsl:when test="@occurs='optional'">
          <xsl:text>#IMPLIED</xsl:text>
        </xsl:when>
+       <xsl:when test="@occurs='fixed'">
+         <!-- nop; handled above -->
+       </xsl:when>
        <xsl:otherwise>#REQUIRED</xsl:otherwise>
       </xsl:choose>
       <xsl:text>&#10;</xsl:text>