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 ]


> The basic idea is that any construct in XQuery that looks like XML is a 
> constructor for the same construct. 

Yes that's clear but I believe that this is fundamentally flawed as it
means that Xquery is a new non-xml textual format in which XML syntax is
used in ways incompatible with XML. On the surface it looks a bit lie
XSLT's "literal result elements" but it is completely different in the
way it works.

>  What 
> would the following query construct:

As in XSLT you would have to specify what it meant. In the case of
comments you would probably (as I mentioned in my first mail)
have to introduce a new constructor. as the comments would presumably
just be comments in the query not constructors.

> I prefer to be able to use the straight XML syntax, as in the current WD.
But it is not XML syntax it is just syntax that looks a bit like some
bits of XML. That is the problem.

> My assumption has been that queries would be written in Unicode. 
but what does that mean?
Unicode is a set of characters but what is the encoding used? utf16? utf8?

> or because internationalization is not a concern for the 
> given installation.
It may not be a concern at some site, but it should be a concern of
those producing the spec.


> However, perhaps it would make sense to require 
> XQuery processors to also accept queries in an XML document that simply 
> embeds the query in an element:

currently the only safe way to embed Xquery in XML is to stick the whole
lot in a CDATA section or equivalently quote each < Your suggestion 
would be I think to further push the idea that the <xxx> syntax of an
element constructor might be embedded in XML as an xxx element. But that
is surely a mistake, as Xquery is not XML.

> How important is it to be able to write queries in any encoding you
> want? 

If you want to get an answer to that question, don't ask an English
mathematician:-) It was thought crucially important in the design of
XML. Have you (the Query WG) asked the W3C I18n group to review this issue?


> True, but is this difference really interesting? 
I find the difference between getting a string and getting a boolean value
interesting, yes.

>  I would hope that the XSLT 
> author knows exactly what they are doing when they do that kind of XML 
> quoting,
> 
In typical situations they don't even know it is happening at all. If
you write out Xpath's from XSLT (for example) then ultimately it is the
system not the author that decides what encoding is used and whether any
particular character will be output as character data or a numeric
character reference.

> Actually, I think this would be a fairly significant change.
quite, that's why I think that it is important that it is done!


>  In XQuery, it 
> is important that element constructors are expressions that have a 
> well-known type, not a black-box way of creating nodes. Element 
> constructors should be present in both the grammar and the type system.

The tokens in the Xquery grammar can be infoset items resulting from a
preliminary XML parse, as in XSLT. You don't have to specify the grammar
down to the level of characters, thus duplicating so much of XML.

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.




 

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

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