This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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.
The Working Group has agreed to resolve this as specified in comment #1. Editorial reminder: fix "it checks".