![]() |
|
|
|||||||
![]() |
XML - Viewing xml as SVG via XSLT directly |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I have an xml file which I have transformed into svg using xslt.
(http://sroe.home.cern.ch/sroe/ near the bottom) I can open the SVG and view it and I can embed it in a web page fine, however what I want now is to associate my xslt transform directly with the original xml file so that the result of opening the xml file in a browser is the svg. I tried simply changing the output type in my xslt to "html" but I guess I lose all the namespace/DTD information. I'm sure its more complicated than simply adding an html tag... cheers shaun shaun |
|
|
|
|
#2 |
|
Posts: n/a
|
shaun wrote: > I can open the SVG and view it and I can embed it in a web page fine, > however what I want now is to associate my xslt transform directly with > the original xml file so that the result of opening the xml file in a > browser is the svg. Put <?xml-stylesheet type="text/xsl" href="stylesheet.xml"?> in the XML document at the beginning of the XML document before the root element. That should do in Firefox 1.5 and in Opera 9 beta with native XSLT and SVG support. It will not work however with IE and MSXML and Adobe SVG viewer. -- Martin Honnen http://JavaScript.FAQTs.com/ |
|
|
|
#3 |
|
Posts: n/a
|
In article <446cb7f4$0$4515$>,
Martin Honnen <> wrote: > > Put > <?xml-stylesheet type="text/xsl" href="stylesheet.xml"?> > in the XML document at the beginning of the XML document before the root > element. > That should do in Firefox 1.5 and in Opera 9 beta with native XSLT and > SVG support. > It will not work however with IE and MSXML and Adobe SVG viewer. Well, I guess that might have worked except that I needed the math:sin and math:cos functions, so I used EXSLT functions, resulting in: Error during XSLT transformation: An unknown XPath extension function was called. Looks like I'll need a local implementation. Thanks shaun |
|