Hi all,
After a week or so of coding and trying to figure out the vagaries of GTK, C and memory management, I finally have a very rough alpha of my XML/XSLT Tools plugin ready to be reviewed by anybody who has the time and the inclination.
Very briefly, I do a lot of XML/XSLT work and have yet to find any decent FOS tools for Linux. I decided to roll my own, using Geany, my favourite lightweight IDE. I learned C/C++ many years ago and haven't used it since, so the quality of my code is likely to be poor and things like memory management done badly. Despite that, I am giving it a go and enjoying what comes out of it.
The Plugin has the following features (and caveats) * Project manager for XML/XSLT transformation chains (incomplete, cannot load or save projects yet) * Each file frame Has a tree view which allows the navigation of the XML file and goes to the line of the doubleclicked row in the open file tab like the existing symbols sidebar * Allows xpaths to be applied to XML files * Allows a XSLT stylesheet to be applied to an XML file
How to use: * Compile the plugin (see below) * Add an xml file to the project space from the plugin's toolbar * Open the tree view expander * Enter an xpath (hit return at the end) * Click the transform button on the plugin's toolbar * A new document with the xpath results will be opened in Geany * Add an xslt file to the project space from the plugin's toolbar * Click the transform button on the plugin's toolbar * A new document with the results from applying the stylesheet will be opened in Geany
Obviously there is still a lot to be done, such as updating the tree view with the xpath results, adding parameters to the XSL transformations, automatically creating and adding results files and a lot of simplifying the code and making sure there are no memory leaks.
I would appreciate any feedback anyone has at this stage, on the current features as they work, the interface and the code.
See a screenshot here: http://wikisend.com/download/444240/screenshot.png
Download the source code here: http://wikisend.com/download/941734/xslteditor.c
To build: gcc -c "xslteditor.c" -fPIC `pkg-config --cflags geany` -I '/usr/include/libxml2/'
To make into a shared library: gcc -Wall "xslteditor.o" -o "xslteditor.so" -shared `pkg-config --libs geany libxslt`
Many thanks for your time and happy coding! Cheers Chris Daley