W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2009

[Bug 6951] New: Conflicting requirements for type annotations from XSLT validation='lax' and XDM

From: <bugzilla@wiggum.w3.org>
Date: Mon, 25 May 2009 16:44:40 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6951-523@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6951

           Summary: Conflicting requirements for type annotations from XSLT
                    validation='lax' and XDM
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/xslt20/#validating-using-
                    validation-attribute
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: zongaro@ca.ibm.com
         QAContact: public-qt-comments@w3.org


The fourth bullet of the list in section 19.2.1.1 of XSLT 2.0[1] states, in
part:

"In practice this means that the element or attribute being validated must
conform to its declaration if a top-level declaration is available. If no such
declaration is available, then the element or attribute is not validated, but
its attributes and children are validated, again with lax validation. Any nodes
whose validation outcome is a validity property of notKnown are annotated as
xs:anyType in the case of an element, and xs:untypedAtomic in the case of an
attribute."

According to the second and third bullets of section 3.3.1.1 of XDM,[2] if:

- The [validity] property exists and is "invalid", or the [validation
attempted] property exists and is "partial", the schema type of an element is
xs:anyType and the type of an attribute is xs:anySimpleType.
- The [validity] property exists and is "notKnown", and the [validation
attempted] property exists and is "none", the schema type of an element is
xs:untyped and the type of an attribute is xs:untypedAtomic.


Now suppose I have something like the following fragment in XSLT.

  <my:doc xsl:validation="lax" xmlns:my="http://example.org"><my:child/></doc>

Now assume there is no element declaration for my:doc, but there is an element
declaration for my:child, and the element information item is valid with
respect to it.  Reading section 3.3.5 of XML Schema: Structures,[3] I believe
that the PSVI for my:child will have [validity] property "valid" and
[validation attempted] "full", and the PSVI for my:doc will have [validity]
property "notKnown" and [validation attempted] "partial".  So from the text
I've quoted in XDM, the type of my:doc should be xs:anyType, which agrees with
XSLT.

However, if neither my:doc nor my:child have element declarations, my reading
of Structures is that the PSVI for both my:doc and for my:child will have
[validity] property "notKnown" and [validation attempted] "none", and so the
type of both nodes should be xs:untyped, according to XDM, which conflicts with
the assertion I've quoted from XSLT 2.0.

I suggest correcting this by striking the sentence that begins "Any nodes whose
validation outcome is a validity property of notKnown" from the fourth bullet
of 19.2.1.1 of XSLT 2.0.

[1] http://www.w3.org/TR/xslt20/#validating-using-validation-attribute
[2] http://www.w3.org/TR/xpath-datamodel/#PSVI2NodeTypes
[3] http://www.w3.org/TR/xmlschema-1/#d0e5070


-- 
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, 25 May 2009 16:44:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:57 GMT