minasharif
Programmer
- Oct 14, 2006
- 5
Hi;
I have a XML document and going to transform it as HTML by XSLT. One of the fields named "graph" consists of SVG image code. I have added an EMBED object to the output HTML as below:
<embed type='image/svg+xml' src='Image.svg' onload="this.getSVGDocument().getElementsByTagName('svg')[0].innerText = '{graph}'" />
Image.svg is:
<?xml version="1.0" standalone="no"?>
<?xml-stylesheet href="SVG.css" type="text/css"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
<svg width="100%" height="100%" version="1.1" xmlns=" />
But unfortunately, I may not access the innerText or innerHTML of svg element in Image.svg; Although I can read or change the attributes of this element such as "width" or "version"!?
How would I be able to show the svg image? I am looking for a way to change the innerText of svg tag from the main HTML file.
Much obliged to you for your attention.
Regards
I have a XML document and going to transform it as HTML by XSLT. One of the fields named "graph" consists of SVG image code. I have added an EMBED object to the output HTML as below:
<embed type='image/svg+xml' src='Image.svg' onload="this.getSVGDocument().getElementsByTagName('svg')[0].innerText = '{graph}'" />
Image.svg is:
<?xml version="1.0" standalone="no"?>
<?xml-stylesheet href="SVG.css" type="text/css"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
<svg width="100%" height="100%" version="1.1" xmlns=" />
But unfortunately, I may not access the innerText or innerHTML of svg element in Image.svg; Although I can read or change the attributes of this element such as "width" or "version"!?
How would I be able to show the svg image? I am looking for a way to change the innerText of svg tag from the main HTML file.
Much obliged to you for your attention.
Regards