This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: XSLT 'or' statement (Was Re: How can I getstylesheet to bold?)
- To: dyork at e-smith dot com
- Subject: Re: XSLT 'or' statement (Was Re: DOCBOOK-APPS: How can I getstylesheet to bold?)
- From: Bob Stayton <bobs at caldera dot com>
- Date: Tue, 31 Jul 2001 12:08:14 -0700 (PDT)
- Cc: docbook-apps at lists dot oasis-open dot org
> From: Dan York <dyork@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.
bobs
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org