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

RE: position

Subject: RE: position
From: m.vanrootseler@xxxxxxxxx
Date: Sat, 14 Feb 2004 16:26:22 +0100
RE:  position
Hi Ken,

I'm flattered that you consider me a programmer; I'm just a humble
linguist :-) I'll try your other suggestion too as I found that upping
the number made the transformation rather slow. 

Cheers,

Mick


-----Oorspronkelijk bericht-----
Van: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] Namens G. Ken Holman
Verzonden: 14 februari 2004 16:14
Aan: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Onderwerp: RE:  position

At 2004-02-14 15:54 +0100, m.vanrootseler@xxxxxxxxx wrote:
>Thanks Ken, this works. I hadn't thought of using <xsl:number/>. The
>output, though, starts with '0', so the first note is numbered '0' but
I
>solved this by putting the lot into a variable and upping it by 1.

:{)}  That's the "programmer's approach" to solving the problem:
throwing 
it in a variable and upping it by one.  Many of my students come to
class 
always trying to employ a programming approach.

May I instead suggest a hierarchical approach more consistent with XSLT:

   <xsl:if test="note">
     <xsl:for-each select="note">
       <xsl:number level="any"/>
       ...other note stuff...

That way (1) you aren't playing with variables and (2) the above note 
processing happens successfully when you have more than one note inside 
your parent element.

I hope this helps.

................... Ken


--
Public courses: upcoming world tour of hands-on XSL training events
Each week:    Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
Washington, DC: 2004-03-15            San Francisco, CA: 2004-03-22
Hong Kong: 2004-05-17    Germany: 2004-05-24    England: 2004-06-07
World-wide on-site corporate, government & user group XML training!

G. Ken Holman                  mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.           http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0     +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness   http://www.CraneSoftwrights.com/s/bc


 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.