[Expat-bugs] [ expat-Bugs-1465456 ] PI targets with ":" broken by namespace support

SourceForge.net noreply at sourceforge.net
Thu Apr 6 13:49:29 CEST 2006


Bugs item #1465456, was opened at 2006-04-05 22:03
Message generated for change (Comment added) made by kwaclaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1465456&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: PI targets with ":" broken by namespace support

Initial Comment:
Processing instruction targets are allowed to contain ':' by the XML 1.0 specification, and in fact such processing instructions are used e.g. for XML Architectural Forms (see http://www.hytime.org/ for more info on those.)

Expat versions 1.95.8 and 2.0.0 fail to parse such processing instructions when namespace support is enabled; they consider the ':' to be an invalid character.

For an example in the wild, see the W3C's XHTML Basic 1.0 architectural forms module:

http://www.w3.org/TR/xhtml-basic/xhtml-arch-1.mod

Parsing fails at the first colon in the IS10744:arch processing instruction when namespace support is enabled.

$ cat foo.xml
<?pi:target?><foo/>
$ xmlwf foo.xml # works OK
$ xmlwf -n foo.xml # BUG: fails 
foo.xml:1:4: not well-formed (invalid token)

With the attaches patch this file is parsed correctly.

----------------------------------------------------------------------

>Comment By: Karl Waclawek (kwaclaw)
Date: 2006-04-06 07:49

Message:
Logged In: YES 
user_id=290026

OK, then I guess we can close this issue.

----------------------------------------------------------------------

Comment By: Benjamin C. W. Sittler (bsittler)
Date: 2006-04-05 23:01

Message:
Logged In: YES 
user_id=645359

Indeed, you are correct. Apparently that was a typo in the
W3C's DTD module!


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-04-05 22:26

Message:
Logged In: YES 
user_id=290026

In the XML Namespaces specification
(http://www.w3.org/TR/1999/REC-xml-names-19990114/), check
out section 6, here is a quote of the relevant paragraph:

<quote>
The effect of conformance is that in such a document:

    * All element types and attribute names contain either
zero or one colon.
    * No entity names, PI targets, or notation names contain
any colons.
</quote>

So I think Expat is correct.


----------------------------------------------------------------------

Comment By: Benjamin C. W. Sittler (bsittler)
Date: 2006-04-05 22:08

Message:
Logged In: YES 
user_id=645359

P.S. Ooops, forgot to log in first -- I was the original
submitter. (bsittler at gmail.com)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1465456&group_id=10127


More information about the Expat-bugs mailing list