| |
---|
| | <xsl:choose> |
---|
| | <!-- Could possibly change this to test="/document/@class = 'tutorial'" or similar? --> |
---|
| | <!-- Sounds nicer...I think ideally the XSL processor would automatically figure out the path to the graphics based on the path to the source XML file. Can this be done? --> |
---|
| | <xsl:when test="name(/child::node()[1])='tutorial' or /document/@class = 'tutorial'"> |
---|
| | <xsl:text>\tutroot</xsl:text> |
---|
| | <xsl:text>\tutroot/</xsl:text> |
---|
| | <!-- Note: support for format-number() is poor/nonexistent in Xalan, unless you build it (and Xerces) with the ICU package. Which you can't do using Cygwin. :^( --> |
---|
| | <!-- Xalan also seems to require numbers to be written with a decimal point, otherwise it treats them as text. --> |
---|
| | <xsl:value-of select="format-number(/document/@sequence-number, '00')"/><xsl:text>-</xsl:text><xsl:value-of select="/document/@title-code"/> |
---|
| | <xsl:text>/Graphics</xsl:text> |
---|
| | </xsl:when> |
---|
| | <xsl:when test="name(/child::node()[1])='laboratory' or /document/@class = 'laboratory'"> |
---|
| | <xsl:text>\labroot</xsl:text> |
---|
| | <xsl:text>\labroot/</xsl:text> |
---|
| | <xsl:value-of select="format-number(/document/@sequence-number, '00')"/><xsl:text>-</xsl:text><xsl:value-of select="/document/@title-code"/><xsl:text>/Graphics</xsl:text> |
---|
| | </xsl:when> |
---|
| | <!-- Allow the author to specify a non-standard image location on the fly. --> |
---|
| | <xsl:when test="count(location) != 0"> |
---|
| |
---|
|