OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XSLT and XQuery

[ Lists Home | Date Index | Thread Index ]

> -- XQuery should normatively reference XPath 2.0 for the PathExpr grammar
> production rather than duplicating it -- if at all possible. XQuery should
> normatively reference as many productions in XPath 2.0 as possible

while poltically that's probably a good idea, I don't think it'll make
much difference in practice, the xpath2 and xquery grammars are
generated from the same source so they will be in sync, so whether they
appear in both drafts or whether one draft refers to the other doesn't
really matter.

However the main apparent incompatibility between xpath as used in
xslt and xpath as used in xquery is the use of character and entity

<a b="{'a&apos;=&apos;b'}">

produces (I think)

<a b="true"> in XSLT and <a b="'a'='b'"> in Xquery, despite the fact
they are both using the same grammar here for the Xpath parts, Xquery
merges the XML grammar productions into the Xpath string production
whereas XSLT does an XML parse before parsing as Xpath. If this could be
fixed then I believe there aren't really any "compatibilty" problems
between Xquery and Xpath.

The non XML syntax in Xquery such as <a b={'a&apos;=&apos;b'}>
is actually _less_ of a problem as that isn't well formed XMl so there
is no chance of an Xquery "identity transformation" silently changing it
into <a b={'a'='b'}> as may happen with the "well formed XML"
Xquery <a b="{'a&apos;=&apos;b'}"> which an XML identity transform will
convert to a different Xquery: <a b="{'a'='b'}"> (which probably doesn't
typecheck, but is still something that you don't expect to happen from
an "identity" transformation.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS