This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
SVG, no actual output
- From: Jarkko dot Moilanen at uta dot fi
- To: xsl-list <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 22 Aug 2002 08:09:28 +0300 (EEST)
- Subject: [xsl] SVG, no actual output
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi!
I'm trying to get SVG output to the browser, but i'm getting
only the svg code instead of picture. My browser is svg compatible.
XSLT:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/SVG/DTD/svg10.dtd" [
<!ATTLIST svg
xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
]>
<!-- stylesheet.xsl -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<svg>
<g transform="translate(40,40)">
<text font-size="20">This is a test.</text>
<rect x="0" y="0" width="560" height="420" fill="none" stroke="black"
stroke-dasharray="10 10"/>
<text text-anchor="middle" x="280" y="210" font-size="60">Screen</text>
<rect x="0" y="-20" width="120" height="20" fill="none" stroke="black"/>
<line x1="-5" y1="-5" x2="5" y2="5" stroke="black"/>
<line x1="-5" y1="5" x2="5" y2="-5" stroke="black"/>
</g>
</svg>
</xsl:template>
</xsl:stylesheet>
And the result is:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet"
zoomAndPan="magnify" contentStyleType="text/css"
contentScriptType="text/ecmascript" version="1.0">
<g transform="translate(40,40)">
<text font-size="20">This is a test.</text>
<rect x="0" y="0" width="560" height="420" fill="none" stroke="black"
stroke-dasharray="10 10"/>
<text text-anchor="middle" x="280" y="210" font-size="60">Screen</text>
<rect x="0" y="-20" width="120" height="20" fill="none" stroke="black"/>
<line x1="-5" y1="-5" x2="5" y2="5" stroke="black"/>
<line x1="-5" y1="5" x2="5" y2="-5" stroke="black"/>
</g>
</svg>
What the heck am I doing wrong???????
Cheers
Jarkko
****************************************************************
Jarkko Moilanen "Erehtyminen on inhimillista,
Researcher/ ITCM mutta todella suuret mokat
jm60697@uta.fi vaativat tietokoneen käyttöä."
www.uta.fi/~jm60697
GSM: +358 50 3766 927
****************************************************************
* ITCM | Information Technology and Crisis Management
* http://www.itcm.org
****************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list