This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2610 - Is an invalid character reference a parse error?
Summary: Is an invalid character reference a parse error?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows 2000
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-19 19:29 UTC by Andreas Behm
Modified: 2006-02-14 14:23 UTC (History)
0 users

See Also:


Attachments

Description Andreas Behm 2005-12-19 19:29:46 UTC
In the XML Query Test Task Force we are not sure wether the following query
should be a parser error or some other static error:

<new>&#x0;</new>

The following rule in the grammer applies:

[153]    	CharRef 	   ::=    	[http://www.w3.org/TR/REC-xml#NT-CharRef]

The XML standard refers to character references as:
[66]   	CharRef	   ::=   	'&#' [0-9]+ ';'
			| '&#x' [0-9a-fA-F]+ ';'

and in a side note restricts the value set:
"Characters referred to using character references MUST match the production for
Char."
and "Char" excludes certain values:
[2]   	Char	   ::=   	#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
[#x10000-#x10FFFF]


The question for XQuery is: does the side note restricting range for character
references in the XML standard propagate into a parse error in XQuery, or does
there need to be a seperate error defined for this scenario.

Test case Constr-cont-charref-2 applies.
Comment 1 Don Chamberlin 2006-02-14 01:16:00 UTC
Andreas,
On 01 Feb 2006, the Query working group considered your comment and agreed that 
a character reference that is syntactically correct but does not identify a 
valid character should raise an error. The error code will be XQST0090 and the 
message will be "Character reference does not identify a valid character in the 
version of XML that is in use." If you find this resolution acceptable, please 
mark the Bugzilla entry closed. If we do not hear from you, we will close the 
entry at the end of February 2006.
Regards,
Don Chamberlin (for the Query working group)
Comment 2 Carmelo Montanez 2006-02-14 14:23:41 UTC
Don:

I am taking over Andreas work for now.  Bug closed and correct code
used for test suite.  Thanks for the work.

Carmelo Montanez