[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: TOC despair
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|