This appendix is normative.
In order to ensure that SVG-family documents are maximally portable among SVG-family user agents, this specification rigidly defines conformance requirements for both, as well as for SVG-family document types. While the conformance definitions can be found in this appendix, they necessarily reference normative text within this document and within other related specifications. It is only possible to fully comprehend the conformance requirements of SVG through a complete reading of all normative references.
An SVG document fragment is a Conforming SVG Document Fragment if it adheres to the specification described in this document (Scalable Vector Graphics (SVG) Specification) and also:
<?xml-stylesheet?>
processing instruction conforms to
Associating stylesheets with XML documents
[XML-SS],SVG document fragments can be included within parent XML documents using the XML namespace facilities described in Namespaces in XML [XML-XS]. Note, however, that since a Conforming SVG Document Fragment must have an ‘svg’ element as its root, the use of an individual non-‘svg’ element from the SVG namespace is disallowed. 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/2000/svg" x="0" y="0" width="10" height="10" /> <!-- More elements from ParentXML go here --> </ParentXML>
Instead, for the SVG part to become a Conforming SVG Document Fragment, 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/2000/svg" width="100px" height="100px"> <z:rect x="0" y="0" width="10" height="10"/> </z:svg> <!-- More elements from ParentXML go here --> </ParentXML>
The SVG language or these conformance criteria provide no designated size limits on any aspect of SVG content. There are no maximum values on the number of elements, the amount of character data, or the number of characters in attribute values.
A file is a Conforming SVG Stand-Alone File if:
A Conforming SVG Generator is a program which:
Additionally, an authoring tool which is a Conforming SVG Generator conforms to all of the Priority 1 accessibility guidelines from the document Authoring Tool Accessibility Guidelines 1.0 [ATAG] that are relevant to generators of SVG content. (Priorities 2 and 3 are encouraged but not required for conformance.)
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.
On occasions when expression of the information exceeding single precision is desired for some use cases such as maps and technical drawings, it is encouraged that the following generation steps are utilized.
Although the real number precision of SVG is single-precision, presentation with an effective precision higher than single-precision may be obtained by generating SVG content that takes advantage of the fact that at least double-precision floating point must be used when generating a CTM (See CTM generation processing in the Conforming SVG Viewers section). The steps for generating content that takes advantage of this are:
Before Splitting | After Splitting | |
---|---|---|
Step 1 : Splitting content | Step 5 : Arranging tiles with smaller effective digits and appropriate translate | |
---|---|---|
This example provides the significant figure of eight digits using tiles with the user coordinate system of seven digits. |
Conforming SVG Servers must meet all the requirements of a Conforming SVG
Generator. In addition, Conforming SVG Servers using HTTP or other protocols
that use Internet Media types must serve SVG stand-alone files with the media
type "image/svg+xml"
.
Also, if the SVG file is compressed with gzip or deflate, Conforming SVG Servers must indicate this with the appropriate header, according to what the protocol supports. Specifically, for content compressed by the server immediately prior to transfer, the server must use the "Transfer-Encoding: gzip" or "Transfer-Encoding: deflate" headers as appropriate, and for content stored in a compressed format on the server (e.g. with the file extension "svgz"), the server must use the "Content-Encoding: gzip" or "Content-Encoding: deflate" headers as appropriate.
Note: Compression of stored content (the "entity," in HTTP terms) is distinct from automatic compression of the message body, as defined in HTTP/1.1 TE/ Transfer Encoding ([RFC2616], sections 14.39 and 14.41).
A DOM subtree rooted at a given element is a Conforming SVG DOM Subtree if, once serialized to XML, is a Conforming SVG Document Fragment. If the DOM subtree cannot be serialized to XML, such as when a Comment node's data contains the substring "--", then the subtree is not a Conforming SVG DOM Subtree.
An SVG Interpreter is a program which can parse and process SVG document fragments. Examples of SVG Interpreters are server-side transcoding tools (e.g., a tool which converts SVG content into modified SVG content) or analysis tools (e.g., a tool which extracts the text content from SVG content). An SVG viewer also satisfies the requirements of an SVG interpreter in that it can parse and process SVG document fragments, where processing consists of rendering the SVG content to the target medium.
A Conforming SVG Interpreter must be able to parse and process all XML constructs defined within XML 1.0 [XML10] and Namespaces in XML [XML-NS].
A Conforming SVG Interpreter must parse any SVG document correctly. It is not required to interpret the semantics of all features correctly.
A Conforming SVG Interpreter must be able to support at least one of the following processing modes defined in the SVG integration specification [SVG-INTEGRATION]:
Note: A transcoder from SVG into another graphics representation, such as an SVG-to-raster transcoder, represents a viewer, and thus viewer conformance criteria apply.
Action: | Look at the performance class requirements and decide whether to remove points or move them into general requirements. (heycam)
Spec that calculation of CTMs should use double precision. (stakagi) |
---|---|
Resolution: | Remove performance class requirements from SVG 2. ( ConformingHighQualitySVGViewers ) |
Purpose: | To modulate the tradeoff of a numerical precision in use cases of the technical drawing and mapping, and the performance of user agent. |
Owner: | heycam, stakagi |
An SVG viewer is a program which can parse and process an SVG document fragment and render the contents of the document onto some sort of output medium such as a display or printer; thus, an SVG Viewer is also an SVG Interpreter.
A Conforming SVG Viewer must be able to support at least one of the following processing modes defined in the SVG integration specification [SVG-INTEGRATION]:
Specific criteria that must apply to a Conforming SVG Viewer:
$$ (single) {\large \rm CTM} = (single) \left( (double) \left[ \begin{matrix} a_1 & c_1 & e_1 \\ b_1 & d_1 & f_1 \\ 0 & 0 & 1 \end{matrix} \right] \cdot (double) \left[ \begin{matrix} a_2 & c_2 & e_2 \\ b_2 & d_2 & f_2 \\ 0 & 0 & 1 \end{matrix} \right] \right) $$
$$ (single) \left[ \begin{matrix} x_{\rm viewport} \\ y_{\rm viewport} \\ 1 \end{matrix} \right] = {\large \rm CTM} \cdot (single) \left[ \begin{matrix} x_{\rm userspace} \\ y_{\rm userspace} \\ 1 \end{matrix} \right] $$
Although anti-aliasing support is not a strict requirement for a Conforming SVG Viewer, it is highly recommended for display devices. Lack of anti-aliasing support will generally result in poor results on display devices.
A Conforming SVG Viewer that supports processing modes that include interaction must support the following additional features:
A Conforming SVG Viewer that supports processing modes that include script execution must support the following additional features:
The Web Accessibility Initiative is defining User Agent Accessibility Guidelines 1.0 [UAAG]. Viewers are encouraged to conform to the Priority 1 accessibility guidelines defined in this document, and preferably also Priorities 2 and 3. Once the guidelines are completed, a future version of this specification is likely to require conformance to the Priority 1 guidelines in Conforming SVG Viewers.
A Conforming SVG Viewer must be able to apply styling properties to SVG content using presentation attributes.
If the user agent supports Cascading Style Sheets, level 2 revision 1 [CSS21], a Conforming SVG Viewer must support CSS styling of SVG content and must support all features from CSS 2.1 that are described in this specification as applying to SVG (see Styling). The supported features from CSS 2.1 must be implemented in accordance with the conformance definitions from the CSS 2.1 specification ([CSS21], section 3.2).
If the user agent includes an HTML or XHTML viewing capability or can apply CSS/XSL styling properties to XML documents, then a Conforming SVG Viewer must support resources of MIME type "image/svg+xml" wherever raster image external resources can be used, such as in the HTML or XHTML ‘img’ element and in CSS/XSL properties that can refer to raster image resources (e.g., ‘background-image’).
A higher order concept is that of a Conforming High-Quality SVG Viewer.
A Conforming High-Quality SVG Viewer must support the following additional features:
A Conforming High-Quality SVG Viewer that supports processing modes that include script execution, declarative animation, or interaction must support the following additional features:
A Conforming High-Quality SVG Viewer that supports processing modes that include interaction must support the following additional features: