RE: Verboseness - XML Syntax for XQuery 1.0 (XQueryX)

Thank you for taking the time to write that response.

>An XML syntax designed to foster hand-written queries would probably be

>quite different from XQueryX, and would make different design choices.
For 
>instance, the paths would probably be left unexpanded, as in XSLT.

This is what I am in favour of, either as a compliment to, or a
replacement for, text queries. I believe the arguments for having, say
XML Schema use an XML syntax apply equally well to XQuery - e.g. you can
use all of you XML tools etc. to process them. For example developers
might generate documentation for their queries using XSLT. XQueryX may
be too complicated for most people to do this without studying XQuery in
great detail.

>XQuery's element constructors are already quite similar to XSLT
template 
>bodies. They allow any XQuery expression to appear within them, and
this is 
>the main difference between XQuery element constructors and XSLT
template 
>bodies.

One of my gripes is that the "elements" are not really elements, and
e.g. the syntax for attributes would actually be badly-formed if it were
used in an XML file e.g. 

<element attribute={$queryResult} />

More generally, because the query is text, and so any XML in it is
"pseudo XML", there is much reinventing of wheels. For instance, I've
noticed you have a keyword for specifying namespaces, where as there
already is a mechanism in XML for doing this using attributes. Similarly
there is an issue (#44) over the encoding format, with a proposal of yet
another keyword, whereas XML caters for this already in the declaration.
For these reasons I believe an XML query language should be formulated
in XML syntax. XSLT shows that it is possible to merge result data into
XML, and specify this using XML syntax. I'm not suggesting XQuery be
just a few extensions to XSLT, I know its serves a different purpose.
However XQuery could adopt what is a clear and intuitive part of XSLT,
the template bodies and the use of XML syntax.

It does not appear that there is any mass-movement supporting my
position, as it seems to be accepted that an XML query language should
be a lot like SQL in the way its syntax is expressed. I may be in a
minority who like XSLT and dislike SQL :-) XSLT can be cryptic at times,
but XQuery has already adopted the most cryptic part of XSLT - XPath. 

In any event, if my position runs contrary to the consensus, I will have
to accept it as inevitable
[ ..and spend the rest of my days grumbling that XQuery is "an XML
standard for people who don't like XML, by people who don't like XML".
:-) ]

> -----Original Message-----
> From:	Jonathan Robie [SMTP:Jonathan.Robie@SoftwareAG-USA.com]
> Sent:	Wednesday, July 11, 2001 5:46 PM
> To:	www-xml-query-comments@w3.org; Dylan Walsh
> Subject:	Re: Verboseness - XML Syntax for XQuery 1.0 (XQueryX)
> 
> Hi Dylan,
> 
> I am responding to the following message on behalf of the W3C XML
> Query 
> Working Group, which has reviewed this response:
> 
> http://lists.w3.org/Archives/Public/www-xml-query-comments/2001Jun/001
> 8.html
> 
> You make two points in this email, which we shall address separately.
> 
>  > As you can see, the equivalent XML is very,
>  > very long-winded. It is using an element syntax
>  > for the XPath expressions, and it also heavily
>  > expands the XQuery parts as well. When I heard
>  > about the XML Syntax, I thought that was an
>  > excellent developement, as an alternative to the
>  > existing text syntax, with its pseuodo elements etc.
>  > However this XML Syntax below is such
>  > that it is unlikely to be used for hand written querys.
> 
> We designed XQueryX to be readable by programs, not by humans. The 
> fundamental requirement was that this representation show the full 
> structure of the query, including expansion of the paths. XQueryX is
> not 
> intended to be used directly by end-users, and we agree that it is
> unlikely 
> to be used for hand-written queries.
> 
> An XML syntax designed to foster hand-written queries would probably
> be 
> quite different from XQueryX, and would make different design choices.
> For 
> instance, the paths would probably be left unexpanded, as in XSLT.
> 
>  > Could they not have a version with normal XPath and
>  > perhaps provide a return syntax which is similar to an
>  > XSLT template body? I think they should strive to make
>  > XQuery consistent with XSLT rather than SQL. Both
>  > XQuery and XSLT perform broadly similar tasks - take nodes
>  > specified by an XPath expression and return nodes based on
>  > literals. XSLT is a widely used XML standard with which many
>  > XML programmers are familiar. As it stands, the text syntax is
>  > completely alien to SQL programmers anyway.
> 
> XQuery's element constructors are already quite similar to XSLT
> template 
> bodies. They allow any XQuery expression to appear within them, and
> this is 
> the main difference between XQuery element constructors and XSLT
> template 
> bodies.
> 
> We appreciate your feedback on the XML Query specifications. Please
> let us 
> know if this response is satisfactory. If not, please respond to this 
> message, explaining your concerns.
> 
> Jonathan Robie
> On behalf of the XML Query Working Group 
> 

Received on Thursday, 12 July 2001 11:28:45 UTC