[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: The use of XML syntax in XML Query
Chris MacDougall Sr. Software Engineer > WebTone Technologies - Where Company And Customer Connect Phone and Fax: 404-439-8390 Visit our website! <http://www.webtonetech.com> -----Original Message----- From: Jonathan Robie [mailto:jonathan.robie@s...] Sent: Friday, January 04, 2002 2:06 PM To: Evan Lenz; David Carlisle Cc: xml-dev@l... Subject: RE: The use of XML syntax in XML Query At 10:34 AM 1/4/2002 -0800, Evan Lenz wrote: >It's a reinvention because the interpretation of things like >"xmlns:foo='http://whatever.com'" is defined in terms of the (XML-like) >syntax, rather than in terms of the Infoset (or some data model, e.g. XPath) >that's abstracted away from the syntactic interpretation of namespaces as >defined in the XML Names recommendation. Most of the syntax of XQuery is not XML-like at all. Element constructors use the exact same syntax as XML elements, except that {} escapes back into native XQuery syntax. The fact that elements in XML can have namespace declarations means that we had to decide either to disallow them in element constructors or support them. We decided to support them, with the same meaning as in XML namespaces, but also to define how these declarations interact with the rest of the language. >This is just another symptom of >trying to use an XML-like syntax, rather than XML syntax itself. Actually, both XSLT and XPath 1.0 needed significant discussion of namespaces: http://www.w3.org/TR/xslt20/ http://www.w3.org/TR/xpath I don't think that just using an XML-based syntax makes namespace problems go away. >The complexity and redundancy resulting from the XML-like syntax is >significantly compounded by the subsequent attempt to support things that >look like XML namespace declarations. You would prefer that we not allow namespace declarations in element constructors? >Eventually you'll have to >cut-and-paste the entire XML Names recommendation, tweak it to show how it >interacts with "NAMESPACE foo=http://whatever.com", and then ask yourself if >XML Namespaces weren't already difficult enough to understand on their own. I think what I have already done is looked at the namespace spec, XPath 1.0, and thought about how that interacts with function definitions, expressions, and global namespace declarations. Do you think I'm missing anything in the current description? What specific parts of it did you dislike? >This endeavor seems a little disproportionate compared to the benefit gained >by not having to put a root element around every query. If just putting a root element around every query meant we no longer had to think carefully about namespaces, that would be worthwhile, but I don't think that's the case. Jonathan ----------------------------------------------------------------- The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl>
|
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
|