I know there is already a question out there about replacing strings in XSLT, but I need a conditional statement to replace one string with multiple variables.
Here is my code:
<xsl:template name="section-01">
<xsl:call-template name="table-open"/>
<xsl:text disable-output-escaping="yes"><table style="text-align=center;"></xsl:text>
<xsl:call-template name="display-gen">
<xsl:with-param name="value" select="./z30-collection"/>
<xsl:with-param name="width" select="'30%'"/>
</xsl:call-template>
<xsl:call-template name="display-gen">
<xsl:with-param name="value" select="./call-no-piece-01"/>
<xsl:with-param name="width" select="'30%'"/>
</xsl:call-template>
<xsl:call-template name="table-close"/>
</xsl:template>
I need a statement to replace "./z30-collection"
If ./z30-collection = "Deposit" replace with "DEP"
if ./z30-collection = "General" replace with "GEN"
if ./z30-collection = "Storage" replace with "STORE"
etc...
Any help would be greatly appreciated!
<xsl:choose>element. w3schools.com/xsl/xsl_choose.asp