SVG Differences - inline and stand alone?

A

antonye

So I've spent some time working on transforming XML into
a nice SVG based graph, which I'm happy with.

I've now been tasked with putting this graph into some
outer html wrapper to create a report with data as well.
This is not a problem as I've dropped the SVG inline in
the HTML using the AdobeSVG import trick, and it works
fine.

The trouble is that there are some glaring differences
between what I see by viewing the SVG straight in the
browser as a .svg file and through the inline HTML.

For example (to reproduce) try viewing this as a .svg:

<svg width="500" height="500">
<text font-size="10" style="text-anchor:end; writing-mode:tb;" x="250"
y="300">Vertical</text>
</svg>

Now try the same piece of SVG wrapped in HTML, viewed as .htm:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<body>
<object id="AdobeSVG"
classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<?import namespace="svg" urn="http://www.w3.org/2000/svg"
implementation="#AdobeSVG"?>

<svg:svg width="500" height="500">
<svg:text font-size="10" style="text-anchor:end; writing-mode:tb;"
x="250" y="300">Vertical</svg:text>
</svg:svg>

</body>
</html>

....and you (should!) see that it doesn't work?

It's very difficult trying to track any discussion down about this,
mainly because searching for various keywords returns hundreds
of unrelated results.

So my question is really around if anyone has noticed this (which
I presume should be a resounding yes!) and have they managed
to "fix" the problem, and if so what did they do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top