|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: splitting the content at each and every element
Ganesh Babu N wrote:
My input : This would do: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="para">
<parastyle>
<xsl:apply-templates/>
</parastyle>
</xsl:template> <xsl:template match="para/text()">
<characterstyle style="para">
<content>
<xsl:value-of select="."/>
</content>
</characterstyle>
</xsl:template> <xsl:template match="para/*">
<characterstyle type="{name()}">
<content>
<xsl:apply-templates/>
</content>
</characterstyle>
</xsl:template> <xsl:template match="article">
<text>
<xsl:apply-templates/>
</text>
</xsl:template></xsl:stylesheet> -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|
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
|






