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 29172 - [FO31] Avoid anonymous types in schema for fn namespace
Summary: [FO31] Avoid anonymous types in schema for fn namespace
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-02 13:46 UTC by Michael Kay
Modified: 2016-03-22 10:08 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2015-10-02 13:46:04 UTC
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.
Comment 1 Michael Kay 2015-10-06 17:34:00 UTC
The changes were approved, and have been applied.
Comment 2 Michael Kay 2015-10-06 17:48:40 UTC
The test json-to-xml-046 has also been updated.