SVG Tiny 1.2 – 20081222

D 適合性基準

目次

この付録は正式なものである。 This appendix is normative.

D.1 概要

この仕様では次に分類される成果物のそれぞれに対し適合性基準を定めている: This specification defines conformance for several classes of products:

一部の SVG 表示ソフトウエアはアニメーションあるいは他の実行時の変更を反映しない 。例えば、サーバ側ラスタライザや SVG 対応プリンタなど。従って、この仕様では静的および動的 SVG ビューアに対し異なる適合性水準を与える。 Some SVG displaying software will not display animations or other runtime modifications — for example, server side rasterizers or SVG-enabled printers. Therefore, this specification has different conformance levels for static and dynamic SVG viewers.

D.2 語法

この仕様においてキーワード "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "OPTIONAL" は RFC 2119 [RFC2119] に述べられる意味で解釈するものとする。しかしながら、可読性のため、この仕様ではこれらの単語を大文字で表記はしない。 【これらの語に対する当訳における言い回しについては、この翻訳の読み方の語法の節を参照されたし。】 Within this specification, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119 [RFC2119]. However, for readability, these words do not necessarily appear in all uppercase letters in this specification.

すべての例は情報を提供するものであり、正式なものではない。すべての章は特に情報を提供するものと断らない限り正式なものである。すべての付録は情報を提供するものか正式なものか明記している。この仕様の注釈と RelaxNG スキーマとが衝突する場合、注釈の方が優先される(例えば, 一部の属性の注釈の記述には許容される値の EBNF 構文が含まれるが、それらは RelaxNG では記述不能である)。同様に、 DTD あるいは W3C XML スキーマと RelaxNG スキーマが衝突する場合、 RelaxNG の方が優先される( RelaxNG は W3C XML スキーマによる表現で問題になる内容モデルに対するある種の制約を表現でき、名前空間の扱いも DTD より自然かつ汎用的な方法で表現できる)。 All examples are informative, not normative. All chapters are normative except for specific sections marked as being informative. All appendices state whether the appendix is normative or informative. In the case of a conflict between the prose of this specification and the RelaxNG schema, the prose is authoritative (for example, the prose description of some attributes has an EBNF grammar for allowed values, which the RelaxNG is not able to express). Similarly in the case of a conflict between a DTD or W3C XML Schema and the RelaxNG schema, the RelaxNG is authoritative (RelaxNG can express some constraints on content models that are problematic to express in W3C XML schema, and expresses namespaces in a natural and more general way than a DTD is able to).

D.3 SVG 内容の適合性基準

D.3.1 適合 SVG 文書片

SVG 文書片は、SVG のスキーマ( RelaxNG スキーマ を見よ)も含む、この文書( Scalable Vector Graphics (SVG) Tiny 1.2 仕様 )に示される仕様と次に挙げる条件を満たすとき、適合 SVG 文書片とされる。 An SVG document fragment is a Conforming SVG Document Fragment if it adheres to the specification described in this document (Scalable Vector Graphics (SVG) Tiny 1.2 Specification) including SVG's schema (see RelaxNG schema) and also:

NVDL スクリプト: NVDL script:

<rules xmlns='http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0'>
   <namespace ns='http://www.w3.org/2000/svg'>
     <validate schema='Tiny-1.2.rng'>
       <mode>
         <namespace ns='http://www.w3.org/2000/svg' match='attributes'>
           <reject/>
         </namespace>
         <namespace ns='' match='attributes'>
           <attach/>
         </namespace>
         <namespace ns='http://www.w3.org/XML/1998/namespace' match='attributes'>
           <attach/>
         </namespace>
         <namespace ns='http://www.w3.org/1999/xlink' match='attributes'>
           <attach/>
         </namespace>
         <namespace ns='http://www.w3.org/2001/xml-events' match='elements attributes'>
           <attach/>
         </namespace>
         <anyNamespace match='elements attributes'>
           <mode>
             <anyNamespace>
               <allow/>
             </anyNamespace>
           </mode>
         </anyNamespace>
       </mode>
     </validate>
   </namespace>
</rules>
        

SVG 言語とこれらの適合性基準は SVG 内容に対するいかなる容量制限も規定しない。要素数の最大値, 文字データ量, 属性値の文字数に制限は設けない。 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.

D.3.2 適合 SVG 独立文書

次を満たす文書が適合 SVG 独立文書になる: A document is a Conforming SVG Stand-Alone Document if:

D.3.3 適合 SVG 被包含文書片

XML 名前空間 1.0 仕様 [XML-NS10] あるいは XML 名前空間 1.1 仕様 [XML-NS] (利用する XML のバージョンによる)で定められる XML 名前空間の機能により、 SVG 文書片を親の XML 文書内に含ませることができる。 SVG document fragments can be included within parent XML documents using the XML namespace facilities described in the Namespaces in XML 1.0 specification [XML-NS10] or the Namespaces in XML 1.1 specification [XML-NS] (depending on the version of XML used).

