2013-08-09 13:42 阅读 35


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条回答 默认 最新

  • 已采纳
    duanmi4379 duanmi4379 2013-08-09 14:08

    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 "  />
    点赞 评论 复制链接分享