[Bug 25149] Normative references to unstable documents must be removed before publication


C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED

--- Comment #1 from C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> ---
One complication arises regarding XSLT 3.0:  section 6 of Serialization defines
the (normatively required) process of namespace prefix normalization [1] by
appealing normatively to an XSLT 3.0 stylesheet.  As written, this stylesheet
is not a legal XSLT 2.0 stylesheet, because it uses the namespace axis in a
match pattern. 

[1] http://www.w3.org/TR/xslt-xquery-serialization-30/#PREFIXNORMALIZATION

One possibility would be to rewrite the stylesheet in XSLT 2.0; I think this is
possible.  A first attempt at such a rewrite follows.

<?xml version="1.0" encoding="UTF-8"?>
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"

  <xsl:template match="xhtml:*|svg:*|mathml:*">
    <xsl:element name="{local-name()}" namespace="{namespace-uri()}">
      <xsl:call-template name="copy-namespace-nodes"/>
      <xsl:apply-templates select="@*|node()"/>

  <xsl:template match="node()|@*">
    <xsl:copy copy-namespaces="no">      
      <xsl:call-template name="copy-namespace-nodes"/>
      <xsl:apply-templates select="@*|node()"/>

  <xsl:template name="copy-namespace-nodes">
    <xsl:for-each select="namespace::*
      [not(. = ('http://www.w3.org/1999/xhtml',


(Changes made:  remove namespace::* (etc.) from all select patterns; suppress
the template for the three magic namespaces; add the named template
'copy-namespace-nodes'; call that template from the two other templates.)

This is important enough and error-prone enough (I don't usually muck about
with namespace nodes in my stylesheets, so I'm out of practice) that it would
be a very good idea to have two or three additional pairs of eyes on this
before concluding that the new stylesheet is correct.  (Volunteers, please
check it and report your results in a comment on this bug.)

Another approach to the problem would be to embed the stylesheet in a note, on
the theory that the transformation is adequately described in the prose
definition of prefix normalization.

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 26 March 2014 21:04:16 UTC