親の XML 文書内に含まれる SVG 文書片が親 XML 文書から取り出したときに、適合 SVG 文書片に要求される基準に適合するならば、適合被包含 SVG 文書片である。 An SVG document fragment that is included within a parent XML document is a Conforming Included SVG Document Fragment if the SVG document fragment, when taken out of the parent XML document, conforms to the criteria for Conforming SVG Document Fragments.

特に、SVG 名前空間の個別の要素はそれ自身では利用できないことに注意。従って次の文書の SVG の部分は適合していない 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:

<ParentXML xmlns="http://ns.example/">
   <!-- 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"/>
   <!-- ParentXML の要素がもっとここに -->
   <!-- More elements from ParentXML go here -->
</ParentXML>
      

次のように修正を施せば SVG の部分が適合被包含 SVG 文書片になる: Instead, for the SVG part to become a Conforming Included SVG Document Fragment, the document could be modified as follows:

<ParentXML xmlns="http://ns.example/">
   <!-- 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>
   <!-- ParentXML の要素がもっとここに -->
   <!-- More elements from ParentXML go here -->
</ParentXML>
    

D.3.4 条件付き適合 SVG Tiny 1.2 文書片

大きなプロファイルに適合する内容を作成しつつ、より小さなプロファイルにも適する様にすることが望ましい場合がある。例えば SVG 内容に switch 要素が存在し、一方の分岐では 条件処理属性 により、適合 SVG 1.2 Tiny ビューアにおいては偽と評価されるような保護がかけられていて、そこでは SVG Tiny 1.2 では利用できない機能を利用していて(パターンフィル, 画像のクリッピング, フィルタ効果など)、もう一方の分岐では SVG Tiny 1.2 内容になっている(グラデーションフィル等)場合など。内容のうち SVG Tiny 1.2 ビューアで描画される部分はすべて SVG Tiny 1.2 であっても、全体としては SVG Tiny 1.2 に適合しない。 It is sometimes desirable to create content conforming to a larger profile, and have fallback to a lower profile. For example, some SVG content might have a switch element where one branch, protected by a conditional processing attribute that will evaluate to false in a conformant SVG 1.2 Tiny viewer, uses features not available in SVG Tiny 1.2 (pattern fills, clipped images, filter effects) and another branch has SVG Tiny 1.2 content (such as a gradient fill). The parts of the content that will be rendered by an SVG Tiny 1.2 viewer are all SVG Tiny 1.2, yet the content as a whole does not conform to SVG Tiny 1.2.

SVG 文書片が条件付き適合 SVG Tiny 1.2 文書片であるとは: An SVG document fragment is a Conditionally Conforming SVG Tiny 1.2 Document Fragment if:

  1. requiredFeatures 属性を利用してこの仕様で定義されていない機能を要求するすべての要素に偽とマークする All elements using a 'requiredFeatures' attribute to require a feature not defined in this specification are marked as false
  2. requiredExtensions 属性を利用してこの仕様で定義されていない拡張を要求するすべての要素に偽とマークする All elements using a 'requiredExtensions' attribute to require an extension are marked as false
  3. 文書片から偽とマークしたすべての要素(およびそれらの子孫要素)を取り除く The document fragment is transformed to remove all elements (and their children) marked false
  4. 結果の文書片が適合 SVG 文書片になっている The transformed document fragment is a Conforming SVG Document Fragment

D.4 SVG ライタの適合性

D.4.1 適合 SVG ジェネレータ

適合 SVG ジェネレータとは次を満たすプログラムのことである: A Conforming SVG Generator is a program which:

SVG ジェネレータが ID を持つ要素を書き込む際は、書き込む内容が SVG ビューアを対象にしている場合は id 属性の方を xml:id 属性 [XMLID] よりも優先させ、汎用の XML プロセッサを対象にしている場合は xml:id の方を id よりも優先させるべきである。 SVG ジェネレータは同じ文書の SVG 名前空間の要素に両方の属性を混在させてはならない。 When writing elements that have an ID defined, an SVG Generator should prefer the 'id' attribute over the 'xml:id' attribute [XMLID] for content that is known to target SVG viewers, and 'xml:id' over 'id' for content that is known to target generic XML processors. An SVG Generator must not include both attributes for the same document on elements in the SVG namespace.

SVG ジェネレータは、ウェブ文字モデル 1.0:正規化 [CHARMOD-NORM] などの 国際化分野における W3C の開発成果 に従うことが推奨される。将来版の SVG 仕様においては適合 SVG ジェネレータに対するそれらの仕様のサポートが見込まれている。 SVG generators are encouraged to follow W3C developments in the area of internationalization such as Character Model for the World Wide Web 1.0: Normalization [CHARMOD-NORM]. Future versions of the SVG specification may require support of that specification in Conforming SVG Generators.

