[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: FW: Dealing with mixed content
Tempore 19:31:36, die 02/15/2005 AD, hinc in
xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Paul Clarke
<pclarke@xxxxxxxxxxxxxxxx>:
Hello,Hi, This is a grouping problem. Numerous techniques are available for solving problems like this. Here you have one: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:key name="group" match="node()" use="generate-id((.. | preceding-sibling::hr)[last()])"/> <xsl:template match="block"> <xsl:copy> <xsl:for-each select="hr|."> <p> <xsl:apply-templates select="key('group',generate-id())"/> </p> </xsl:for-each> </xsl:copy> </xsl:template> <xsl:template match="sr | hr"/> <xsl:template match="font"> <f> <xsl:apply-templates/> </f> </xsl:template> </xsl:stylesheet>
|
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
|