Adding an external DTD to inkscape SVG
Hi all,
I've been stumped for this for some time now. I need to include some character entities that I have in a separate DTD. As far as my knowledge about XML goes, it should be straightforward. Just suppose I have a DTD called t.dtd containing one line: <!ENTITY test "TEST">
Get an inkscape SVG, add an extra namespace and insert the entity: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" (...) xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" *xmlns:chrtr="t.dtd"* (...)> (...) <text (...)> <tspan (...)> *&test;* </tspan> </text> (...) </svg> (N.B. Large parts removed for readability)
Well, this doesn't load in inkscape (no reason given). After A LOT of experimentation I found that this actually loads as I want it in Inkscape 0.44 (Linux): <?xml version="1.0" encoding="UTF-8" standalone="no"?> *<!DOCTYPE svg [ <!ENTITY % getme SYSTEM "t.dtd"> %getme; ]>* <svg xmlns:dc="http://purl.org/dc/elements/1.1/" (...) xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" *xmlns:chrtr="t.dtd"* (...)> (...) <text (...)> <tspan (...)> *&test;* </tspan> </text> (...) </svg>
Which is, I believe, a piece of incorrectly formed XML. The equivalent *<!DOCTYPE svg SYSTEM "t.dtd"> *doesn't work, which is odd. But somehow the entity is ignored in Inkscape 0.45 (windows). I don't know if it is the version or the OS. At the moment I have something that works therefore I'm not finding out.
Could somebody please shed some light on this?
participants (1)
-
Asciimonster