[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT and XQuery
> -- 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'='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'='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'='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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|