[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Stumped on XPath
Hi Spenser,
If you posted your original XSLT which David fixed, that would help, but I think I remember it well enough -- David's suggestion should work cleanly as long as you say <xsl:number from="appendix"/> instead of the <xsl:number/> he guessed at. The principle he elucidated, namely that you traverse to the referenced node and do the operation there, still applies. <xsl:number/> (in some configuration) spares you all the work of counting things using explicit XPath. The only tricky part is getting the xsl:number set up to give what you want. In this case, unless you say you want to count the appendix elements, it uses the default, which is counting the refnote elements themselves, in their local context (i.e. each one inside its parent). This gives you "1" (i.e. "A") for refnotes 1, 2, and 4, which are each the first refnotes in their parents. (refnote 3 will get you "B"). By switching this to count the appendixes you should get "A" for refnote 1, "B" for refnotes 2 and 3, and "C" for 4. Cheers, Wendell At 04:03 PM 2/13/2006, you wrote: Hi Wendell and David, ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|