[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Verboseness - XML Syntax for XQuery 1.0 (XQueryX)
- From: Vassilis Papadimos <vpapad@cse.ogi.edu>
- To: Dylan Walsh <Dylan.Walsh@kadius.com>
- Date: Thu, 14 Jun 2001 11:25:34 -0700
On Thu, Jun 14, 2001 at 11:21:11AM +0100, Dylan Walsh wrote:
> >
> At the bottom of this email is an excerpt. 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
> aswell. 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.
I don't think the XQueryX syntax was intended to be particularly
human-writable, or even human-readable. To quote from the lastest
XQuery doc.:
"The Query Working Group has identified a requirement for both a human-readable
query syntax and an XML-based query syntax. XQuery is designed to meet the
first of these requirements. For an alternative, XML-based syntax for
the XQuery semantics, see [XQueryX 1.0] "
You can find similar language in the introduction to XQueryX. I think the
primary purpose was to have an easy-to-parse format, that
reflects the structure of the query. It's like an intermediate language
in a compiler, between the programming language and the assembly language,
that's easier for tools to work on.
For what it's worth, with my DB background, i don't feel
"alien" at all with the textual format of XQuery (and Quilt, XML-QL etc.),
while I find XSLT rather hard to read and write. Maybe it's because
I don't have any specialized tools for that, and just use regular text
editors?
To my XSLT-untrained eyes, it seems that I have to read/write much more
code that I would write in SQL/XQuery (primarily because of the endless
closing tags you see at the end of every XSLT program!)
Maybe it all comes down to design goal #10 of XML:
10. Terseness in XML markup is of minimal importance.
Oh well!
Best regards,
Vassilis.