Lists Home |
Date Index |
At 2005-03-26 15:12 +0100, Christof wrote:
>element and attribute names may include a colon character in their name
>as far as I understand the XML specification.
By XML 1.0 technically yes, but the second note in section 2.3 after
production  states: 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.
Note the use of "should" and "must" ... which is why I said "technically yes".
>therefore something like the following should be possible:
> <x xmlns:prefix="exampleuri"
By XML Namespaces 1.0 no.
According to the productions in XML Namespaces 1.0:
 QName ::= (Prefix ':')? LocalPart
 Prefix ::= NCName
 LocalPart ::= NCName
Where "NCName" is a "no colon name", that is, name characters not including
the colon. And, since it is obvious you are using features of XML
Namespaces by the namespace declaration, the rules of XML Namespaces
certainly apply and you cannot fall back solely on the technicality of XML.
So, two colons are not allowed in a name in your situation.
I hope this helps.
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal