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

Re: following-sibling is not working

Subject: Re: following-sibling is not working
From: "Chuck Bearden" <cfbearden@xxxxxxxxx>
Date: Tue, 17 Oct 2006 19:26:29 -0500
chuck bearden
Note that the 'following-sibling' axis contains all following
siblings, not just the very next one.  So the test
"following-sibling::table" will also be true if there is a 'table'
following the 'graphic' two or more elements distant.  If you want to
call the 'test' template only if the very next sibling to 'graphic' is
a table, you need a test like this:

test="local-name(following-sibling::*[1]) = 'table'"

Chuck

On 10/17/06, rfd ewrew <xmlquestions101@xxxxxxxxxxx> wrote:
Hi:

My XML looks like this:

<ele1>
<graphic>URL for graphic</graphic>

<table>The complete table </table>
</ele1>
In XSLT, to check if the next sibling is a table , under template match for
graphic I used this code;

<xsl:template match="graphic">
<xsl:if test="following-sibling::table">
<xsl:call-template name="test"/>
</xsl:if>
</xsl:template>

<xsl:template name="test">
<fo:block>Test</fo:block>
</xsl:template>


But somehow, it is notcoming to the template test at all. Is there anything wrong with this code?

_________________________________________________________________
Get today's hot entertainment gossip
http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001

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.