The custom attribute 'addthis:url' seems to break the XSLT whichever way I try to render it. I've tried loads of ways of rendering this, for example making the whole line render inside CDATA tags (in which case I can't pass in the variable - it just renders the variable name); and also adding <xsl:attribute name="addthis:url"> but this too doesn't work. I can't seem to get around it.
Can anyone point me in the right direction in being able to render this through XSLT?
Add custom attribute with variable value to HTML tag in XSLT
Hi,
I'm integrating some 'addThis' buttons (http://www.addthis.com) to a macro. The code which needs to be rendered includes this line:
<div class="addthis_toolbox addthis_default_style " addthis:url="http://www.example.com">
In the XSLT file, the value for 'http://www.example.com' needs to be a variable.
The custom attribute 'addthis:url' seems to break the XSLT whichever way I try to render it. I've tried loads of ways of rendering this, for example making the whole line render inside CDATA tags (in which case I can't pass in the variable - it just renders the variable name); and also adding <xsl:attribute name="addthis:url"> but this too doesn't work. I can't seem to get around it.
Can anyone point me in the right direction in being able to render this through XSLT?
Thanks!
Here is the answer from Chriztian, once you add this you should be able to use the normal <xsl:attribute> tag: http://our.umbraco.org/forum/developers/xslt/23665-using-in-xslt-attribute
is working on a reply...