[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

  • To: xml-dev@l...
  • Subject: RE: The use of XML syntax in XML Query
  • From: Chris MacDougall <CMacDougall@w...>
  • Date: Fri, 4 Jan 2002 14:08:18 -0500

chris macdougall


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!

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.