cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: HTMLParser
Date Tue, 07 Sep 2004 12:39:40 GMT
HTMLGenerator followed by a stylesheet:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:stylesheet>

should do it. The default behaviour of XSLT is to strip tags. So that 
simple stylesheet should give you what you want.

You could improve it with:

<xsl:template match="/">
  <xsl:apply-templates select="/html/body"/>
</xsl:template>

Which would only give the text for the body of the page.

Regards, Upayavira

 
Adriano Smith wrote:

> Is there any html parser in cocoon that can strip a html page of all 
> the tags and return only text content?<br> <br> I want to read a mail, 
> and print only the text contents and avoid all the html content.<br> 
> <br> how can this be done? 
> <http://ads.sify.com/RealMedia/ads/click_nx.ads/mail.sify.com/sentmail@Bottom>





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


Mime
View raw message