RE: [xsl] RSS feeds and disable-output-escaping="yes"

Subject: RE: [xsl] RSS feeds and disable-output-escaping="yes"
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 6 May 2005 11:38:18 +0100
> Easy little XSL script I thought. The RSS feed has all the html in the
> 'description' tag escaped. I have used 
> disable-output-escaping="yes" to
> display the html, but I really need to be able to manipulate 
> some of the
> tags - the img tags in particular - I'd like to either remove 
> or reduce
> the width of the images (it is mostly user documentation for the
> WebOPAC).
> 
> Is there any way I can do this or do I need to pre-process 
> the rss feed
> before I feed it into the XSL transformer thingy.

It's likely that the HTML isn't well-formed XML, so you're going to have to
extract it as a string, put it through the tidy utility, parse it, and get
it back into the stylesheet in tree form before you can manipulate it at the
node level. 

I would tend to do this as a non-XSLT stage in a processing pipeline; you
could also do it by calling out to an extension function.

Michael Kay
http://www.saxonica.com/

Current Thread