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 5351 - [XPath] PI name test must require string literals that satisfy NCName rules
Summary: [XPath] PI name test must require string literals that satisfy NCName rules
Status: RESOLVED DUPLICATE of bug 6559
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 2.0 (show other bugs)
Version: Recommendation
Hardware: All All
: 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: 2008-01-08 18:29 UTC by Jim Melton
Modified: 2009-02-23 19:12 UTC (History)
3 users (show)

See Also:


Attachments

Description Jim Melton 2008-01-08 18:29:25 UTC
Bug 5269 (http://www.w3.org/Bugs/Public/show_bug.cgi?id=5269) reported the fact that the name test processing-instruction("123ncname") is a syntactically-valid XPath (and XQuery) expression, even though the string literal "123ncname" cannot be transformed into a valid PITarget (which must be an NCName).  

We've closed Bug 5269 because it was reported as an XQueryX problem, which it is not.  This bug was opened to capture the problem for XPath.
Comment 1 Jim Melton 2008-01-08 18:30:38 UTC
The name test shown in this bug report will always result in a dynamic error.  In its teleconference on 2008-01-08, the WG decided (because the error, caused by a string literal, can be caught statically) to make it a type error (XPTY0004) if the string literal of a PI name test cannot be converted to an NCName. 
Comment 2 Michael Kay 2008-01-08 21:59:23 UTC
Just a reminder that whoever drafts the erratum on this should add an entry to the XPath 1.0 backwards compatibility appendix. In XPath 1.0, (and in XPath 2.0 until today), processing-instruction('123abc'), like @comment(), was a legitimate if perverse way of denoting the empty node-set.
Comment 3 Jim Melton 2008-01-23 15:26:06 UTC
*** Bug 5355 has been marked as a duplicate of this bug. ***
Comment 4 Tim Mills 2008-11-28 09:48:38 UTC
To resolve Bug 6238, could you please clarify whether

"...PI name test cannot be converted to an NCName."

means that

processing-instruction("b ")

raises XPTY0004, or is equivalent to 

processing-instruction("b")

because "b " can be converted to an NCName using xs:NCName("b ").


Comment 5 Jonathan Robie 2009-02-23 19:12:52 UTC

*** This bug has been marked as a duplicate of bug 6559 ***