This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: strangeness with <xsl:variable>



You know, after sending the regular message, I figured it
out . . . 

1.) use <xsl:text>sect-</xsl:text><xsl:number/>, which I
haven't done throughout the whole transform.  It's a wonder
that this didn't bit me before.

2.) This makes the <xsl:variable><xsl:choose> structure
look like this:

<xsl:variable name="link">
  <xsl:choose> 
    <xsl:when
test="parent::introduction"><xsl:text>sect-intro</xsl:text><xsl:number
format="1" level="single" count="section"/> 
    </xsl:when> 
    <xsl:when
test="parent::chapter"><xsl:text>sect-</xsl:text><xsl:number
format="I.1.1" level="multiple" count="//part | chapter
|section"/> 
    </xsl:when> 
    <xsl:otherwise><xsl:text>sect-</xsl:text><xsl:number
format="I.A.1" level="multiple" count="//part |
appendix|section"/> 
    </xsl:otherwise> 
  </xsl:choose> 
</xsl:variable>

I don't know if I like it, but at least it's better.  I
still don't know a good reason why it has to be this way.

Mike


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]