commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [Jelly] Proposal new xml tag xml:entity
Date Mon, 03 Feb 2003 18:13:53 GMT
From: "Incze Lajos" <incze@mail.matav.hu>
> On Mon, Feb 03, 2003 at 09:49:04AM +0100, Martin van den Bemt wrote:
> > So maybe there should be an xml:text tag to get this handled (don't use
> > xslt myself though) ?
> >
> I think it's better to have a <jsl:text> tag that accepts the
> disable-output-escaping="yes" attribute. You don't need any special
> xml tag just output an <entity name="copy"/> tag to the processing
> chain (the xml taglib will output it transparentely), catch it in
> a rule and use the jsl:text tag for it.
>
> One of my major headache right now is that (Don't want to give you
> bad tips, that in a document:
>
> <?xml version="1.0"?>
> <!DOCTYPE a [
> <!ENTITY x "y">
> ]>
> <a>&x;</a>
>
> the dom4j linrary will output (just something like what you want)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE a><a>&x;</a>
>
> in a simple read-in/write-out processing (e.g.:

AFAIK enabling the capture of internal DOCTYPEs (which is disabled by
default) should fix this. e.g. see the extra line I've added...


>  SAXReader xmlReader = new SAXReader();

xmlReader.setIncludeInternalDTDDeclarations(true);

> Document doc = xmlReader.read(argv[0]);
> XMLWriter writer = new XMLWriter(System.out);
> writer.write(doc);
> writer.flush();)
>
> which is not well-formed, so my processing pipe breaks at this point.
> At any "creative" solution you 'll find yourself similar problems.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message