Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello friends. I'm working on a project and xslt gave me this error:
Turns out I have this code:
<a href="javascript:void(0);" rel="{gallery: 'gal2', smallimage: '/images/imagenes/lent1.jpg',largeimage: '/images/imagenes/lent1.jpg'}"> <img src="/images/imagenes/lent1.jpg" width="100%" alt="" /></a>
When I remove the "rel", works well. I think it is because as use the braces {}, xslt interpretra it otherwise. Any solution to this?
Thank you!
You should use the <xsl:attribute>, something like this:
<a href="javascript:void(0);"><xsl:attribute name="rel">{gallery: 'gal2', smallimage: '/images/imagenes/lent1.jpg',largeimage: '/images/imagenes/lent1.jpg'}</xsl:attrubute><img src="/images/imagenes/lent1.jpg" width="100%" alt="" /></a>
Thank yo very much bro!
Hi,
Just for the record - another way would be to escape the curlies by doubling them:
<a href="javascript:void(0)" rel="{{gallery: 'gal2', smallimage: '/images/imagenes/lent1.jpg',largeimage: '/images/imagenes/lent1.jpg'}}">...</a>
But of course, when doing lots of JSON, this wouldn't be the ideal way.
/Chriztian
Oh Yeah! hehe Thank you Cristian!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Xslt error when using attribute "rel"
Hello friends. I'm working on a project and xslt gave me this error:
Turns out I have this code:
<a href="javascript:void(0);"
rel="{gallery: 'gal2', smallimage: '/images/imagenes/lent1.jpg',largeimage: '/images/imagenes/lent1.jpg'}">
<img src="/images/imagenes/lent1.jpg" width="100%" alt="" />
</a>
When I remove the "rel", works well. I think it is because as use the braces {}, xslt interpretra it otherwise. Any solution to this?
Thank you!
You should use the <xsl:attribute>, something like this:
Thank yo very much bro!
Hi,
Just for the record - another way would be to escape the curlies by doubling them:
But of course, when doing lots of JSON, this wouldn't be the ideal way.
/Chriztian
Oh Yeah! hehe Thank you Cristian!
is working on a reply...