[xsl] Conditional processing of nodes

Subject: [xsl] Conditional processing of nodes
From: Markus Vaterlaus <mvaterlaus@xxxxxx>
Date: Mon, 2 Feb 2004 22:09:19 +0100
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



Current Thread