--- Hussein Shafie <hussein at pixware.fr> wrote:
> James J. Ramsey wrote:
> > If the option "Save characters outside encoding as
> > entity references" is checked, then when I use the
> > insertCharByName dialog to insert the entity
> "&ldquo;"
> > into a DocBook file, the entity "&rdquor" gets
> written
> > to the file instead instead. 
> 
> There is a misunderstanding. Internally, XXE has no
> concept of 
> ``entity'' at all. See 
>
http://www.xmlmind.com/xmleditor/detailed_features.html#nonfeatures
> 
> Command insertCharByName does not insert an *entity
> reference* in a 
> DocBook *file*. It inserts a *character* in the
> *logical content* (AKA 
> infoset) of a DocBook document.

I kind of thought it worked that way. Trouble is, the
UI makes it appear as if XXE internally has a concept
of an entity reference. Someone who chooses "ldquo"
from the list of names in the insertCharByName dialog
is going to expect &ldquo; to appear in the text of
the XML that he/she is working. The appearance of the
dialog just invites that expectation.

> However, . . .
> by default, when the document is saved to a file,
> characters outside the 
> target encoding of the save file, such as "U+201C"
> for say ISO-8859-1, 
> are saved as "&XXX;" 

This implementation works as desired *only* if the DTD
declares either one or zero entity references for a
character outside the target encoding. It is perfectly
proper, however, for a DTD to declare more than one
entity reference for the same Unicode character, and
the DocBook DTD (in both versions 4.2 and the coming
4.3) does just that.


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools


Reply via email to