This is the mail archive of the
mailing list .
RE: xsl:include and xsl:otherwise
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] xsl:include and xsl:otherwise
- From: "Clapham, Paul" <pclapham at core-mark dot com>
- Date: Tue, 27 Mar 2001 15:30:27 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
xsl:include isn't a macro instruction. It's a top-level element because
it's used to include one or more templates into your stylesheet. So just
put the xsl:include at the top level, and at the place you thought you
wanted to put it, instead put a xsl:call-template to call one of the
templates you included.
From: Noe Ritter [mailto:noe.ritter@Ripcord.com]
Sent: March 27, 2001 15:03
Subject: [xsl] xsl:include and xsl:otherwise
Can I have an xsl:include inside an xsl:otherwise? The spec says "The
xsl:include element is only allowed as a top-level element," so I'm assuming
that this is not do-able.
I need to redirect to another stylesheet depending on the number of records
my XML returns.
Example: When a query returns an XML with 0 records, I want to make a user
go back to their search page (an XSL-generated one) from where they typed in
the query. If they get results, they receive an XSL-generated output from
the current XSL.
Any suggestions on the best way to do this?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list