W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > June 2008

XQuery WG comments on XProc specification

From: Michael Kay <mike@saxonica.com>
Date: Wed, 4 Jun 2008 16:08:36 +0100
To: <public-xml-processing-model-comments@w3.org>
Cc: <w3c-xml-query-wg@w3.org>, <w3c-xsl-wg@w3.org>
Message-ID: <AEF166E91EBC4A7284C5D597BD4E077C@Sealion>

(ACTION A-369-03)

I was asked to convey the XQuery WGs comments on the XProc specification,
and in particular on the mechanism for invoking XQuery from XProc.
(Formally, these are comments from the joint XQuery/XSL WGs, but the XSL WG
had already made its own comments on the parts of the spec relevant to XSLT
- at any rate, on a previous draft.)

The comment is in two parts: (a) an email from Andrew Eisenberg, and (b) my
summary of the WGs discussion of that email and other observations.

First, Andrew's email, which the WG largely endorsed:


We noted that Andrew is proposing to make it an error if the query returns
anything other than document nodes (presumably representing well-formed XML)
or element nodes. An alternative would be to allow the query to return other
values (for example, the integer 17) and turn these into XML documents by
some defined wrapping process.

The other observation made in discussion was about the requirement for the
pipeline to be able to generate a query that is then executed. I think this
is a common scenario, for example a pipeline might start with an XForms
instance representing user input from a browser form, and use XSLT or XQuery
to translate this instance into an XQuery which is then executed against an
XML database. The fact that the only things that can flow between steps in a
pipeline are XML documents, but an XQuery is not an XML document, clearly
makes this difficult. XQueryX might provide some kind of solution, but it is
not exactly an easy format for user applications to generate. The current
solution in the spec is to construct a query as text, and then wrap this in
a c:query element: the need for double-escaping is likely to make this very
error-prone, especially as XQuery's escape conventions are by design very
similar to those of XML. Personally, I think that because a large subset of
queries are in fact well-formed XML, we ought to be able to define some kind
of subset of XQuery that acknowledges this subset of the language and allows
it to be passed around directly (I think Orbeon does something like this
today). But that goes well beyond anything the WG has discussed.


Michael Kay
for the XQuery/XSL Working Groups.
Received on Wednesday, 4 June 2008 15:09:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:41:07 UTC