Subject: [xsl] problem with embedded svg in XML being parsed out by XSL From: Louis.Masters@xxxxxxxxxxx Date: Thu, 8 May 2003 11:08:11 -0400 |
I am having a problem embedding a SVG graphic in my output. Basically, I have svg that is generated dynamically and inserted into the XML. II then want the XSL file to process it so it can be rendered. It looks like my XSL is removing the svg and only rendering the text that was in the original SVG. For example, my XML looks like: <cell span="14"> <svg width="200" height="100" xmlns="http://www.w3.org/2000/svg"> <g stroke="black" stroke-width="1"> <rect x="1" y="1" width="198" height="98" fill="none"/> <circle cx="55" cy="45" r="50" fill="none"/> <path d="M55,45 L5,45 A50,50 0 0,1 59.7869808024696,-4.770320621800174 Z" style="fill:red"/> <path d="M55,45 L59.7869808024696,-4.770320621800174 A50,50 0 0,1 67.84519077033929,-3.321848827146411 Z" style="fill:aqua"/> <path d="M55,45 L67.84519077033929,-3.321848827146411 A50,50 0 1,1 5.0,45.01100000000002 Z" style="fill:aqua"/> <text x="100" y="35" text-anchor="middle" style="font-family: tahoma, verdana, arial, sans-serif; font-size: 30; font-weight: bold; fill: purple; stroke: purple; stroke-width: 1"> By Origin Report </text><text x="115" y="40" text-anchor="start" style="font-family: tahoma, verdana, arial, sans-serif; font-size: 12; font-weight: normal; fill: red; stroke: red; stroke-width: 1"> PEOPLES REP.OF CHINA - 26.53% </text> <text x="115" y="52" text-anchor="start" style="font-family: tahoma, verdana, arial, sans-serif; font-size: 12; font-weight: normal; fill: aqua; stroke: aqua; stroke-width: 1"> SRI LANKA - 2.61% </text> <text x="115" y="64" text-anchor="start" style="font-family: tahoma, verdana, arial, sans-serif; font-size: 12; font-weight: normal; fill: aqua; stroke: aqua; stroke-width: 1"> UNITED STATES - 70.86% </text> </g> </svg> </cell> The output from the xalan command line is this (whitespace as is): <fo:inline white-space-collapse="true" font-weight="normal" color="black" font-size="7pt"/> By Origin Report PEOPLES REP.OF CHINA - 26.53% SRI LANKA - 2.61% UNITED STATES - 70.86% By Origin Report PEOPLES REP.OF CHINA - 8.83% MEXICO - 0.04% UNITED STATES - 91.13% The XSL looks like: <xsl:template match='svg'> <fo:block space-before.optimum="2pt" space-after.optimum="2pt"> TEST <fo:instream-foreign-object> <xsl:value-of select="."/> <!--<xsl:copy/>--><!--also tried this--> </fo:instream-foreign-object> </fo:block> </xsl:template> It looks like a problem with my XSL, but I don't know how to resolve it. Any ideas? Xalan 2.0.0 jdk 1.3.1 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] tidy / not tidy?: how to elim, Smirnov, Anatoliy | Thread | Re: [xsl] problem with embedded svg, David Carlisle |
RE: [xsl] Blank lines in xhtml when, Michael Kay | Date | [xsl] XSL Problem with IE, Fran |
Month |