I have a situation where the param won't be set, but my attempts to capture & handle the sitation aren't working.
I'm using the following:
<xsl:template match="xs:complexType">
<xsl:param name="prefix" />
<xsl:variable name="prefix-no-core">
<xsl:choose>
<!-- if no value, default to 'AcRec' -->
<xsl:when test="not($prefix)">
<xsl:value-of select="'AcRec'" />
</xsl:when>
<!-- if 'core', leave as empty string -->
<xsl:when test="$prefix = 'core'">
</xsl:when>
<!-- if 'AcRec', set the value -->
<xsl:when test="$prefix = 'AcRec'">
<xsl:value-of select="$prefix" />
</xsl:when>
</xsl:choose>
</xsl:variable>
<xs:complexType name="{concat($prefix-no-core, @name)}">
...
</xsl:template>
I've also tried $prefix='' in the first test - neither work. but if I use:
<xsl:value-of select="not($prefix)" />
... the value prints out as true. But using that in my xsl:choose doesn't produce any output.