>From the namespaces spec:

------------------------------
6. Conformance of Documents
In XML documents which conform to this specification, element types and
attribute names must match the production for QName and must satisfy the
"Namespace Constraints".

An XML document conforms to this specification if all other tokens in the
document which are required, for XML conformance, to match the XML
production for Name, match this specification's production for NCName. 

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. 
------------------------------


Wouldn't that cover it?

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]



-----Original Message-----
From: Perry A. Caro [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 3:22 PM
To: [EMAIL PROTECTED]
Subject: Colons in PI target names?


Consider the following simplified XML example:

================
<?xml version="1.0" encoding="UTF-8"?>

<?xml:stylesheet href="Subject.css" type="text/css"?>
<Subject>
</Subject>
================

When I run this through Xerces-C 1.4 stable SAX2XMLReader, with namespace
handling enabled, I get the following error:

 Colons are not allowed in this name when namespaces are enabled#126

It's complaining about the Processing Instruction target, xml:stylesheet.

The relevant code is in XMLScanner.cpp, in scanPI:

    // If namespaces are enabled, then no colons allowed
    if (fDoNamespaces)
    {
        if (XMLString::indexOf(namePtr, chColon) != -1)
            emitError(XMLErrs::ColonNotLegalWithNS);
    }

Can someone cite the XML or Namespace spec section which indicates that
colons are not allowed in Processing Instruction target names?  I'm really
surprised by this.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to