[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Use of colon in ID


use of colon
If you use XMLCharacterProperties.validNCName, it should return false.
XMLCharacterProperties.validName verifies that is a valid name per the XML
1.0 spec, and colons are allowed in names by XML 1.0 (and IDs conform to the
"Name" construct of that spec). XMLCharacterProperties.validNCName verifies
that it is a valid NCName per the XML Namespaces rec, and an NCName cannot
contain any colons. XML Namespaces places further constraints on names
beyond XML 1.0. Specifically, XML Namespaces states that element and
attribute names must match the QName construct, and all other XML constructs
that match the "Name" construct of XML 1.0 must be NCNames, so IDs must not
contain colons.

I suspect that if you configured Xerces to not be namespace-aware, then it
would not raise an error for an ID containing a colon. But if you want to be
compatible with XML Namespaces, you'll need to avoid IDs with colons.


> -----Original Message-----
> From: Justin Lipton [mailto:justin@s...]
> Sent: Thursday, November 29, 2001 1:00 PM
> To: xml-dev@l...
> Subject:  Use of colon in ID
> 
> 
> 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.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.