[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to output partial elements?
Hi Jem, Something like?... == XSL ================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="kPreceding-normal" match="record[@type != 'normal']" use="generate-id(preceding-sibling::record[@type='normal'][1])"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="record[@type='normal']"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:copy-of select="node()|key('kPreceding-normal',generate-id())/node()"/> </xsl:copy> </xsl:template> <xsl:template match="record[@type!='normal']"/> </xsl:stylesheet> == end of XSL ============================= Hope this helps Marrow http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger) http://www.topxml.com/Xselerator 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
|