<xsl:template match="contents[preceding-sibling::audience[internal]]">
<!-- Your code here -->
</xsl:template
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email
-----Original Message-----
From: Markus Vaterlaus <mvaterlaus(_at_)mus(_dot_)ch>
Sent: Mon, 2 Feb 2004 22:09:19 +0100
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Conditional processing of nodes
Hi all,
I'm quite struck with a XSL problem: I have a big file which is
generated out of about 300 small files using cocoon's
XPathDirectoryGenerator. Each of the small files has the same
structure:
<entry>
<audience>
<clients/>
<internal/>
</audience>
<contents>
<head>
<headnode1>abc</headnode1>
<headnode2>abc</headnode2>
<head>
<body>
<language1>
<para>blaaaa</para>
<para>blaaaa</para>
</language1>
<language2>
<para>blaaaa</para>
<para>blaaaa</para>
</language2>
</contents>
<entry>
The big file looks like this:
<dir:directory>
...
<entry>
...
</entry>
<entry>
...
</entry>
<entry>
...
</entry>
...
</dir:directory>
Now I'm looking for solution which processes <contents> (and its
subnodes) of an entry if the node <internal/> exists. I thought, it
could be done with <xsl:if test="expression"> ... </...> but I failed.
Can anybody give me a hint?
Thanks
Markus
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list