[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Processing on both a document list and referenced
Mark, I'm glad this works for you. I have a few comments if you don't mind. I used the term 'regression' incorrectly in my previous replies. I should have used 'recursion'. You can put your namespace declaration for 'hdlg' on the stylesheet element only. I still think you should generalize your template to handle any number of levels of directories (using recursion). Brad -----Original Message----- From: Mark Peters [mailto:flickrmeister@xxxxxxxxx] Sent: March 12, 2008 8:04 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Processing on both a document list and referenced documents Hi Brad, everyone. Here's what worked for me: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="yes"/> <xsl:template match="hdlg:filesystem" xmlns:hdlg="http://www.hdlg.info/XML/filesystem"> <html> <body> <ul> <xsl:for-each select="hdlg:folder" xmlns:hdlg="http://www.hdlg.info/XML/filesystem"> <li> <xsl:value-of select="@url"/> <ul> <xsl:for-each select="document(hdlg:file/@url)" xmlns:hdlg="http://www.hdlg.info/XML/filesystem"> <ul> <xsl:for-each select="topic"> <li> <xsl:value-of select="title"/> <ul> <xsl:for-each select="topic"> <li> <xsl:value-of select="title"/> <ul> <xsl:for-each select="topic"> <li> <xsl:value -of select="title"/> </li> </xsl:for-each> </ul> </li> </xsl:for-each> </ul> </li> </xsl:for-each> </ul> </xsl:for-eac h> </ul> </li> </xsl:for-each> </ul> </body> </html> </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
|