Viewing xml as SVG via XSLT directly

Discussion in 'XML' started by shaun, May 18, 2006.

  1. shaun

    shaun Guest

    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, May 18, 2006
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, May 18, 2006
    #2
    1. Advertising

  3. shaun

    shaun roe Guest

    In article <446cb7f4$0$4515$-online.net>,
    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
     
    shaun roe, May 18, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. swbaz
    Replies:
    2
    Views:
    637
    Jordan Marton
    Aug 13, 2003
  2. Arne Nordmann
    Replies:
    0
    Views:
    527
    Arne Nordmann
    Jun 28, 2004
  3. Mardagg
    Replies:
    0
    Views:
    809
    Mardagg
    May 12, 2006
  4. Mardagg
    Replies:
    0
    Views:
    668
    Mardagg
    May 12, 2006
  5. milof83

    svg to svg saving problem

    milof83, Aug 18, 2006, in forum: Java
    Replies:
    1
    Views:
    833
    Roland de Ruiter
    Aug 18, 2006
Loading...

Share This Page