Hi, got some questions about how to do a few tricks in Batik. The questions are similar, but not the same as the "dom of embed svg image" thread the past week.

Ok , using Batik, I'm able to load an SVG Document into a canvas - no sweat.
But now I want to get a little greedy with two curveballs:
1. I have a number of svg images that I create in one svg document. I want to load all of these svg images in one doucment, and later access each individual image, so I can present them as isolated images in my gui. I could just put each one of these svg images in individual svg files, but like I said... I'm greedy.
2. Second, I want to keep these svg images in a xml document who's root node is not <svg>. I.e., I want to define different objects with certain properties, one of which being it's svg image. Batik does not seem to appreciate those types of formats when I attempt to load them.


Here are some sample xml files that I've been attempting to embed svg in and read from Batik...

caused a load error:

<?xml version="1.0" standalone="no"?>
<Lib:inkwirelogiclibrary xmlns:Lib="http://tablab.cs.uic.edu/~tablab/inkwire/xml/logiclibrary";
xmlns:SVG="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
<Lib:gatetype name="AND">
<SVG:svg width="300" height="300">
<SVG:line x1="0" y1="0" x2="300" y2="300" />
</SVG:svg>
</Lib:gatetype>
<Lib:gatetype name="OR">
<SVG:svg width="300" height="300">
<SVG:line x1="0" y1="0" x2="0" y2="200" />
</SVG:svg>
</Lib:gatetype>
</Lib:inkwirelogiclibrary>


--

works, but shows an empty document:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
"http://www.w3.org/2000/svg";>
<SVG:svg width="500" height="300"
xmlns:Lib="http://tablab.cs.uic.edu/~tablab/inkwire/xml/logiclibrary";
xmlns:SVG="http://www.w3.org/2000/svg";>
<Lib:inkwirelogiclibrary >
<Lib:gatetype name="AND">
<SVG:line x1="0" y1="0" x2="300" y2="300" style="stroke:rgb(0,99,99);stroke-width:2"/>
</Lib:gatetype>
<Lib:gatetype name="OR">
<SVG:line x1="0" y1="0" x2="0" y2="200" style="stroke:rgb(99,99,99);stroke-width:2"/>
</Lib:gate
</Lib:inkwirelogiclibrary>
</SVG:svg>


Any suggestions?
Thanks!

Stephen George


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to