|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Generate tab-delimited file
<!-- This will generate row data <xsl:template match="topic/@*"> <xsl:value-of select="." /> <xsl:text>	</xsl:text> </xsl:template> --> That generates nothing. It matches any attribute of topic, but a) <topic> has no attributes and b) even if it did the template would never be applied as you never use <xsl:apply-templates to apply templates to attributes (or even elements) > 1. it just looks for the immediate nodes who are the children of <topic>. The default template rule recursively applies templates so processes the whole tree, you stopped that by <xsl:template match="topic/*"> <xsl:value-of select="name()" /> <xsl:text>	</xsl:text> </xsl:template> which says that for childeren of topic do not use apply-templates, so do not process their children. Probably you want something like <xsl:template match="topic"> <!-- header --> <xsl:for-each select="*"> <xsl:value-of select="name()" /> <xsl:text>	</xsl:text> </xsl:for-each> <xsl:text></xsl:text> <xsl:for-each select="*"> <xsl:value-of select="." /> <xsl:text>	</xsl:text> <xsl:text></xsl:text> </xsl:for-each> </xsl:template> > 2. but if I have something like this I haven't tried to answer that as it is completely under specified, which elements you need to produce headers and which elements you ignore and process children. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. 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
|

Cart








