SVG Document Structure

SVG is an XML grammar for describing image documents. An image can be a vector graphic, a raster image, a collection of textual glyphs, or any combination of the three within a frame. Most elements appearing in an SVG document can have hyperlinks associated with them or can activate scripts by responding to user input events. Animation tags provide most of the functionality found in the Macromedia Flash format.

SVG takes advantage of other standard XML technologies such as:

XSL

The Extensible Stylesheet Language standard is an evolution of the Cascading Style Sheets (CSS) language for describing stylesheets. All aspects of an SVG document are styleable, using the same standard as HTML/XHTML.

XSLT

XSL Transformations is an XML-based scripting language for converting one form of XML into another. Using XSLT, you can write a series of rules that would convert, say, a database result set into SVG. A transformation script is run through an XSLT interpreter such as the Apache project’s Xalan processor (which, incidentally, has a Perl interface) to produce the output XML.

XLink

The XLink standard describes a way to implement linking between documents. XLink is used by SVG for specifying hyperlinks.

RDF

SVG adheres to the Resource Description Framework standard, which means that metadata stored in image files can be added to the pool of metadata available to RDF-aware applications.

DOM

The Document Object Model describes a standard way of representing and accessing the various ...

Get Perl Graphics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.