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

problem with embedded svg in XML being parsed out by X

Subject: problem with embedded svg in XML being parsed out by XSL
From: Louis.Masters@xxxxxxxxxxx
Date: Thu, 8 May 2003 11:08:11 -0400
svg embed font
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

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.