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

RE: TOC despair

Subject: RE: TOC despair
From: "John Meyer" <jmeyer@xxxxxxxxxxx>
Date: Wed, 3 Dec 2003 19:50:08 -0500
apply templates with parameter
Oops, your right, that would convert each node to a string before
comparing. I use this test in some of my stylesheets, but each node has
a unique id and I compare these ids. What you should do if you don't
have unique ids is to use:

<xsl:if test="generate-id(.) =
generate-id(ancestor::chapter[1]//section[position()=last())]">

Of course, if you are transforming to fo or html, I would use style
attributes to indicate the extra space. There are multiple ways to
specify this kind of style. If you are transforming to plain text, then
I would recommend the above or using apply-templates with a
with-parameter modifier for the last section. The apply-templates is a
bit wordy, but very efficient.


John Meyer
Senior Software Engineer
Clinician Support Technology
1 Wells Avenue, Suite 201
Newton, MA 02459
www.cstlink.com

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx] 
Sent: Wednesday, December 03, 2003 7:28 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  TOC despair


> <xsl:if test=". = ancestor::chapter[1]//section[position()=last()]">
That would cause the string values (ie the concatenation of all
characters in each section) to be compared..

-- 
http://www.dcarlisle.demon.co.uk/matthew

 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

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.