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 4233 - ":" in PI target names not a parsing error
Summary: ":" in PI target names not a parsing error
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 minor
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-16 12:50 UTC by Nick Jones
Modified: 2007-01-17 14:32 UTC (History)
0 users

See Also:


Attachments

Description Nick Jones 2007-01-16 12:50:15 UTC
I think the following test is invalid in expecting a parsing error XPST0003

(:*******************************************************:)
(: Test: K2-DirectConOther-22                            :)
(: Written by: Frans Englich                             :)
(: Date: 2007-01-12T16:19:58+01:00                       :)
(: Purpose: ':' is not allowed in PI target names.       :)
(:*******************************************************:)
<?invalid:char ?>


The BNF states

From XQuery:

[105] DirPIConstructor 	   ::=    	"<?" PITarget (S DirPIContents)? "?>"
[152] PITarget 	   ::=    	[http://www.w3.org/TR/REC-xml#NT-PITarget]

From XML:

[17] PITarget	   ::=   	 Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5] Name ::=   	(Letter | '_' | ':') (NameChar)*

which I think allows ":" in the name
Comment 1 Martin Probst 2007-01-16 17:35:55 UTC
You have to look into the Namespaces in XML spec for that, see:
http://www.w3.org/TR/REC-xml-names/#Conformance

7. Conformance of documents
[...]
It follows that in a namespace-well-formed document:
* No entity names, processing instruction targets, or notation names contain any colons.

This spec also defines the NCName EBNF rule that replaces the original Name rule for PI Targets from the XML spec.
Comment 2 Nick Jones 2007-01-17 11:51:21 UTC
Thanks. Missed that.