[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How do I display an SVG file using XSLT?

Subject: How do I display an SVG file using XSLT?
From: "Mark Griffin" <cornbinder@xxxxxxxxxxxxx>
Date: Thu, 21 Nov 2002 11:51:43 -0700
xslt get image size
The SVG file already exists so I reference it in the XML file as:

      <image NAME="images/svg_test.svg" WIDTH="219" HEIGHT="174" />

How do I get the file 'svg_test.svg' to display in an HTML page using XSLT?
What I need to see on the HTML side is:

<object data="images/svg_test.svg" width="219" height="174"
type="image/svg+xml"></object>

This is the section of the XSLT i'm trying to use:

<xsl:template match="image">
            <xsl:element name="object">
               <xsl:attribute name="data">
                  <xsl:value-of select="@NAME" />
               </xsl:attribute>

               <xsl:attribute name="width">
                  <xsl:value-of select="@WIDTH" />
               </xsl:attribute>

               <xsl:attribute name="height">
                  <xsl:value-of select="@HEIGHT" />
               </xsl:attribute>

               <xsl:attribute name="type">
                  <xsl:value-of select="image/svg+xml" />
               </xsl:attribute>
            </xsl:element>
</xsl:template>



The result is that I get an area of the size described in the XML on the
HTML page but with nothing in it.

Thanks,
Mark G.



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.