xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Tatu Saloranta <cowtowncoder AT yahoo.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] entities
- Date: Mon, 24 Jul 2006 11:37:41 -0700 (PDT)
--- Kostas Maistrelis <pinakas AT gmail.com> wrote:
> I want to make a procedure that returns the same
> result with the method
>
> document.toXml()
>
> with one difference:
> I want to leave the entities without a translation
> (Like the current
> behavior of toXML() method for the & entity)
Actually, I do not think it is left without
translation: rather, it's probably re-translated? That
is, underlying parser decodes the character, and
serializer encodes it again in content.
> For example i want to build a document and then to
> get back the same
> view with a procedure like the toXml() method.
..
> Is that possible to happen?
Entity expansion is done by the low-level parser, not
by XOM. It would be possible to store information
about specific entities (SAX at least sends entity
expansion events), but since this is extra effort and
usually not needed, few if any xml processors try to
do it. And even if they did, it would not be possible
to generally just output entity as is: output document
may define different DTD with different entities.
Easiest way to do this would probably be to write a
custom serializer that can replace references from
textual content with entities.
Hope this helps,
-+ Tatu +-
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
[XOM-interest] entities,
Kostas Maistrelis, 07/24/2006
- Re: [XOM-interest] entities, Tatu Saloranta, 07/24/2006
Archive powered by MHonArc 2.6.24.