Appendix D: Conformance Criteria
Contents
This appendix is informative, not normative.
D.1 Introduction
Different sets of SVG conformance criteria exist for:
D.2 Conforming SVG Documents
An SVG document is a Conforming SVG Document
if it adheres to the specification
described in this document
(Scalable Vector Graphics (SVG) Specification) and also:
D.3 Conforming SVG Stand-Alone Files
A file is a Conforming SVG Stand-Alone File if:
D.4 Conforming SVG Included Documents
SVG documents can be included within parent XML documents using the XML namespace
facilities described in Namespaces in XML.
An SVG document that is included within a parent XML document
is a Conforming Included SVG Document if the SVG document,
when taken out of the parent XML document,
conforms to the SVG Document Type Definitions (DTD).
In particular, note that individual elements from the SVG namespace cannot
be used by themselves. Thus, the SVG part of the following document is not conforming:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE SomeParentXMLGrammar PUBLIC "-//SomeParent"
"http://SomeParentXMLGrammar.dtd">
<ParentXML>
<!-- Elements from ParentXML go here -->
<!-- The following is not conforming -->
<z:rect xmlns:z="http://www.w3.org/Graphics/SVG/SVG-19990812.dtd"
x="0" y="0" width="10" height="10" />
<!-- More elements from ParentXML go here -->
</ParentXML>
Instead, for the SVG part to become a Conforming Included SVG Document, the file could
be modified as follows:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE SomeParentXMLGrammar PUBLIC "-//SomeParent"
"http://SomeParentXMLGrammar.dtd">
<ParentXML>
<!-- Elements from ParentXML go here -->
<!-- The following is conforming -->
<z:svg xmlns:z="http://www.w3.org/Graphics/SVG/SVG-19990812.dtd"
width="100px" height="100px" >
<z:rect x="0" y="0" width="10" height="10" />
</z:svg>
<!-- More elements from ParentXML go here -->
</ParentXML>
D.5 Conforming SVG Generators
A Conforming SVG Generator is a program which:
SVG generators are encouraged to follow
W3C developments in the area of
internationalization. Of particular interest is
the W3C Character Model and the concept of Webwide Early Uniform Normalization,
which promises to enhance the interchangability of Unicode character data
across users and applications. Future versions of the SVG Specification
are likely to require support of the W3C Character Model
in Conforming SVG Generators.
D.6 Conforming SVG Interpreters
An SVG interpreter is a program which can parse and process SVG documents.
A Conforming SVG Interpreter must be able to:
- Successfully parse and process any Conforming SVG Document,
(It is not required, however, that every possible SVG feature be supported beyond parsing.
Thus, for example, a Conforming SVG Interpreter might bypass the processing of selected
SVG elements.)
- If the program allows scripts to run against the SVG document's
Document Object Model, then a Conforming SVG Interpreter
must support the entire DOM model for SVG defined in this specification
- The XML parser must be able to handle arbitrarily long data streams.
D.7 Conforming SVG Viewers
An SVG viewer is a program which can parse and process an SVG document and
render the contents of the document onto some sort of output medium such as a display
or printer. Usually, an SVG Viewer is also an SVG Interpreter.
Specific criteria for a Conforming SVG Viewer:
- In the typical case where the SVG Viewer is also an SVG Interpreter, then
the program must also be a Conforming SVG Interpreter,
- All SVG features described in this specification (including all
graphic elements, attributes and properties) must be
supported and rendered.
- If display devices are supported, facilities must exist for zooming and panning
of standalone SVG documents or SVG documents embedded within parent XML documents.
- If printing devices are supported, SVG documents must be printable at
printer resolutions with the same graphics features available as required
for display (e.g., color must print correctly on color printers).
- The viewer should receive enough information
from the parent environment
to determine the device resolution. (In situations where this information is
impossible to determine, the parent environment should pass a reasonable
value for device resolution which tends to approximate most
common target devices.)
- In web browser environments, the viewer must have the ability to
search and select text strings
within SVG documents.
- If display devices are supported, the viewer must have the ability to
select and copy text from an SVG document
to the system clipboard
- The viewer must have complete support for an ECMAScript binding of the
SVG Document Object Model.
- The viewer must support JPEG and PNG image formats.
- The viewer must support alpha channel blending of the SVG document image onto the target canvas.
- The viewer must support the following W3C Recommendations with regard to SVG documents:
Although anti-aliasing support isn't a strict requirement for a Conforming SVG Viewer,
it is highly recommended. Lack of anti-aliasing support will generally result in
poor results on display devices.
A higher class concept is that of a Conforming High-Quality SVG Viewer which must
support the following additional features:
- Generally, professional-quality results with good processing and rendering
performance and smooth, flicker-free animations
- On low-resolution devices such as display devices at 150dpi or less, support for smooth edges
on lines, curves and text (Smoothing is often accomplished using anti-aliasing techniques.)
- Progressive rendering and animation effects (i.e., the start of the document will start
appearing and animations will start running in parallel with downloading the rest
of the document)
- Restricted screen updates (i.e., only required areas of the display are updated
in response to redraw events)
- Background downloading of images and fonts retrieved from a web server, with updating
of the display once the downloads are complete
- Color management via ICC profile support (i.e., the ability to support colors
defined using ICC profiles)
- Resampling of image data using algorithms at least as good as bicubic resampling methods