Re: Use of spaces in XML Elements

Hi Raymond,

> Is there a formal statement regarding the use of spaces in XML
> Element names?

Yes. The XML 1.0 Recommendation [1] states that element names must be
Names. Names adhere to the following BNF:

  Name     ::=    (Letter | '_' | ':') (NameChar)*
  NameChar ::=    Letter | Digit | '.' | '-' | '_' | ':' |
                  CombiningChar | Extender

None of Letter, Digit, CombiningChar or Extender contain spaces.
Therefore element names cannot contain spaces.

XML Schema does not change the basic syntax of XML - you cannot use
XML Schema to specify elements with spaces in their names.

Cheers,

Jeni

[1] http://www.w3.org/TR/REC-xml

---
Jeni Tennison
http://www.jenitennison.com/

Received on Monday, 12 November 2001 05:14:09 UTC