Re: [newbie] Conditional Include

Subject: Re: [newbie] Conditional Include
From: Richard Light <richard@xxxxxxxxxxxxxxxxx>
Date: Mon, 24 Jul 2000 12:14:51 +0100
In message <004001bff55b$ecb1af40$01000000@karte76>, Jean de Lavarene
<breux@xxxxxxxxx> writes
>Good morning you'all,
>I am trying to do conditional include, like this :
>    <xsl:when test="$country='GUFRA'">
>        <xsl:include href="GUFRA.xsl"/>
>    </xsl:when>
>    <xsl:otherwise>
>        <!--Define here what to do if no country specified.-->
>    </xsl:otherwise>
>But this won't work because 'choose' are not allowed outside a template.

Even if choose were allowed outside a template, this approach wouldn't
work because xsl:include is a top-level element, i.e. it must be a child
of xsl:stylesheet.

You'll have to find some other way of expressing your conditional logic,
e.g. using a distinct mode for each country.

Richard Light.

Richard Light
SGML/XML and Museum Information Consultancy

 XSL-List info and archive:

Current Thread