[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT and XQuery


xquery identity transform

> -- 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
references.

<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.

David

_____________________________________________________________________
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.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.