How come this does not work:
<xsl:with-param name="message">
<xsl:attribute name="select">
<xsl:text>'Alla koder kopplade till den e-post-adressen är nu skickade till dig!'</xsl:text>
</xsl:attribute>
</xsl:with-param>
How come this does not work:
<xsl:with-param name="message">
<xsl:attribute name="select">
<xsl:text>'Alla koder kopplade till den e-post-adressen är nu skickade till dig!'</xsl:text>
</xsl:attribute>
</xsl:with-param>
You need:
<xsl:with-param name="message"
select="''Alla koder kopplade till den e-post-adressen är nu skickade till dig!''"/>
Whenever you declare a param or variable without select
attribute and with some content template, the variable or parameter will be of type Result Tree Fragment. Whenever you output an attribute node, it's an error if you don't output it before any other node type of some element's content template. Error recovery mechanism could be to silently output nothing. In XSLT 2.0 the error is rised.
Note: I'm ussing '
entity because you have wrapped the text with '
, otherwise it's no needed.
You can totally avoid using the select
attribute simply by giving the value as the text node inside the <xsl:with-param>
:
<xsl:with-param name="message">'Alla koder kopplade till den e-post-adressen är nu skickade till dig!'</xsl:with-param>
And you probably don't need the quotes ('
) except if you want them in the value of message
.