XML

From Svg wiki

The XML Context of SVG

SVG is an XML application. XML is defined in the 1.0 specification. Tim Bray's annotated spec is a presentation of the original XML spec with some context and historical background.

XML is a meta-language, meaning a language from which languages are created. The XML specification defines the basic rules for XML applications. XML:

  • Consists mainly of elements and attributes, i.e.:
    • <element attribute="attributevalue">elementcontent</element>
  • Must be well-formed - meaning that it conforms to basic rules such as:
    • tags must be nested properly (i.e. <a>this</a> is <g>ok</g> but <a>this<g> is </a>not</g>)
    • attributes must be quoted (<rect fill="blue"/> or <rect fill='blue'/> not <rect fill=blue/>)
  • May be valid. "Valid" XML is XML that conforms to a DTD or other form of Schema (such as W3C Schema, RELAX NG, or others). A schema or DTD define what sort of arrangements of element and attributes are possible. SVG conforms to the SVG DTD.

You can find more about XML from the references at siliconpublishing.org.

Because SVG is XML, and XSLT typically transforms XML to other XML, SVG can be the result of an XSLT Transformation, or it can be its source. Most commonly, it's a result.

Because SVG is XML, SVG can be processed with XML processors, using techniques such as DOM, SAX, and XML data binding, as well as whatever new XML processing techniques, such as "pull", come along.

Retrieved from "http://wiki.svg.org/XML"