|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: RE: remove <b> and <br>+merge nodes
Try this stylesheet:
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" encoding="UTF-8" /> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="node()|*[not(self::br) or not(self::b)]"> <xsl:copy><xsl:apply-templates /></xsl:copy> </xsl:template> <xsl:template match="node()|*[self::br or self::b]"> <xsl:value-of select="." /> <xsl:apply-templates /> </xsl:template> </xsl:stylesheet> -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Fabrice Estiivenart <fe@xxxxxxxx> Sent: Thu, 22 Jan 2004 13:37:09 +0100 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: RE: remove <b> and <br>+merge nodes that's it, the main difficulty is to merge resulting text nodes into an unique one : for example : <p>my <b>tailor</b> is <br/> rich</p> should become : <p> #text : my tailor is rich <p> and NOT : <p> #text : my #text : tailor #text : is #text : rich <p> Fabrice At 07:15 22/01/2004 -0500, you wrote: Are you saying that you want to copy all elements except <b> and <br> and copy the contents of <b>? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








