Tobia Conforto <tobia.conforto <at> linux.it> writes:

> I have a data source from which I get SAX text nodes into my pipeline
> that contain escaped HTML entities and <br> tags.  In Java syntax:
> 
> "Lorem ipsum &mdash; dolor sit amet. <br> Consectetuer"
> 
> or, in XML syntax:
> 
> Lorem ipsum &amp;mdash; dolor sit amet. &lt;br&gt; Consectetuer
> 
> As you can see, the entities and <br> tags are escaped and part of the
> text node.
> 
> I cannot change this data source component, therefore I need a
> transformer to examine every text node in the stream, split it at the
> fake "<br>" tags, substitute them with <xhtml:br/> elements, and
> replace every escaped entity with the relevant Unicode character.

That's one of the rare cases where I consider <xsl:text
disable-output-escaping="yes"> a valid approach [1]. I don't know if there is
something comparable directly on the Java side.

Joerg

[1] http://www.w3.org/TR/xslt#disable-output-escaping


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to