I am writing an XSLT file to output some HTML onto a web page (using Sitecore CMS). I am running into a problem with the following:
<a href="../videos/video.flv" class="videolightbox jackie-hover" data="{width:400,height:200}" title="Title goes here">Text goes here</a>
This causes the following error:
Expected token '}', found ':'. {width -->:<-- 400,height:200}
Can anyone tell me how to fix this issue?
Thank you,
b3n
I think the braces are used as a shortcut to evaluating an XSLT function when inside an attribute.
They are called “Attribute Value Templates”:
You can escape them by using
{{and}}.This makes your snippet read: