Is it valid to use dtd entities in defining XML ids?
Mark Banner <[email protected]> Wed, 31 May 2006 21:42:51 +0100
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
I'm reviewing some code for a dialog in Address book and need some guidance. The submitter has defined an id in the xml for the dialog as: <textbox id="Home&StateAndZipCodeLeft.id;"> In the DTD it is defined as: <!ENTITY StateAndZipCodeLeft.id "State"> Is this valid? In the specification I have been pointed to (http://www.w3.org/TR/REC-xml/#sec-attribute-types) says the following: "Values of type ID MUST match the Name production." Name is defined as Name ::= (Letter | '_' | ':') (NameChar)* The submitter has since pointed out the text : The Names and Nmtokens productions are used to define the validity of tokenized attribute values after normalization (see 3.3.1 Attribute Types). How I read that section implies that the id as defined above is valid. Please can someone with more knowledge just confirm this for me? Thanks Standard8