- From: Alex Milowski <alex@milowski.org>
- Date: Thu, 17 Jul 2008 07:26:10 -0700
- To: "Norman Walsh" <ndw@nwalsh.com>
- Cc: public-xml-processing-model-comments@w3.org, "Michael Kay" <mike@saxonica.com>
On Wed, Jun 25, 2008 at 11:08 AM, Norman Walsh <ndw@nwalsh.com> wrote: > [ For some reason I never received this, though it does appear in the archives.] > >> Michael Kay wrote: >> (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: >> >> http://lists.w3.org/Archives/Member/w3c-xsl-query/2008Jun/0000.html > > Unfortunately, this message is in a member-only archive and our WG > operates in public. I have replied privately to Andrew with my > thoughts asking him to please publish that message to the public > comments list. > >> 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. > > I don't feel strongly about it. Feedback from the XQuery WG on what > they believe is the right answer would be appreciated. > >> 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. > > I think our spec may be misleading on this point. I had imagined that c:query > was a wrapper around some well-formed XML. So you might write: > > <c:query> > default element namespace="http://www.w3.org/1999/xhtml" > <html> > <head> > <title>Dumb query</title> > </head> > <body> > </body> > </html> > </c:query> > > Is it really the case that there are queries which aren't well-formed > XML? And can we just not support them, or are they common? We had this discussion on one of our telcons quite awhile ago and the WG was notably against allowing this. In fact, I originally wrote the step to allow this and the consensus was it was a bad idea. The media type application/xquery is not well formed XML. I encourage the XQuery WG to define a media type that *is* a well formed subset of XQuery that is not XQueryX and then we'd have a leg to stand on. -- --Alex Milowski "The excellence of grammar as a guide is proportional to the paucity of the inflexions, i.e. to the degree of analysis effected by the language considered." Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 17 July 2008 14:26:48 UTC