Re: [XQueryX] 5 A Trivial Embedding of XQuery

I agree that making the section explictly non normative would be helpful
but I cannot agree with this:

  Section 5 was 
  intended, not to specify a normative way to do a trivial embedding of 
  XQuery in an XML document, but to demonstrate that the subject has been 
  considered and to suggest some (certainly not all!) approaches that a user 
  might follow if a trivial embedding is required for his or her purposes.

There is effectively only one way that an Xquery can be placed in XML:
treat it as a string, quote all XML markup and place it in element or
attribute content. Of course the actual quoting may use any one of
several equivalent XML quoting syntaxes, CDTATA sections, predefined
entities, or numeric character references, there is no need to elaborate
those choices here.

However the current section seems to indicate that unless it has a
mismatched < and so directly embedding the unquoted query would produce
non-well formed XML, the Query can be simply inlined without quoting
into an XML document.  As I tried to indicate this is a very dangerous
practice that (because of different meaning for the same syntax of
character references in XML and Xquery) may cause misinterpretation of
the Query: what is, apparantly, a single Xquery string can become
arbitrary Xquery code. The section should explictly warn against that,
unless the treatment of &#1234; in XQuery can be changed to match the
behaviour that would result from first parsing the Xquery as a fragment
of XML.

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Received on Thursday, 15 January 2004 05:00:20 UTC