SVG: Modularized and mobile (1/2) - exploring XML
SVG: Modularized and mobile
Mid-February the W3C released last call drafts of SVG 1.1 and SVG Mobile. SVG 1.1 is a modularized form of SVG 1.0, specified in W3C XML Schema rather than DTDs. By dividing up the functionality of SVG into modules, it facilitates the production of SVG profiles. Mobile SVG creates two such profiles: SVG Tiny, which is mainly aimed at cellphones, and SVG Basic for Personal Digital Assistants (PDAs).
The scope of SVG
SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of graphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text. Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. The feature set includes nested transformations, clipping paths, alpha masks, filter effects and template objects.
SVG drawings can be interactive and dynamic. Animations can be defined and triggered either declaratively (i.e., by embedding SVG animation elements in SVG content), as shown in column 49, or via scripting.
Sophisticated applications of SVG are possible by use of a supplemental scripting language which accesses SVG Document Object Model (DOM), which provides complete access to all elements, attributes and properties. A rich set of event handlers such as onmouseover and onclick can be assigned to any SVG graphical object. Because of its compatibility and leveraging of other Web standards, features like scripting can be done on XHTML and SVG elements simultaneously within the same Web page.
What's new in version 1.1?
SVG 1.0 is a W3C Recommendation. This version 1.1 provides a modularization of the SVG 1.0 language which can be used to build profiles of SVG such as SVG Mobile, discussed below. There are also a small number of new features, including:
- the 'solidColor' element
- a description of metadata that can be used in SVG documents that use a geographic coordinate system
- simple text wrapping
- advanced compositing and blending operations
The modularization of SVG is a decomposition of SVG 1.0 and a small set of extra features into a collection of abstract modules that provide specific types of functionality. These modules may be combined with each other and with other modules to create SVG subset and extension document types that qualify as members of the SVG-family of document types.
Identifiers for SVG files have been suggested as follows:
|MIME type under registration||image/svg+xml|
|Suggested file extension, Mac creator||.svg, "svg "|
|Suggestion for compressed files||.svgz, "svgz"|
|Public Identifier 1.1||PUBLIC "-//W3C//DTD SVG 1.1//EN"|
|System Identifier 1.1||http://www.w3.org/TR/2002/WD-SVG11-20020215/DTD/svg11.dtd|
Compatibility with other Standards
SVG leverages and integrates with other W3C specifications and standards efforts. By leveraging and conforming to other standards, SVG becomes more powerful and makes it easier for users to learn how to incorporate SVG into their Web sites.
The following describes some of the ways in which SVG maintains compatibility with, leverages and integrates with other W3C efforts:
- SVG is an application of XML and is compatible with the XML 1.0 Recommendation.
- SVG is compatible with namespaces.
- SVG utilizes XLink for URI referencing and requires support for base URI specifications defined in XML-Base.
- SVG's syntax for referencing element IDs is a compatible subset of the ID referencing syntax in XPointer.
- SVG content can be styled by either CSS or XSL.
- SVG includes a complete Document Object Model level 1 and incorporates many of the facilities described in DOM level 2, including the CSS object model and event handling.
- SVG's animation features are modeled after Synchronized Multimedia Integration Language (SMIL) Animations.
- SVG attempts to achieve maximum compatibility with both HTML 4 and XHTML 1.0.
- In environments which support DOM2 for other XML grammars (e.g., XHTML) and which also support SVG and the SVG DOM, a single scripting approach can be used simultaneously for both XML documents and SVG graphics, in which case interactive and dynamic effects will be possible on multiple XML namespaces using the same set of scripts.
Let's look at two profiles of SVG modules.
Produced by Michael Claßen
Created: Mar 04, 2002
Revised: Mar 04, 2002