perhaps something like
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding="iso-8859-1" method="xml" indent="yes"/>
<xsl:param name="paraCatagory"/>
<xsl:template match="menu">
<xsl:apply-templates select="category[(_at_)name=$paraCatagory]"/>
</xsl:template>
<xsl:template match="category">
<div class="cat_block">
<xsl:choose>
<xsl:when test="parent::menu">
<xsl:attribute name="class">cat_block</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">cat_module</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="category/@display_name"/>
<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
<xsl:apply-templates select="category"/>
</div>
</xsl:template>
</xsl:stylesheet>
which makes
$ saxon loop.xml loop.xsl paraCatagory=c2_products
<?xml version="1.0" encoding="iso-8859-1"?>
<div class="cat_block">sub-Category c2_sub1<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
<div class="cat_module">
<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
</div>
<div class="cat_module">
<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
</div>
<div class="cat_module">sub-sub-Category c2_sub_sub1<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
<div class="cat_module">
<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
</div>
<div class="cat_module">
<br/>
<a href="info/link">
<img src="info/images/image"/>
</a>
</div>
</div>
</div>
(I switched xsl:output to use xml indenting, just to make it clearer
what the output is)
David
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--