[Home] [By Thread] [By Date] [Recent Entries]
On Aug 31, 2004, at 5:11 AM, David Carlisle wrote:
I was just reminded that page numbers aren't always integers. Example: Yeah, I don't think there's any need to modify roman numerals, so for the time being I just did this: <xsl:function name="bib:number-condense">
<xsl:param name="begin" />
<xsl:param name="end" />
<xsl:choose>
<xsl:when test="$begin castable as xs:integer">
<xsl:variable name="begin" select="$begin" as="xs:integer" />
<xsl:choose>
<xsl:when test="$begin castable as xs:integer and
$begin gt 100 and
$begin mod 100 and
$begin idiv 100 eq $end idiv 100">
<xsl:value-of select="$end mod 100" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$end" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$end" />
</xsl:otherwise>
</xsl:choose>
</xsl:function>
|

Cart



