[
Lists Home |
Date Index |
Thread Index
]
- From: Daniel Veillard <Daniel.Veillard@w3.org>
- To: "Aurenz, Scot" <SAurenz@Rational.Com>
- Date: Wed, 10 May 2000 12:38:02 +0200
On Tue, May 09, 2000 at 01:53:50PM -0400, Aurenz, Scot wrote:
> > Is there an easy way to process an XML document and put the entity
> > references back into it?
>
> I've been grappling with this same problem.
I'm struggling with that right now actually...
Same for me in the libxml parser assuming it's about charref and not
entity ref:
I'm currenlty opting to the following resolution:
- a charref should not produce a different output at parsing stage
otherwise this mean one have to complicate the data model to store
them, and this open the door to too much side effects. It's already
hard enought to be able to save back entity references.
- the very distincion should be when saving. If one ask to save using
a given encoding, then the document data should try to be converted
as much as possible into the given encoding. This may not be possible
and in this case then a charref has to be generated for each character
not directly mappable in the target encoding.
If one ask to save without any specific encoding and if the original
document didn't specifies one, then an "ascii" default may be the
preferred option where anything outside the ASCII range is mapped
back to charrefs.
Of course implementing this while looking simpler than keeping
charrefs in the data model, is still sufficient to get serious headaches ...
> Do other parsers offer ways to disable entity translation?
I'm still wondering if the original question was entity or charrefs.
For entities I assume most implementations providing a Save function
keep entities references in the output (either via the interfaces or
the generated content/Infoset).
Daniel
--
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks :
Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe
***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************
|