 |
 |
 |
Hi Kent,
> I am trying to creat a very simple svg doc using the following source
> document: (August.xml)
>
> <?xml version='1.0'?>
> <?xml:stylesheet type="text/xsl" href="circle.svg.xsl"?>
That should be:
<?xml-stylesheet type="text/xsl" href="circle.svg.xsl"?>
^
hyphen, not colon
> using the following stylesheet: (circle.svg.xsl)
>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
> xmlns:svg="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org.1999/xlink">
If you're generating SVG, and don't want to use the 'svg' prefix
throughout your stylesheet, you should make the SVG namespace the
default namespace for the stylesheet. In other words, change:
xmlns:svg="http://www.w3.org/2000/svg"
to:
xmlns="http://www.w3.org/2000/svg"
> I have followed the format in Jeni Tennisons book "Beginning XSLT"
> But all I get is plain unformated text such as:
>
> "Timeline Markers This is textAugust"
The namespace issue is one problem: SVG processors will (should) only
recognize SVG that is in the SVG namespace.
The other problem is that I suspect you're expecting to simply load
the XML into Internet Explorer and have the SVG be shown
automatically. That won't happen: IE expects the result of any
transformation that it does to be an HTML document, and it will
display the result of any transformation as if it were an HTML
document. The result that you're getting is consistent with IE
ignoring non-HTML elements and just showing their contents.
If you want to do client-side transformation in IE, you need the
stylesheet to generate an HTML page containing an SVG object, and then
load the SVG image into that object. See Chris Bayes's DOM to DOM
utility at:
http://www.bayes.co.uk/xml/portal.asp?page=/xml/index.xml&subpage=/xml/utils/domtodom.xml
for details.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |