How to make the following code insert the youtubeId parameter:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:YouTube="urn:YouTube"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library YouTube">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="videoId"/>
<xsl:template match="/">
<a href="{$videoId}">{$videoId}</a>
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/{$videoId}&amp;hl=en"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/{$videoId}&amp;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>
</object>$videoId {$videoId} {$videoId}
<xsl:value-of select="/macro/videoId" />
</xsl:template>
</xsl:stylesheet>
As you can see I have experimented quite a bit. <xsl:value-of select="/macro/videoId" />
actually outputs the videoId but all other occurences do not. This must be an easy question to answer but I just cannot get it to work.
I am creating a macro in Umbraco CMS. The parameter is correctly passed into the XSLT (because actually outputs its value). I just want to insert the value into the src-attribute. I dont care at all how I do that as this is a onetime job. Any workaround appreciated.