From: TAKAHASHI Masayoshi Date: 2001-11-16T12:14:00+09:00 Subject: [ruby-talk:25376] Re: ANN: REXML 1.1a3 Hi, David Alan Black wrote: > > When you *read* an XML source, '&', '<', and '>' are converted to > > '&', '<', and '>' automatically for you, for convenience; all other > > entities are ignored. Unquoted '&', '<', and '>' generate errors. > > What if I've defined an entity? (And there are the other two > built-ins, but I think you've added handling for those.) For example: IMHO, we need EntityReference class to hold unparsed entity information. But, a) predefined entity (always can be resolved) ex. > < & ' " b) character reference (maybe can be resolved) ex. /&#[0-9]+;/ or /&#x[0-9A-Fa-f]+;/ c) internal entity (can be resolved if parser knows DTD) ex. /&\w+;/ and d) external entity (can be resolved if parser can read external DTD) ex. /&\w+;/ and are different problems, and need different solutions. Regards, TAKAHASHI Masayoshi (maki@inac.co.jp) # Oops, I forgot PEReference...