Using Timthumb file in xslt

74 views Asked by At

i am having trouble in figuring out how i can use tim thumb for cropping image in xslt For example below code is in php :

<img src="include/timthumb.php?src=http://localhost/testdata/1830censusfiscalchart.jpg&w=400&h=200 "  />

my question is how can i write above code in xsl , i tried different ways but it keep throwing me errors.

1

There are 1 answers

0
Tim C On BEST ANSWER

If you want to use ampersands (&) in an attribute that is being output by XSLT, they you need to 'escape' them as &amp; so that the XML is well-formed. Something like this:

<img src="include/timthumb.php?
          src=http://localhost/testdata/1830censusfiscalchart.jpg&amp;w=400&amp;h=200 "  />