[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Controlling which nodes to process

Subject: Controlling which nodes to process
From: Troadec Pascal <Pascal.Troadec@xxxxxxxxxxxxxxx>
Date: Fri, 6 Jul 2001 15:07:34 +0200
 Controlling  which nodes to process
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.