This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20949 - validate type xs:untyped
Summary: validate type xs:untyped
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 15:17 UTC by John Snelson
Modified: 2013-03-19 16:52 UTC (History)
0 users

See Also:


Attachments

Description John Snelson 2013-02-11 15:17:07 UTC
Validation as a type defers to the XML Schema specification. However, the XML Schema specification does not define xs:untyped, so it appears to be undefined what happens in that case.

XSLT decided in bug 17480 to make this case analogous to validation="strip" - which gets rid of all type annotations.

A similar problem exists with "validate type xs:untypedAtomic". The XSLT WG decided to check that the validated element also has simple content in this case.
Comment 1 Jonathan Robie 2013-03-19 16:50:23 UTC
I would like to merge these rules into bullet point 3 of 3.18 Validate Expressions:

* If validation mode is strict, the validated element must have a top-level element declaration in the effective schema, and must conform to this declaration.
* If validation mode is lax, the validated element must conform to its top-level element declaration if such a declaration exists in the effective schema. If validation mode is lax and there is no top-level element declaration for the element, and the element has an xsi:type attribute, then the xsi:type attribute must name a top-level type definition in the effective schema, and the element must conform to that type.
* If a type name is specified in the validate expression, no attempt is made to locate an element declaration matching the name of the validated element; the element can have any name, and its content is validated against the named type. If the type name is xs:untyped, all elements will receive the type annotation xs:untyped, and all attributes will receive the type annotation xs:untypedAtomic. If the type name is xs:untypedAtomic, it checks that the node has no children, and the node receives the type annotation xs:untypedAtomic.
Comment 2 Jonathan Robie 2013-03-19 16:52:20 UTC
The Working Group has agreed to resolve this as specified in comment #1.

Editorial reminder: fix "it checks".