Play Ball with SVG and XSLT
The Scalable Vector Graphics (SVG) graphic Extensible Markup Language (XML) format is highly capable of describing complex images in a single SVG file. The author encountered a real-world requirement to align multiple SVG images with precise spatial relationships. Multiple output XML files are used to create physical objects that, themselves, had to be aligned precisely. Addressing this challenge reduced the number of source SVG files to one. An automated process readily and reliably produces the many required multiple output SVG files. The author divined and imposed simple declarative techniques on top of existing constructs in the Inkscape SVG authoring tool. Extensible Stylesheet Language Transformations (XSLT) stylesheets were developed to interpret these declarative constructs. This interpretation massages the single design SVG XML file to create the required dozens of individual review and production SVG XML files. These declarative techniques were written for one project and then proven using a second project. The tools implementing these techniques are freely available on GitHub.
Authors
- G. Ken Holman
Institutions
- Soft99 (Japan) (JP)
Publication Details
- Published
- 2024-12-31
- DOI
- https://doi.org/10.1075/da.2024.holman.play-ball
- Primary Topic
- Digital Humanities and Scholarship
- Type
- article
- Field-Weighted Citation Impact
- 0.00