About This Document
Welcome to the first alpha release (v1.0) of SVG-PL, a Perl5 library for creating Scalable Vector Graphics (SVG) files. This document describes what SVG-PL is and the work currently being undertaken on the developement of this collection of Perl functions for producing SVG documents 'on the fly'.
The library is free for personal use, and commercial licences can be arranged. See the full licence agreement for further details.
For more information, some sexy examples, and the ability to download the library please visit the SVG-PL Official Homepage.
SVG-PL is a software library designed to assist in writing Perl programs for the creation of error-free SVG documents. The latest distribution can always be found at http://www.cs.nott.ac.uk/~jxm/SVG/. For a complete specification of SVG, see World Wide Web Consortium (W3C) Website at http://www.w3.org/TR/SVG/
Inevitably a simpler way to generate SVG files is to use software such as Adobe Illustrator® with an appropriate plug-in that would convert an image in an raster-only format into an SVG document. It might appear that generating an SVG drawing using a Perl program is doing it the hard way. But if an SVG document was expected to be the result of a World Wide Web (WWW) query, perhaps as the output of a Common Gateway Interface (CGI) program, then SVG-PL would serve as a vehicle to producing the document using Perl, which is commonly used in CGI programming.
The SVG-PL library aims to serve as a collection of functions for the generation of SVG documents. The library functions were all written in Perl version 5 and thus SVG builders are expected to be reasonably familiar with the programming language itself since they will be writing Perl standalone programs which make use of such functions. As mentioned above, SVG-PL serves as a vehicle between Perl and SVG, therefore knowledge of the mark-up language is also assumed. Although familiarity with Perl and SVG is needed, builders however should not worry about validity of the SVG statements being generated since the library has functions defined to check syntax of the statements automatically. However error checking of user supplied data (attribute or parameter values) is not guaranteed, in other words semantics of data is not verified. SVG builders have to ensure that for instance co-ordinates of any graphic objects do not exceed the dimensions of the drawing they are in.
Current Status and Future Developments
Not all attribute values are checked before they are written to the SVG output. Those that the type or pattern of the input values that are unknown or uncertain have been left unchecked and are directly printed to the output stream. Verification checks for validity of such attribute values will be added in future releases of SVG-PL, along with graphic and text environment setting functions as mentioned earlier in the manual once the SVG specification has been finalised or becomes a W3C recommendation.
Moreover, there are currently no functions defined to manipulate or define values given to an SVG 'style' attribute in all corresponding tagsets where the attribute is allowed in. In addition, futher work is required to improve syntax checking algorithms as well as more error handling functionality.