Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 19th, 2009, 02:49 PM
Registered User
 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default find last element of document

I have a xml transforming into a html using xslt, this xml consists of different sections on html i am separating each section using <hr>, but i don't want last section of document have <hr>.

how do i check this condition.
i need a condistion somthing like this
<if current node is not last node of the document>
<hr>
</if>
 
Old May 20th, 2009, 12:01 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Thumbs up

Try this:

<xsl:if test="position() != last()">
<hr>
</xsl:if>
__________________
Rummy





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find no.of childnodes of a tag element? sachin635 .NET Framework 3.5 0 September 15th, 2008 04:32 AM
Cannot find sub element riffla XSLT 2 March 17th, 2008 08:47 AM
Need to Click Element in DOM document [email protected] C# 2005 1 October 18th, 2007 03:38 AM
How to Click Element in DOM document [email protected] C# 1 October 18th, 2007 03:03 AM
document.element isn't working in aspx page SOLVED logidude ASP.NET 1.0 and 1.1 Basics 2 June 29th, 2007 01:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.