473,388 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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
May 18 '06 #1
2 1239


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/
May 18 '06 #2
In article <44**********************@newsread2.arcor-online.net>,
Martin Honnen <ma*******@yahoo.de> 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
May 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: gipsy boy | last post by:
Hello, I have sort of a big problem. I would really appreciate any help you could give me. I made a web service in C++ that throws XML to the client (browser). But, the XSLT transormation...
1
by: Claudio Jolowicz | last post by:
I need to produce an HTML page with javascript using XSLT. Unfortunately, Mozilla has a bug that lets it crash when it encounters document.write in an XSLT stylesheet (bugzilla# 202765). Are there...
5
by: Fred | last post by:
Not much expertise on XSLT and trying to understand it's uses when creating apps in VS.NET? If I wanted flexibility on the UI (View aspect of M.V.C.): - How does it compare with creating...
4
by: Stephen | last post by:
I have the following that outputs an xml file to a div using ajax: <script type="text/javascript"> function ajaxXML(url,control_id){ if (document.getElementById) { var x =...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
10
by: NH | last post by:
I have a girdview with paging enabled. How can I add a message in the footer to say "Viewing records 1-15 of 45" etc Thanks
2
by: kamil.nowicki | last post by:
Hi there, I want to create flat txt file from my data stored in my dataset. I do xslt transformation and i've got sth like that: (where ds - is my dataset, output.txt - is my result ...
13
by: Toby Newman | last post by:
I started learning XML on Monday. I have an XML file and have written an XSL file to render it to HTML for formatted viewing in a browser. I'd like to create a second alternative view of the...
3
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I have some XML I want to display in a section of a web page. I want the XML displayed as a tree. The way you see XML if you load the file in the browser. It shows the tree and you can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.