[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How can I put entity refs back into a document?

  • From: Daniel Veillard <Daniel.Veillard@w...>
  • To: "Aurenz, Scot" <SAurenz@R...>
  • Date: Wed, 10 May 2000 12:38:02 +0200

keep entity refs
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@w... | 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@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.