At 23:39 12/01/2009, John Delacour wrote: >(...) >A couple of weeks ago, having discovered some time ago that I could >include spaces in ids and get no complaints from browsers, I went to >validate a file at W3 and discovered that this is not legal and I >must separate words with underlines rather than spaces. No great >inconvenience but I'm not sure why spaces in ids should be frowned >upon. Can anybody exaplain?
The simplistic answer is: because the ID-type was defined that way. But why was the ID-type defined that way? As far as I know, this issue dates back to SGML, which also had attribute types such as IDREF and IDREFS. An IDREF-type attribute references a single ID elsewhere in the document (simplistic analogy: fragment identifiers in HTML); an IDREFS-type attribute references one or more IDs elsewhere in the same document, by means of a space-separated list. As far as I know, that's why IDs in SGML couldn't contain spaces, and XML inherited this feature. (In SGML and XML, IDs need to be unique names, and "names" can't contain spaces. See Eric van Herwijnen: "Pracical SGML" 2nd ed, p. 74-75, and the definition of "Name" in XML 1.0 5th ed: <http://www.w3.org/TR/2008/REC-xml-20081126/#dt-name>.) Best regards, Christophe -- Christophe Strobbe K.U.Leuven - Dept. of Electrical Engineering - SCD Research Group on Document Architectures Kasteelpark Arenberg 10 bus 2442 B-3001 Leuven-Heverlee BELGIUM tel: +32 16 32 85 51 http://www.docarch.be/ --- Please don't invite me to LinkedIn, Facebook, Quechup or other "social networks". You may have agreed to their "privacy policy", but I haven't. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ------------------------------------ ----- To unsubscribe send a message to: [email protected] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

