Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML declaration in DTD System ID? ...

From: cmsmcq@---.--- (-. -. ----------------)
To: NULL
Date: 7/13/2009 5:20:00 PM
Russell Potter <russ.potter@b...> writes:

>> How do you write an element declaration for an element type with a
>> name containing non-ASCII characters?
>
> Wouldn't you just use a character entity? ("&#XX;") for
> each sppearance of such a non-ASCII charaacter within
> the element declaration'a name?

Er, no, you wouldn't.  

Neither general entity references nor numeric character
references are recognized in declarations in a DTD; they may be
included in the replacement text of entity declarations, in
attribute-value literals, processing instructions, system
identifiers, and comments, but not in the Name paramter of an
element declaration (or for that matter at any other location
except those indicated).

References (whether entity references or character references)
are recognized in places where the spec explicitly mentions
them in the grammar (e.g. in the declarations for entity values
and attribute values [EntityValue and AttValue]) or in the
prose (e.g. in the definition of markup at the beginning of
section 2.4), but not everywhere.  This sometimes takes
readers by surprise if they come to XML from environments 
where character escaping is handled in a way more or less
completely oblivious to context.   XML gets its handling
of references from SGML, where most constructs including
references are recognized in some contexts and not
recognized in others.  

Good luck with your parser.

Michael Sperberg-McQueen

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent