Viewing xml as SVG via XSLT directly

S

shaun

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
 
M

Martin Honnen

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.
 
S

shaun roe

Martin Honnen said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Validate client-side XSLT result of xhtml-math-svg 7
Help with XSLT 0
svg question 2
SVG as XML 6
Sizing SVG in HTML 2
SVG and XML 2
SVG Differences - inline and stand alone? 0
xalan versus ie xml rendering 3

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top