Re: Dia DTD's location? (And some related ramblings.)



Hi Andrey,
Am 15.02.2016 um 08:13 schrieb Andrey Repin <anrdaemon freemail ru>:

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?
https://git.gnome.org/browse/dia/tree/doc/shape.dtd

http://www.daa.com.au/~james/dia-shape-ns seems to be down, and has been down
for quite a while.
Yes.

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.
Apparently I missed that discussion or can’t remember it…

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!

Sorry, I don’t understand any of your proposed advantages.

Greetings,
        Hans



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]