Dia DTD's location? (And some related ramblings.)
- From: Andrey Repin <anrdaemon freemail ru>
- To: All <dia-list gnome org>
- Subject: Dia DTD's location? (And some related ramblings.)
- Date: Mon, 15 Feb 2016 10:13:29 +0300
Greetings, All!
I've been toying around with XML parsing, and I've used Dia shape as a guinea
pig. This gave me some ideas, but first, a question:
Where's the Dia DTD's are located nowadays?
http://www.daa.com.au/~james/dia-shape-ns seems to be down, and has been down
for quite a while.
Now, to the shapes themselves.
I think, people subscribed to the list had seen this (well, similar) one
<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns"
xmlns:dia="http://www.daa.com.au/~james/dia-shape-ns"
xmlns:svg="http://www.w3.org/2000/svg">
<name>Custom - Styles mix</name>
<svg svg:width="300px" svg:height="300px" svg:viewBox="0 0 3 3">
<circle
dia:style="stroke: foreground;"
svg:style="fill: yellow; fill-opacity: 255; stroke-width: 0.1; stroke-dasharray: 1 0.75;
stroke-dashoffset: .5;"
cx="1.5" cy="1.5" r="0.5"/>
</svg>
</shape>
This was posted as a proposed concept to the request about separating
decoration colors from diagram object properties.
Now, how about this one?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE shape PUBLIC "-//Dia//DTD Dia shape 1.0//EN" "http://www.daa.com.au/~james/dia-shape-ns">
<shape
xmlns:dia="http://www.daa.com.au/~james/dia-shape-ns"
xmlns:svg="http://www.w3.org/2000/svg">
<name>Custom - Styles mix</name>
<?dia python.script();?>
<svg svg:width="300px" svg:height="300px" svg:viewBox="0 0 3 3">
<circle
dia:style="stroke: foreground;"
svg:style="fill: yellow; fill-opacity: 255; stroke-width: 0.1; stroke-dasharray: 1 0.75;
stroke-dashoffset: .5;"
cx="1.5" cy="1.5" r="0.5"/>
</svg>
</shape>
Advantages are quite many.
1. Upfront valid XML.
2. Clear separation of object design from object attributes.
3. Embedded scripting! Seriously. XML lets you embed parsing instructions!
--
With best regards,
Andrey Repin
Monday, February 15, 2016 09:59:40
Sorry for my terrible english...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]