atom feed4 messages in org.oasis-open.lists.docbook-appsRe: XSLT 'or' statement (Was Re: DOCB...
FromSent OnAttachments
Dan YorkJul 31, 2001 10:41 am 
Bob StaytonJul 31, 2001 12:09 pm 
Adam TuroffJul 31, 2001 12:20 pm 
Dan YorkJul 31, 2001 12:35 pm 
Subject:Re: XSLT 'or' statement (Was Re: DOCBOOK-APPS: How can I getstylesheet to bold?)
From:Bob Stayton (bo@caldera.com)
Date:Jul 31, 2001 12:09:29 pm
List:org.oasis-open.lists.docbook-apps

From: Dan York <dyo@e-smith.com>

Bob,

Since I thought your use of the 'or' functionality was quite cool, I modified my customization layer along the lines of what you did:

<xsl:template match="emphasis"> <xsl:choose> <xsl:when test="@role='bold'|@role='strong'"> <!-- changed line --> <xsl:call-template name="inline.boldseq"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="inline.italicseq"/> </xsl:otherwise> </xsl:choose> </xsl:template>

However, in running it through 'xsltproc' I found that I was getting an error generated. It actually seemed to work correctly, but gave me error messages. I did some research and found that the 'or' functionality of XSLT actually uses the word "or". So the test needs to be:

<xsl:when test="(@role='strong') or (@role='bold')">

Oops, that's what I get for posting without testing. The '|' symbol is only used to OR element selections in a test attribute. Thanks for correcting that.