W3C home > Mailing lists > Public > spec-prod@w3.org > January to March 2001

Something I don't understand in xmlspec.xsl

From: Daniel Veillard <Daniel.Veillard@imag.fr>
Date: Tue, 13 Feb 2001 14:37:01 +0100
To: Norman.Walsh@East.Sun.COM
Cc: spec-prod@w3.org
Message-ID: <20010213143701.O8516@imag.fr>
  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>

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

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

 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



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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:42:16 UTC