Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XSL TREE LIKE STRUCTURE >Thread Next - Re: XSL TREE LIKE STRUCTURE Re: XSL TREE LIKE STRUCTURETo: NULL Date: 2/8/2005 3:41:00 PM Joris,
Thanks heaps for replying. You have pretty much understood and your insight
i am
sure will be extremely useful and helpful. I have scratch together a
preliminary style sheet, which output html instead of xml.
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="css"/>
<xsl:param name="c_node"/>
<xsl:param name="url"/>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<table class="{$css}" align="center">
<xsl:apply-templates />
</table>
</xsl:template>
<xsl:template match="node()|@*">
<tr>
<td width="{(@depth + 1) * 20}" align="right">
<a href="{$url}&node={@id}">+</a>
</td>
<td>
<xsl:value-of select="@value"/>
</td>
</tr>
<xsl:apply-templates
select="@*|node()[descendant-or-self::*/@id=$c_node]"/>
</xsl:template>
</xsl:stylesheet>
I don't particularly understand everything that is happening with the xpath
expression, but i will get there. One problem i face at the moment is that i
can't seem to output any of the attribute values ie: (@depth,@value). Any
thoughts why.
Forgive my ignorance.
Cheers,
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
