devforall
devforall

Reputation: 7335

Calling XSLT variable in CSS import

I tried calling CSS import but cannot evaluate XSLT variable. Is there any other way of doing this?

  <xsl:template match="/" priority="1">

    <xsl:variable name="RecipeId" select="page/abc/a'" />
    <xsl:variable name="CampaignId" select="page/abc/a" />

    @import "lander_umetrix_264.css?ucid={$CampaignId}&#38;urid={$RecipeId}";
    <!--@import "lander.css";-->

    @import "nav_umetrix_264.css?ucid={$CampaignId}&#38;urid={$RecipeId}";


    </xsl:template>

Upvotes: 0

Views: 380

Answers (1)

Jukka Matilainen
Jukka Matilainen

Reputation: 10198

The expressions in curly brackets are only expanded inside Attribute Value Templates.

Instead of {$CampaignId}, you can use this:

<xsl:value-of select="$CampaignId"/>

Upvotes: 3

Related Questions