W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

FW: XML Declaration

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Wed, 4 Feb 2004 10:35:30 -0800
Message-ID: <EDB607C8AC991F40BE646533A1A673E80130B694@RED-MSG-42.redmond.corp.microsoft.com>
To: <public-qt-comments@w3.org>
Cc: <kien.lee@rainingdata.com>

Forwarding to public comments list.

All the best, Ashok

-----Original Message-----
From: Kien Lee [mailto:kien.lee@rainingdata.com] 
Sent: Wednesday, February 04, 2004 10:19 AM
To: Ashok Malhotra
Subject: RE: XML Declaration

Dear Ashok Malhotra,

So, please clarify my understanding:
1. Is it a violation of the spec to put the xml declaration prolog in an
XQuery expression as the example in the original e-mail below ?

2. If it is a violation of the spec, what should an XQuery parser do
when it sees it ?

3. Since the XQuery document constructor is defined as:
[99]    CompDocConstructor    ::=    "document" "{" Expr "}" 
and the processing instruction constructor is defined as:
[107]    XmlPI    ::=    "<?" PITarget Char* "?>" /* ws: explicit */ 
[18]    PITarget    ::=    NCName 
Note: this is different from the XML 1.0 spec where processing
instruction can not have the reserved word (('X' | 'x') ('M' | 'm') ('L'
| 'l')) and is defined as:
[16]    PI    ::=    '<?' PITarget (S (Char* - (Char* '?>' Char*)))?
'?>' 
[17]    PITarget    ::=    Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
So, is it a violation of the spec if I write the following XQuery
expression on an XQuery implementation that does not automatically add
the XML declaration to a document node ?
document
{
 <?xml version='1.0'?>
 <x>
  My Query result
 </x>
}

Many thanks,
Kien
Received on Wednesday, 4 February 2004 13:35:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:57 UTC