RE: [xsl] Conditional processing of nodes

Subject: RE: [xsl] Conditional processing of nodes
From: cknell@xxxxxxxxxx
Date: Mon, 02 Feb 2004 16:49:22 -0500
<xsl:template match="contents[preceding-sibling::audience[internal]]">
 <!-- Your code here -->
</xsl:template
--
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Markus Vaterlaus <mvaterlaus@xxxxxx>
Sent:     Mon, 2 Feb 2004 22:09:19 +0100
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
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



Current Thread