- From: David Carlisle <davidc@nag.co.uk>
- Date: Sat, 5 Jan 2002 15:51:30 GMT
- To: jonathan.robie@softwareag.com
- CC: www-xml-query-comments@w3.org, xml-dev@lists.xml.org
> XQuery's element constructors are not well-formed XML only with attribute > constructors that do not use the quoted syntax: > > <foo bar={ //baz } /> No, Xquery is _never_ well formed XML. In this case it doesn't look like XML at all but even if the "attribute" value is surrounded with "" it still is not XML. <foo bar="{ //baz }" /> looks like XML but if it _was_ XML then it would be equivalent to <foo bar="{ //baz }" /> If Xquery wants to have element constructors that are well formed XML then it should ensure that XML constructs work as they do in XML. > I think it would also be quite reasonable to come up > with a standard dummy element to wrap around an XQuery so that you *can* > embed an XQuery in a document in a standard way This can not work with the present Xquery semantics for &# which is not compatible with viewing Xquery as an XML fragment. > But requiring all queries to be in an XML document seems like > overkill to me. I think that it is unreasonable to use XML syntax without doing this. > Unifying the remaining portion of XQuery and all of XSLT would > certainly take a significant amount of time -- I do not think that unifying with XSLt is so important (although it would be nice) as not abusing XML syntax. Xquery should drop the XML style syntax or be an XML format. > I certainly agree that it must be possible to write XQuery, including > element constructors, in a way that is well-formed XML. This is possible > today. It does not require deeper integration with XSLT. Xquery is never well formed XML in any meaningful sense. Even when it meets the syntax of XMl an XML parser will have different interpretation of the string so you can not reliable use anything returned by the XML parser as input to an Xquery: It can easily end up being a legal Xquery but with different menaing from the original before the XMl parse. 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.
Received on Saturday, 5 January 2002 10:51:51 UTC