[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XML spec: Why is colon ':' a NameStartChar?
- From: "Tony Graham" <tgraham@mentea.net>
- To: xml-dev@lists.xml.org
- Date: Tue, 3 Dec 2013 09:48:27 -0000 (GMT)
On Tue, December 3, 2013 8:41 am, Hermann Stamm-Wilbrandt wrote:
> Why is colon ':' a NameStartChar [A]?
Because it is.
> It produces XML parsing error.
Arguably, it produces a 'Namespaces in XML' [1] namespace-validity error.
> I found nothing in the errata [B], what am I missing?
That your XML processor supports both XML 1.0 and Namespace in XML 1.0 (or
1.1 and 1.1)?
Section 2.3, Common Syntactic Constructs, [2] of XML 1.0 includes this note:
The Namespaces in XML Recommendation [XML Names]
assigns a meaning to names containing colon characters.
Therefore, authors should not use the colon in XML
names except for namespace purposes, but XML
processors must accept the colon as a name character.
and Namspaces in XML 1.0 includes this definition [3]:
[Definition: A namespace-well-formed document is
namespace-valid if it is valid according to the
XML 1.0 specification, and all tokens other than
element and attribute names which are REQUIRED,
for XML 1.0 validity, to match the XML production
for Name match this specification's production for
NCName. ]
where NCName [4] is:
[4] NCName ::= Name - (Char* ':' Char*)
/* An XML Name, minus the ":" */
Regards,
Tony Graham tgraham@mentea.net
Consultant http://www.mentea.net
Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
XML, XSL-FO and XSLT consulting, training and programming
Chair, Print and Page Layout Community Group @ W3C
[1] http://www.w3.org/TR/xml-names/
[2] http://www.w3.org/TR/xml/#sec-common-syn
[3] http://www.w3.org/TR/xml-names/#Conformance
[4] http://www.w3.org/TR/xml-names/#NT-NCName
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]