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

Re: problem with proper numbering

Subject: Re: problem with proper numbering
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 02 Oct 2001 12:04:57 -0400
proper numbering format
Andreas,

If I'm reading this right, you don't want <xsl:number value="position()"/> at all:- position() is no good for your purposes. (Why not, is getting to be a FAQ. Perhaps a little research on what position() actually does would help you: it returns the position of the context node in the current node list, which may have nothing to do with the position of anything in the source document.)

My guess without seeing your source data is that you want something like:

<xsl:number count="slide|slideset" level="any" format="a"/>

or possibly to adopt a different numbering sequence for cards representing slides, and navigation cards generated from slidesets (this may be a cleaner way to go).

In any case, your solution is in the other attributes allowed on xsl:number, not the 'value' attribute.

Good luck,
Wendell

At 03:51 AM 10/2/01, you wrote:
Hi everybody,
I have a XML document I want to translate into a WML document, which should
include a table of contents linking to the other pages.
So I would like to transform "slidesets" and "slides" into "cards". The
problem I have is concerned with the numbering of the "cards".


a clipping of my code:


<!--TABLE OF CONTENTS WITH LINKS TO OTHER CARDS-->

<xsl:for-each select="slideset">
 <card>
  <xsl:attribute name="id"><xsl:number value="position()" format="a"/>
  </xsl:attribute>
  <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute>
  <p><b><xsl:text>slideset </xsl:text><xsl:value-of select="title"
/></b></p>

   <xsl:for-each select="./slide">
     <p><a>
     <xsl:attribute name="href">
      <xsl:text>#</xsl:text><xsl:number value="position()" format="a"/>
     </xsl:attribute>
     <xsl:value-of select="./title"/>
     </a></p>
  </xsl:for-each>
 </card>
</xsl:for-each>


<!--OTHER CARDS--> <xsl:for-each select="slideset/slide"> <card> <xsl:attribute name="id"><xsl:number value="position()" format="a"/></xsl:attribute> <xsl:apply-templates/> </card> </xsl:for-each>


======================================================================
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
======================================================================


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.