W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2007

Re: standard components edits

From: Alex Milowski <alex@milowski.org>
Date: Mon, 16 Apr 2007 09:35:29 -0700
Message-ID: <28d56ece0704160935p46e083aescae23dffacd15a79@mail.gmail.com>
To: public-xml-processing-model-wg@w3.org
On 4/16/07, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
>
>
> > Right now we're defining a step-vocabulary element for XQuery.
>
> And for Relax-NG, right.



No, we're not doing that right now, but we could (as I suggested).

> I think we could define an extra step vocabulary element for text
> > wrappers and then steps like relax can use that.
>
> You appear to be contradicting yourself -- I suggested defining a
> micro-component to wrap text above, and you said not needed. . .



No.  Right now the XQuery step can consume a special element wrapper
that it discards from the XQuery.  That is specific to that component and
has nothing to do with another micro-component.

> Unfortunately, XQuery isn't all text but may not have a document element
> > (e.g. the "declare namepace f="...";" in the prolog).  As such, that
> element
> > needs to be different.
>
> I don't see why.  The whole point of parse="text" is that it gives you
> _exactly_ what you want as the text content of the document element,
> for better or worse, with markup escaped and everything.  So why is a
> special case needed for XQuery?


Because the prolog of an XQuery doesn't always start with a document
element.  For example:


   declare namespace atom="http://www.w3.org/2005/Atom";
   /atom:feed/atom:entry

is a valid XQuery

The specification right now says that:

<query>
   declare namespace atom="http://www.w3.org/2005/Atom";
   /atom:feed/atom:entry
</query>

will be treated as:

   declare namespace atom="http://www.w3.org/2005/Atom";
   /atom:feed/atom:entry

I have it on my list to move that into a namespace.  Now, for XQuery,
the following is also legal:

<query>
   declare namespace atom="http://www.w3.org/2005/Atom";
   <atom:feed>{/atom:feed/atom:entry}</atom:feed>
</query>

and so the query element must be able to contain elements.  This isn't
the case for RelaxNG's compact syntax.  If we provided an input element
for that step, it would have xs:string content.


-- 
--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 Monday, 16 April 2007 16:35:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:50 GMT