[xsl] Controlling which nodes to process

Subject: [xsl] Controlling which nodes to process
From: Troadec Pascal <Pascal.Troadec@xxxxxxxxxxxxxxx>
Date: Fri, 6 Jul 2001 15:07:34 +0200
Hi,

is there a way to control how the nodes are to be processed?
I want  to select all the child elements with their appropriate template rule except one child element.

In the next example , the table element is  parse twice: 
- first when <xsl:apply-templates select="caption"/> is called
- second when     <td>
        			<xsl:apply-templates/>  is called

is there an expression to select all the children except one ? 
something as : <xsl:apply-templates select="* and not( caption)"/> 


INPUT 

<table>
<caption>title</caption>
<tr><td>...</td></tr>
<tr><td>...</td></tr>
</table>

STYLESHEET

...
<xsl:template match="//table">

<table >

   <caption>
      <xsl:apply-templates select="caption"/>
    </caption>

  <tr>
    <td>
        <xsl:apply-templates/>   <-------------- here i want  to select all the child elements except one:
 					 caption element
     </td>
 </tr>

</table>

</xsl:template>
...

<xsl:template match="caption">
	<xsl:if test="@align">
		<xsl:attribute name="align">
			<xsl:value-of select="@align"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:apply-templates/>
</xsl:template>

...

Cheers

Pascal Troadec

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread