Is it possible to create a generic XSLT stylesheet to strip all tags from an XML file such that only #PCDATA text is output and all long lines are nicely formatted up to 80 characters keeping existing words together?

Pavel Tavoda

This is doing a good job for me:

<xsl:template match="/">

<xsl:template match="text()">
MATCH: <xsl:value-of select="."/></xsl:template>

If you need formating then I guess it is better to output HTML. If you really need pure text output then use the JavaScript extension in XSLT and format your text in JavaScript.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact