[Bug 7355] New: Precise definition of region for which forwards compatibility applies

http://www.w3.org/Bugs/Public/show_bug.cgi?id=7355

           Summary: Precise definition of region for which forwards
                    compatibility applies
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/xslt20/#dt-forwards-compatible-
                    behavior
        OS/Version: Windows XP
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: zongaro@ca.ibm.com
         QAContact: public-qt-comments@w3.org


Section 3.9 of XSLT 2.0[1] indicates that "An element enables
forwards-compatible behavior for itself, its attributes, its descendants and
their attributes if it has an [xsl:]version attribute (see 3.5 Standard
Attributes) whose value is greater than 2.0."  It then goes on to say that,
"Within a section of a stylesheet where forwards-compatible behavior is
enabled...  if an element in the XSLT namespace appears as part of a sequence
constructor, and XSLT 2.0 does not allow such elements to appear as part of a
sequence constructor, then:" and describes the treatment of such elements
depending on whether they have xsl:fallback children.

Now consider the following fragment:

<xsl:for-each select="foo" version="8.5">
  <xsl:character-map version="2.0">
    <xsl:fallback/>
  </xsl:character-map>
</xsl:for-each>

Is the xsl:character-map in a section of the stylesheet where
forwards-compatible behaviour is enabled, because it is part of a sequence
constructor whose parent has enabled forwards-compatible behaviour, or is it in
section where forwards-compatible behaviour is disabled, because the element
has disabled forwards-compatible behaviour for itself?

In other words, is it the parent of the sequence constructor that ultimately
decide whether it may have content that's not ordinarily permitted in a
sequence constructor, or is it the nodes in the sequence constructor itself
that have the final decision?

I think the intent was that it is the node itself that has the final say, and I
think that reading is consistent with XSLT 1.0.  To make that clear, I suggest
the following changes in section 3.9:

o Change the first sentence of the sixth paragraph from "Within a section of a
stylesheet where forwards-compatible behavior is enabled" to "If
forwards-compatible behaviour is enabled for an element, and";

o In the first item in the second list, change "an element in the XSLT
namespace appears as a child" to "the element is in the XSLT namespace and
appears as a child";

o In the second item in the second list, change "if an element has an
attribute" to read "the element has an attribute"

o In the third item in the second list, change "if an element in the XSLT
namespace appears as part of a sequence constructor" to "the element is in the
XSLT namespace and appears as part of a sequence constructor"

[1] http://www.w3.org/TR/xslt20/#forwards


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 17 August 2009 19:57:04 UTC