TheVillageIdiot27
Programmer
Hi
I haven't used XSLT for ages so apologies for this...
I have an XML document created by a database which maps out files and folders i.e.
I am applying an XSL Transform to this but as part of this I need to make that somewhere beneath the current folder node is at least one file node – no matter how many levels beneath it is (i.e. entirely exclude "<folder name='3'>"). In addition I also need to count the file nodes and output that but I guess this is the same problem.
I am sure it’s something like
<xsl:if test="count([something]file) > 0"> and
<xsl:value-of select="[something]count(file)"/>
but can’t seem to get it quite right
I haven't used XSLT for ages so apologies for this...
I have an XML document created by a database which maps out files and folders i.e.
Code:
<root>
<folder name=”folder 1”>
<file name=”file 1”>
<file name=”file 2”>
</folder>
<folder name=”folder 2”>
<folder name=”folder 2a”>
<file name=”file 3”>
</folder>
</folder>
<folder name=”folder 3”>
<folder name=”folder 3a” />
</folder>
</root>
I am sure it’s something like
<xsl:if test="count([something]file) > 0"> and
<xsl:value-of select="[something]count(file)"/>
but can’t seem to get it quite right