|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL, SQL, and trees (again)
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="directories"> <directories> <xsl:apply-templates select="item[not(contains(path,'.'))]"/> </directories> </xsl:template> <xsl:template match="item"> <directory name="{name}"> <xsl:apply-templates select="../item[matches(path,concat('^',current()/path,'.[^\.]$'))]"/> </directory> </xsl:template> </xsl:stylesheet> $ saxon8 table1.xml table1.xsl \!indent=yes <?xml version="1.0" encoding="UTF-8"?> <directories> <directory name="About"/> <directory name="Services"> <directory name="Environmental"/> <directory name="Landscaping"/> </directory> </directories>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|







