This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
XSLT stylesheets give users direct control over serialization from XDM, and allow creation of multiple output documents each with their own serialization options. We should consider this for future versions of XQuery.
We discussed this at meeting #523, and consensus was that this is a "may" requirement: <quote> Q2.9.4 Bugzilla Bug 9064, [XQ31ReqUC] multiple output files with serialization options See http://www.w3.org/Bugs/Public/show_bug.cgi?id=9064 may (for JSON) </quote>
This bug has been redirected to F&O 3.1 because it has been accepted as a (MAY) requirement.
The XQuery and XSLT WGs proposed to resolve this by defining a subset of XQuery Update consisting of only fn:put() (and pending update lists). Unfortunately this has a problem since you can't currently mix updating functions and value-returning functions in update, but solving this is a requirement for update 3. other proposals included * a query returning a sequence of nodes to serialize, together with URIs and parameters for serializations * not meeting this requirement * inventing a new node type or otherwise marking serialization option changes in the middle of a result tree Discussion continues. Keeing fn:put() as an updating function and keeping it out of XPath seems wise.
Reclassifying as an Update 3.0, with the provision that the XQuery 3.1 requirements and use cases refer forwards to the solution in Update 3.0.
Proposal for changes to the conformance section of XQuery Update 3.0: Under section "4 Conformance": An XQuery processor that claims to conform to this specification MUST include a claim of Minimal Conformance as defined in [4.1 Minimal Conformance]. In addition to a claim of Minimal Conformance, it MAY claim conformance to one or more optional features defined in [4.2 Optional Features]. add: An XQuery processor MAY claim conformance to a subset of the XQuery Update 3.0 specification called "XQuery with Multiple Results" as defined in [4.3 XQuery with Multiple Results]. Implementations conforming to this subset but not to the Minimal Conformance may not claim to implement this specification. Insert a new section 4.3: 4.3 XQuery with Multiple Results A subset of the XQuery Update 3.0 specification called "XQuery with Multiple Results" is defined for the purposes of implementations only wishing to allow multiple results to be returned from an XQuery program. Implementations claiming conformance to the "XQuery with Multiple Results" subset MUST include all of the following items: 1) Minimal Conformance to [XQuery 3.0: An XML Query Language]. 2) Support for the following sections of this document: 2.1 Extensions to the Processing Model 2.2 Extensions to the Data Model 2.4.2 Function Declaration Excluding %updating annotations. 2.4.3 Variable Declaration Excluding %updating annotations. 2.4.4 Context Item Declaration 2.5 Extensions to the Static Context 2.7 Extensions to Existing Expressions 2.8.1 fn:put 3.1.12 upd:put 3.2 Update Routines 3) Use of other types of XQuery Update 3.0 expression SHOULD result in an error [err:XPST0003].
The WG accepted this proposal for inclusion in XQuery Update 3.0.