Subject: Re: [xsl] SVG Help From: Raffaele Sena <raff@xxxxxxxxxxxx> Date: Sun, 31 Oct 2004 15:19:07 -0800 |
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"?> <claims> <header>August</header> <cpu>No</cpu> <comm>All Vendors</comm> <claim claimable="no"> <vendorcode>B1341</vendorcode> <vendorname>PILGRIMS PRIDE</vendorname> <vendorRollontime> 99 </vendorRollontime> <vendorontime> 100 </vendorontime> <cons> 104 </cons> <carrier>DETCO</carrier> <carrierontime> 90 </carrierontime> <loadnum>226347</loadnum> <po>1914824</po> <due>8/1/2004 </due> <original>8/1/2004 11:10:00 PM </original> <scheduled>8/1/2004 11:10:00 PM </scheduled> <actual>8/1/2004 9:28:00 PM </actual> <vendstat>On Time</vendstat> <carrierstat>On Time</carrierstat> <buyer>NOEL BAKER</buyer> </claim> ... </claims>
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">
<xsl:strip-space elements="*"/>
<xsl:output method="xml" media-type="image/svg+xml" indent="yes" encoding="ISO-8859-1"/>
<xsl:template match="claims"> <svg viewBox="0 0 800 400"> <circle r="100" cx="50%" cy="50%" fill="orange" stroke="black" stroke-width="10"/> <xsl:call-template name="markers"/> </svg> </xsl:template>
<xsl:template name="markers"> <g text-anchor="middle" font-size="20" fill="red"> <desc>Timeline Markers</desc> <text x="400" y="100">This is text</text> <xsl:apply-templates select="header"/> </g> </xsl:template>
<xsl:template match="header"> <xsl:value-of select="."/> </xsl:template>
</xsl:stylesheet>
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"
Can anyone solve this mystery for this befuddled newbie?
-Thanks, Kent Seegmiller
!DSPAM:41855881310472038551239!
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] SVG Help, Kent Seegmiller | Thread | [xsl] SVG Help, Kent Seegmiller |
Re: [xsl] calling templates dependi, David Carlisle | Date | [no subject], Unknown |
Month |