D.4.2 適合 SVG 文書作成ツール

適合 SVG 文書作成ツールは、適合 SVG ジェネレータに要求されるすべての要件を満たさなければならない。 加えて、 適合 SVG 文書作成ツールは SVG内容の生成に関する部分において、 文書作成ツール・アクセシビリティ指針 1.0 [ATAG] による優先度(Priority)1のアクセシビリティ指針すべてへの適合が要求される(優先度2および3も奨励されるが適合性には要求されない)。 Conforming SVG Authoring Tools must meet all the requirements of a Conforming SVG Generator. Additionally, a Conforming SVG Authoring Tool must conform 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.)

D.4.3 適合 SVG サーバ

適合 SVG サーバは適合 SVG ジェネレータに要求される基準をすべて満たさなければならない。加えて、 HTTP あるいは他のインターネットメディア型を利用するプロトコルを利用する適合 SVG サーバは、メディア型 "image/svg+xml" の SVG 独立文書ファイルを提供できなければならない。 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".

また、 SVG ファイルが gzip またはデフレートにより圧縮されている場合、適合 SVG サーバは、どのプロトコルをサポートしているか適切なヘッダにより指示できなければならない。特に、転送直前に内容を圧縮する場合、サーバは "Transfer-Encoding: gzip" または "Transfer-Encoding: deflate" ヘッダのいずれか適切な方を用いなければならない。サーバにおいて圧縮形式(例えばファイル名拡張子 "svgz" )で保存されている場合、サーバは "Content-Encoding: gzip" または "Content-Encoding: deflate" ヘッダのいずれか適切な方を用いなければならない。 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.

注記: HTTP/1.1 TE/ 転送エンコーディング ([RFC2616], 14.39, 14.41 節) に定められているように、圧縮保存された内容 ( HTTP 用語の "entity" ) とメッセージボディの自動圧縮とは異なる。 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).

D.5 SVG リーダの適合性

D.5.1 適合 SVG インタープリタ

SVG インタープリタとは、SVG文書片のパースおよび処理が可能なプログラムのことを意味する。SVG インタープリタの例としては、検索エンジン(例えばテキストやメタデータその他の SVG 内容の検索サービス), サーバ側データ変換ツール(例えば SVG 内容を修正して SVG 内容に変換するツール), 解析ツール(例えば SVG 内容からテキスト内容を抽出するツール)などが挙げられる。 SVG ビューア は、処理が対象メディアへの SVG 内容の描画であるという意味で SVG 文書片のパースおよび処理が可能でなければならないので、 SVG インタープリタに対する要求を満足することになる。 An SVG interpreter is a program which can parse and process SVG document fragments. Examples of SVG interpreters are a search engine (e.g. a service which indexes text, metadata, or other SVG content), 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.

適合 SVG インタープリタにおける XML パーサは [XML11] および [XML-NS] で定めらるすべての XML 構造のパースおよび処理ができなければならない。 In a Conforming SVG Interpreter, the XML parser must be able to parse and process all XML constructs defined within [XML11] and [XML-NS].

適合 SVG インタープリタは、適合 SVG Tiny 1.1 文書片 [SVGM11] のパースおよび処理ができなければならない。 A Conforming SVG Interpreter must be able to parse and process a conforming SVG Tiny 1.1 document fragment [SVGM11].

適合 SVG インタープリタは、ウェブ文字モデル 1.0 :根本原則 [CHARMOD] に定められた 'I' 適合基準のうち適用可能なものすべてに適合しなければならない。 A Conforming SVG Interpreter must conform to all applicable 'I' conformance criteria in Character Model for the World Wide Web 1.0: Fundamentals [CHARMOD].

適合 SVG インタープリタは次の2種に分類される: There are two sub-categories of Conforming SVG Interpreters:

適合 SVG インタープリタは任意の SVG 文書を正しくパースできなければならない。すべての特色機能の意味内容を正しく解釈することは要求されていない。 SVG 名前空間の要素の属性値の構文法、および、実装するプロファイル( SVG Tiny 1.2 )から得られる知識を元に SVG 名前空間の要素の内容モデルを検証できればよい。 A Conforming SVG Interpreter must parse any SVG document correctly. It is not required to interpret the semantics of all features correctly. It needs only check the syntax of attribute values on elements in the SVG namespace, and element content models in the SVG namespace that it knows about from the profile it implements (SVG Tiny 1.2).

注記: SVG からラスターへの変換など、 SVG から別のグラフィックス表現へのデータ変換は一種のビューアであり、ビューアに対する適合性基準が適用される( 適合 SVG ビューア を見よ)。 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. (See Conforming SVG Viewers.)

