Something I don't understand in xmlspec.xsl

  Okay maybe you can help me I'm stuck:

taking the XML 2e xml as the example and more precisely the
production NT-doctypedecl:

<prod id="NT-doctypedecl" diff="chg">
<lhs>doctypedecl</lhs><rhs>'&lt;!DOCTYPE' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt>
(<nt def="NT-S">S</nt> <nt def="NT-ExternalID">ExternalID</nt>)? <nt def="NT-S">S</nt>?
('[' (<nt def="NT-markupdecl">markupdecl</nt> | <nt diff="chg" def="NT-DeclSep">DeclSep</nt>)*
']' <nt def="NT-S">S</nt>?)? '>'</rhs><vc def="vc-roottype"/><wfc def="ExtSubset"
diff="add"/><com><loc role="erratumref" href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</loc></com>
</prod>

the child sequence of prod is lhs-rhs-vc-wfc-com
lets look at the template handling rhs

  <xsl:template match="rhs">
    <xsl:choose>
      <xsl:when test="preceding-sibling::*[1][name()='lhs']">
        <td>
          <xsl:if test="ancestor-or-self::*/@diff and $show.diff.markup='1'">
            <xsl:attribute name="class">
              <xsl:text>diff-</xsl:text>
              <xsl:value-of select="ancestor-or-self::*/@diff"/>
            </xsl:attribute>
          </xsl:if>
          <code><xsl:apply-templates/></code>
        </td>
        <xsl:apply-templates
          select="following-sibling::*[1][name()='com' or
                                          name()='constraint' or
                                          name()='vc' or
                                          name()='wfc']"/>
      </xsl:when>
      <xsl:otherwise>

 the when matches it generates the td, the code then goes the apply-templates
that's where I don't understand, the select section returns only
the vc, excluding the wfc and com from being processed. Those are IMHO
excluded due to the first [1] filter.
 Where I'm puzzled is that the spec HTML version is anyway correct, it
has the references for the external subset WFC.
 I checked both the old version of the XSL linked from the spec and
the new version in CVS at dev.w3.org, both have the [1] predicate.
I'm puzzled, I can't see what I missed, any enlighening would be extremely
welcome.

  thanks,

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Received on Tuesday, 13 February 2001 08:37:11 UTC