Linking documents, XLink, XML-SVG compliance



I have been trying to figure out if Dia can be used for a specific purpose. The purpose seems simple, create a bunch of icons for subsystems with values attached to the icon. Link together systems so connections between say, a web browser and a web server, can be documented on the client and server respectively. All of these things have been requested before, and it took my crawling through many emails to find somewhat vague or speculative answers.

Storing values can be done using ext_attribute tags, which I did not find documented anywhere and only briefly mentioned in email. I would never have found this at all without looking at the CVS, only one shape uses this feature (I grepped the shapes) and found it implemented with the original patch and settings (Circuits/hresistor.shape). This was a great find. I mention this because the rest of my requests may have been implemented but not documented.

Linking diagrams together, and providing external references. There are several ways to accomplish this, most have been discussed on the mailing list previously:
1. Create a shape that serves to connect documents. It would store a filename in a field, and some context or property item would trigger dia to open the document. It would be nice if we could use the link to provide information on how to open the document (focused on the corresponding link in the other diagram as an SVG anchor for example).

2. Create a shape or property to trigger external program execution, like the suggestion for $BROWSER $URL, but leave an option to use $PATH $DIA $FILE as well ($PATH for supporting windows users of dia, perhaps $DIA would include a full path instead). This would obviously negate the ability to use anchors unless Dia would support that functionality from the commandline.

3. (Recommended) Implement more of the SVG standard, which includes links via xlink. http://www.w3.org/TR/2000/CR-SVG-20001102/linking.html It would be preferrential for several reasons, one of them being SVG View Specification like: MyDrawing.svg#svgView(viewBox(0,200,1000,1000)) . XLink has a great many attributes and several modes, but I can see a very clear usage for links to "resources", embedding data from other XML documents, etc. http://www.w3.org/TR/2000/CR-xlink-20000703/ The previously mentioned hack with ext_attribute could be replaced by a fully XML compliant and addressable mechanism. One XML file (or database with an XML wrapper) could contain all of my values, fetched from xlinks in my dia document. If dia follows this route, Firefox 1.5+ will be able to follow href links automatically after using its new SVG support.

I need some way to have hierarchical SVG diagrams, Dia could easily be that tool even with a bad code. I am concerned that my code would be too bad, implemented as C, to be included. I made some Python extensions as a test, using menu callback from LarsClausen TWiki (which is very much out of date) and some of the included examples. I looked through the existing shapes with custom properties, all of them are in C that I looked at. Is there a way to write Python Shapes? Even a stub would be a great help.

All of this may be working right now, but I wouldn't know about it without documentation. I saw the request for ext_attribute tags about 6 times looking through the mailing list, aside from 3 people outside the dev team I don't think anyone is aware that it is still included and working in 0.94.

If linking doesn't work out, I'm going to need to use raw SVG to make these diagrams :/ Seems counterproductive considering this seems like such a common request, and hopefully won't be much work to include an additional part of the SVG 1.0 spec.

Ian Smith

P.S. it would be nice if the shape XML Namespace link worked - so we could do DTD validation.



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