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 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.
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.
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.
*** Bug 5355 has been marked as a duplicate of this bug. ***
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 ").
*** This bug has been marked as a duplicate of bug 6559 ***