0

I have learned how to output images, links, and text with XSLT.

However, when I try to output Google charts, I get errors.

I searched for an answer for a few hours. I want to output this chart, for example:

http://chart.apis.google.com/chart?cht=p3&chs=450x200&chd=t:2,4,3,1&chl=Phones|Computers|Services|Other&chtt=Company%20Sales&chco=ff0000

enter image description here

(I can't even output it as a link.) Also, how can I use XML data to create a chart?

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
rolen
  • 9
  • 2
  • 8
  • 1
    What XML data are referring to? Can you post a small example of your XML input and what you're expecting for an output? – Daniel Haley Jan 31 '13 at 19:52
  • dose it matter? i just want to output an html image with google chart link (or a google chart link). i found the problem it goes mad when i use the character "&",how shold i output links with a lot of vars(like google charts). resorce this:http://stackoverflow.com/questions/67859/xslt-cannot-get-xslt-to-output-an-even-after-escaping-the-character not very useful because im kinda new to xslt. – rolen Jan 31 '13 at 20:06
  • There are certain characters that need to be escaped in XML. The `&` is one of them. You should encode your URLs. (One way is to use percent encoding http://en.wikipedia.org/wiki/Percent-encoding.) If it's something outside of a URL, use `&` (which can also be used in a URL). – Daniel Haley Jan 31 '13 at 20:15
  • solved & is a reserved char use '&' insted edit:thank you daniel i just saw your post,its good to know the full explanation. i will get a small contract job because of your help. – rolen Jan 31 '13 at 20:23

1 Answers1

2

check out the files listed at this address - they might help you out with this particular dilemna. There are a few files, one for each type of chart so choose the right one for you.

Hope it works!

Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81