cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: Serializer for d-o-e?
Date Sat, 09 Nov 2002 22:24:51 GMT
J.Pietschmann wrote:

 > Lenz, Evan wrote:
 >
 >> I understand why Cocoon disables the use of disable-output-escaping
 >> in XSLT.
 >> However, in my current project, which involves parsing XML results from
 >> Google containing escaped (and non-well-formed) HTML, I need to find
 >> a way
 >> to disable output escaping for certain sections of text, perhaps
 >> based on
 >> the presence of a special attribute or PI that I can generate when
 >> necessary. Does Cocoon provide a way of parameterizing an existing
 >> serializer to do this? Has anyone implemented such a serializer? I would
 >> think that such a customization of an existing XML serializer should be
 >> pretty simple, but the Cocoon serialization framework is so abstract
 >> that
 >> I'm having trouble finding the right code to extend or modify.
 >
 >
 > The answer is quite simple: you can't. D-o-e only works if the
 > XSLT processor serializes the result itself, the information
 > which text nodes are supposed to be d-o-e'd on output is not
 > transported through the SAX pipelines Cocoon uses for plumbing
 > it's components.


JAXP provides two special PIs to handle the case when serialization
isn't performed by the XSLT engine :
- <?javax.xml.transform.disable-output-escaping?> to start d-o-e and
- <?javax.xml.transform.enable-output-escaping?> to stop it.

See also
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-commons/java/external/src/javax/xml/transform/Result.java?rev=1.2

Hope this helps, but use it wisely !

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message