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] The use of XML syntax in XML Query

[ Lists Home | Date Index | Thread Index ]

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





 

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

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