This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We get most value from schema-aware XQuery and XSLT processing if we use named types rather than anonymous types; the precise type is then available for use in SequenceType constructs of the form as="element(*, typeName)". This is illustrated by test json-to-xml-046, which is not able to test the precise type annotation on an element node because the most precise type is anonymous. I therefore propose that in schema-for-json.xsd we replace all anonymous types by named types. (No change is needed to analyze-string.xsd because it already follows this convention.) The change does not affect any existing queries, nor does it affect the validation of instances; it purely makes more precise type information available for use in queries and stylesheets.
The changes were approved, and have been applied.
The test json-to-xml-046 has also been updated.