Proposed plugin: Export via XSLT!



Hi folks,

I've just been finally understanding Dia and UML a bit.  I'm ready to start
doing some XML work and based on an article I just read...

http://www.xml.com/pub/a/2001/08/22/uml.html

...it looks Dia would be an excellent way to model and generate XML.
However, such an export facility doesn't exist, as far as I can see.

I took a look at dia2code and I think it's fantastic that code generation
is starting to be possible.  However, I think doing it that way, in a
separate tool, in C with custom code for each generated language, misses
the whole point of XML and, more importantly, XSLT.

I would like to write a Dia plugin that provides generic export using a
user-selectable XSL file.  So for example, some provided files might be
dia2c.xsl, dia2cpp.xsl, dia2perl.xsl, dia2python.xsl, dia2php.xsl,
dia2sql.xsl, etc.  I assume that some existing plugins, such as the
SVG export, would be rewritten as just dia2svg.xsl.  

Note that I'm not offering to write all those .xsl files... Just the plugin
that makes it possible.  Then I'd probably take the part of dia2code that
generates C++ and create a first .xsl out of that (since I'm pretty
familiar with C++ and it would give me a good idea how to start processing
the Dia xml format).  Other people can then convert other exporters into
.xsls using that first one as a model.

This looks like a good first project for me to learn a whole bunch of
stuff... Before I start working on this, I wanted to know if anyone else is
already doing it (looks like no from the CVS tree).  At the moment I'm
planning to throw it together using libxslt. I assume there's no problem
adding that lib since Dia already depends on libxml... 

Comments, feedback?

Thanks,
Bret
-- 
Bret Mogilefsky * Mgr. SCEA Developer Support * mogul gelatinous com





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