Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Viewing xml as SVG via XSLT directly

Reply
Thread Tools

Viewing xml as SVG via XSLT directly

 
 
shaun
Guest
Posts: n/a
 
      05-18-2006
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      05-18-2006


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
 
 
 
 
shaun roe
Guest
Posts: n/a
 
      05-18-2006
In article <446cb7f4$0$4515$(E-Mail Removed)-online.net>,
Martin Honnen <(E-Mail Removed)> 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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: svg-chart 1.1 SVG Charting Library Helmut Jarausch Python 0 05-20-2008 11:05 AM
svg to svg saving problem milof83 Java 1 08-18-2006 07:36 PM
[SVG] probleme dessin d'images SVG avec Batik Mardagg Java 0 05-12-2006 02:13 PM
[SVG] problem with SVG image drawing with Batik Library Mardagg Java 0 05-12-2006 02:12 PM
[SVG] using image-tag to integrate SVG in SVG Arne Nordmann XML 0 06-28-2004 01:16 PM



Advertisments