[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] RE: xquery v1.1 tracking xquery x was Re: [xml-dev] RE: Declarative programming requires a different mindset
- From: "Michael Kay" <mike@saxonica.com>
- To: "'Dave Pawson'" <davep@dpawson.co.uk>,<xml-dev@lists.xml.org>
- Date: Thu, 15 Apr 2010 08:30:30 +0100
> Noting this as following the fp thread from David Lee,
> perhaps James Clark was right in using Scheme for DSSSL?
> Given (a b c) it is easy to find out what each term is with
> the language rules.
> XML follows that idea as Michael shows.
>
> Lesson there somewhere, that xquery failed to learn.
The use of context to disambiguate symbols in XPath 1.0 worked well enough
in a language of that size, but it's a nightmare in a language as big as
XQuery (especially with its extensions to Updates, Free Text, and Scripting,
not to mention vendor extensions). I think some people on the XQuery WG
realized this was going to be a problem from the start, but there was a lot
of pressure to make the language fully upwards compatible with XPath 1.0.
It's still hard to know whether the right decision was made - most users
aren't going to be troubled by the problems, it's mainly a problem for the
spec-writers and implementors. For users, the only impact is occasional
puzzlement that you have to write "delete node x" rather than just "delete
x".
Interestingly, some of the ambiguities in XPath 1.0 weren't noticed until
years later - for example there are two ways of parsing (/ and /*) and XPath
1.0 doesn't say which one to choose. XPath 2.0 clarifies that "and" is to be
read as child::and, that is, an axis step rather than an operator.
Discussions on finer points of syntax take an inordinate length of time on
the XQuery WG. In the XSLT WG, by contrast, there are rarely any such issues
(apart from the choice of names). So however tedious it might be for users,
the use of XML syntax makes life much easier for the language developers.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]