SVG 内容の 索引付けを行う適合 SVG インタープリタ(例えば検索エンジン)は、少なくとも、 テキスト内容要素 および 記述要素 の内容を含むすべてのテキストデータの抽出および処理を、作成者により表示および変換目的で与えられた他の言語に注意を払いつつ、行わなければならない。加えて、要素型, 文書構造, メタデータ, リンクデータの情報も索引付けに与える処理も行うべきである。画像の索引付けを行う適合 SVG インタープリタは SVG 内容を画像として分類および表現すべきである。そのような SVG インタープリタは索引付けの向上にあたり、 SVG 文書の幾何的意味内容や出力画像に対する(形状認識などの)ヒューリスティクスを適用することになるであろう。 A Conforming SVG Interpreter which indexes SVG content (e.g. a search engine) must, at a minimum, extract and process all textual data, including the content of the text content elements and descriptive elements, with attention paid to author-supplied alternate languages for purpose of presentation and translation. Additionally, it should process element types, document structure, metadata, and link data to inform the indexing. A Conforming SVG Interpreter which indexes images should categorize and represent SVG content as an image. Such an SVG Interpreter may apply heuristics to the geometric semantics of the SVG document or to the rendered image (such as performing shape-recognition) to improve indexing.

D.5.2 適合 SVG ビューア

SVG ビューアとは、 SVG 文書片のパースおよび処理が可能であり、文書の内容をディスプレイやプリンタなどの何らかの出力メディアに描画可能なプログラムを意味する。従って、SVG ビューアSVG インタープリタでもある。 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.

適合 SVG ビューアは次の2種に分類される: There are two sub-categories of Conforming SVG Viewers:

適合静的 SVG ビューア適合動的 SVG ビューアの両方に、以下の特別な基準への適合が要求される: Specific criteria that apply to both Conforming Static SVG Viewers and Conforming Dynamic SVG Viewers:

アンチエイリアスのサポートは厳密には適合 SVG ビューアに要求されていないが、ディスプレイ装置に対しては強く推奨される。アンチエイリアスのサポートが無い場合、ディスプレイ装置への描画結果は一般に低品質になる。 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.

適合動的 SVG ビューアにのみ、以下の特別な基準への適合が要求される: Specific criteria that apply to only Conforming Dynamic SVG Viewers:

Web Accessibility Initiative [WAI] は ユーザエージェント・アクセシビリティ指針 1.0 [UAAG] を定めた。適合 SVG ビューアは UAAG において定められた優先度1のアクセシビリティ指針に適合しなければならなず、優先度2と3にも適合すべきである。 The Web Accessibility Initiative [WAI] has defined User Agent Accessibility Guidelines 1.0 [UAAG]. A Conforming SVG Viewer must conform to the Priority 1 accessibility guidelines defined in UAAG, and should conform also to Priorities 2 and 3.

適合 SVG ビューア呈示属性 の利用によりスタイル付けプロパティを SVG 内容に適用できなければならない。 A Conforming SVG Viewer must be able to apply styling properties to SVG content using presentation attributes.

D.6 拡張に対する適合性の要件

仕様と実装は SVG の仕様を拡張してもよいが、適合性を主張する場合、以下の基準を満たさなければならない: Specifications and implementations are allowed to extend the SVG specification but in order to claim conformance the following criteria need to be met:

D.7 非 XML エンコーディングに対する適合性の要件

非 XML エンコーディング(効率的な XML 圧縮など)により符号化された SVG 文書片, SVG 独立文書, SVG 被包含文書がこの仕様に適合するとは、そのエンコーディングにより XML と符号化された状態との往来が繰り返されても、結果の文書が SVG-UA に処理されたときに、描画, アニメーション, 対話性の処理が常に元のものと完全に同一になることが保証されることである。これには、非適合内容と外部名前空間の内容を欠損無く符号化し、かつ、文書型定義の正式な一部の内部サブセットで与えられた ID の綴りも desc, title などの描画されない要素や 条件処理 により 描画木 から除外された要素も取り除かれないことも含め、それらに限られず、符号化による保存性の厳守が要求される。 An SVG Document Fragment, SVG Stand-Alone Document or SVG Included Document encoded using a non-XML encoding (e.g. efficient XML compression) conforms to this specification if and only if the non-XML encoding in question guarantees roundtripping from XML to the encoding and back in such a way that the resulting document when processed by an SVG user agent must always render, animate, and interact in the exact same way as the original. Note that this requires a high-level of fidelity from the encoding including, but not limited to, the ability to encode non-conforming content and content from foreign namespaces without loss, maintaining ID typing supplied by the internal subset of the formal part the Document Type Definition, and not removing non-rendered elements such as 'desc', 'title', or elements removed from the rendering tree through use of conditional processing attributes.