Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - Viewing xml as SVG via XSLT directly

 
Thread Tools Search this Thread
Old 05-18-2006, 05:45 PM   #1
Default Viewing xml as SVG via XSLT directly


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
  Reply With Quote
Old 05-18-2006, 07:07 PM   #2
Martin Honnen
 
Posts: n/a
Default Re: Viewing xml as SVG via XSLT directly



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/
  Reply With Quote
Old 05-18-2006, 07:47 PM   #3
shaun roe
 
Posts: n/a
Default Re: Viewing xml as SVG via XSLT directly

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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump