You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Justin Lipton <ju...@ns.xn.com.au> on 2001/11/29 21:58:50 UTC

Colons in IDs

Hi,

I'm curious about the use of the colon character (":") in IDs -
As far as I can tell the spec says that they are permitted but not 
recommended.
Xerces 1.4.0's XMLCharacterProperties.validName method returns true for
IDs containing ||colons - yet when the document is parsed an error is 
returned.

Anyone know the status on the use of colons in IDs?

Thanks,
Justin.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Colons in IDs

Posted by Elena Litani <el...@ca.ibm.com>.
Justin Lipton wrote:
> 
> Hi,
> 
> I'm curious about the use of the colon character (":") in IDs -
> As far as I can tell the spec says that they are permitted but not
> recommended.

Which spec? ;)
XML Schema spec requires IDs to be of type NCName that forbits the use
of ":".
XML 1.0 spec, on the other hand, defines IDs of type Name, allowing
colon char.


> Xerces 1.4.0's XMLCharacterProperties.validName method returns true for
> IDs containing ||colons - yet when the document is parsed an error is
> returned.

XMLCharactersProperties conforms to XML 1.0.
However, it is an error for XML Schema to have an ID with colon char.
-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org