- From: Alex Milowski <alex@milowski.org>
- Date: Tue, 17 Apr 2007 11:08:47 -0700
- To: "Norman Walsh" <Norman.Walsh@sun.com>
- Cc: public-xml-processing-model-wg@w3.org
- Message-ID: <28d56ece0704171108k262e55bdy9b0719a0c4fbe062@mail.gmail.com>
On 4/17/07, Norman Walsh <Norman.Walsh@sun.com> wrote: > > / Jeni Tennison <jeni@jenitennison.com> was heard to say: > | I'm with Henry on this. It makes no sense to me to not escape parts of > | XQuery just because they happen to look like elements. > > +1 > > And isn't it the case that XQuery can have angle bracketed things > that aren't XML anyway? > > <some-name { funky constructor goo } > > > Or did that all get dropped on the floor before it went to Rec? Looks like that is the case digging deeper into this. There are many, many queries where this is not the case. What is more likely the case is that you need to use the "declare namespace" in the prolog. For example: declare namespace atom="http://www.w3.org/2005/Atom /atom:feed/atom:entry[atom:id='...'] What I wanted to support was: <query xmlns="..."> declare namespace atom="http://www.w3.org/2005/Atom /atom:feed/atom:entry[atom:id='...'] </query> So that I don't have to escape: <query xmlns="..."> <atom:feed xmlns:atom="http://www.w3.org/2005/Atom"> <atom:title>...</atom:title> {/atom:feed/atom:entry[atom:id='...'] </atom:feed> </query> When I do this with eXist, I have a pipeline that escapes the query. Obviously, that has a flaw in that an embedded expression can have a unescaped '<'. The simplicity of the above for what might be a majority of the cases seemed like a really good idea. I'm still convinced it is a good idea but we'd need two elements--one for xml-treated-as-query and one for an string-content element that would contain any random XQuery. The later string-content element could be re-used for the RelaxNG step. Proposal: <c:text type="{media-type}"> ...</c:text> (contains xs:string content) This can be consumed by steps that need non-XML text media types like RelaxNG's compact syntax. This does not change what flows between steps on ports. It does mean that one has to use Henry's XInclude trick to construct one from a raw text datastream. I suppose they could use XSLT too. A completely separable bit is whether there is another element for XQuery as I've have *currently* written in the draft that has a non-escaped XML form of an XQuery. -- --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 Tuesday, 17 April 2007 18:09:51 UTC