RE: Using client side XSLT to create SVG

Subject: RE: Using client side XSLT to create SVG
From: "Nick-Lawson.org" <nick@xxxxxxxxxxxxxxx>
Date: Thu, 9 Nov 2000 20:35:26 -0000
Hi Lassi,

Yeah, VERY irritating isn't it :(
IE completely ignores mime types, and makes all its decisions
based on the file extension.

But in this case we don't have a file extension !!!

So I have been reduced to writing (via JScript) the output to a temporary
file
called "xyz.svg" and then pointing the browser at that.
Awful innit ;-(

I see this as a very serious limitation in msxml/IE.
What do you guys think ?

regards,
Nick


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Lassi Lehto
> Sent: 09 November 2000 10:17
> To: XSL-List@xxxxxxxxxxxxxxxx
> Subject: Using client side XSLT to create SVG
>
>
> Hi!
>
> I am trying to create an SVG image from an XML-encoded spatial dataset by
> running it trough an XSLT process. I have done this succesfully on the
> server side using a Java servlet-based processing with Xalan XSLT
> processor.
> Now I am trying to do the same at the client side with MSXML parser on IE
> 5.5. I have updated the parser to the version 3.0 and I am using Adobe SVG
> Viewer plugin.
>
>
> This is my XSLT file (GML2SVG.xslt, just a very simple basic test) (I have
> tried aslo media-type="image/svg"):
>
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> version="1.0">
>
> <xsl:output method="xml" indent="yes" media-type="svg-xml"/>
> <xsl:template match="/">
> <xsl:text disable-output-escaping="yes">
> <![CDATA[ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
> "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-sty
lable.dtd"
> ]]>
</xsl:text>
 <svg>
  <rect x="10" y="10" width="100" height="100" />
 </svg>
</xsl:template>

</xsl:stylesheet>

...which is referenced in the XML-file as follows:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="GML2SVG.xslt"?>
....


I do not get the rectangle displayed. It seems like the browser not
recognized the precense of SVG and do not start up the plugin.
If I run the transformation separately (using MSXML through XSLT Test Tool
by Joshua Allen), store the result in a file with .svg extension and open it
in IE, it would display without problems.
What might be the solution? Basically: how I make IE to recognize the
transformed XML as an SVG image?

With many thanks,
Lassi Lehto


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread