[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Turning css (font-weight:bold) attributes into tag
Abel Braaksma wrote:
This example template assumes $input with 'span' elements and only text therein, but it is build with expansion in mind, so it won't be too hard to make it work with nodes inside 'span'. A little bug crawled into the stylesheet, throwing away any attributes you'd have in the $css-mapping table. Change the treewalker to the following and it's fixed: <!-- simple treewalker template to go from flat to hierarchical --> <xsl:template match="* | @*" mode="flat-to-hier"> <xsl:param name="text" tunnel="yes" /> <xsl:copy> <xsl:apply-templates select="@* | following-sibling::*[1]" mode="#current"/> <xsl:sequence select="if(following-sibling::*) then '' else $text" /> </xsl:copy> </xsl:template>
|
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
|