SVG2规范中英对照(第二章:一致性原则,2.1~2.2)

Chapter 2: Conformance Criteria 第二章:一致性原则

Overview . Previous . Next . Elements . Attributes . Properties

contents 目录

    1. 2.1.Overview
    2. 2.2.Processing modes
      1. 2.2.1.Features
      2. 2.2.2.Dynamic interactive mode
      3. 2.2.3.Animated mode
      4. 2.2.4.Secure animated mode
      5. 2.2.5.Static mode
      6. 2.2.6.Secure static mode
    3. 2.3.Processing modes for SVG sub-resource documents
      1. 2.3.1.Examples
    4. 2.4.Document Conformance Classes
      1. 2.4.1.Conforming SVG DOM Subtrees
      2. 2.4.2.Conforming SVG Markup Fragments
      3. 2.4.3.Conforming XML-Compatible SVG Markup Fragments
      4. 2.4.4.Conforming XML-Compatible SVG DOM Subtrees
      5. 2.4.5.Conforming SVG Stand-Alone Files
      6. 2.4.6.Error processing
    5. 2.5.Software Conformance Classes
      1. 2.5.1.Conforming SVG Generators
      2. 2.5.2.Conforming SVG Authoring Tools
      3. 2.5.3.Conforming SVG Servers
      4. 2.5.4.Conforming SVG Interpreters
      5. 2.5.5.Conforming SVG Viewers
        1. 2.5.5.1.Printing implementation notes
      6. 2.5.6.Conforming High-Quality SVG Viewer

2.1. Overview 概要

Graphics defined with SVG have many different applications. As a result, not all software that uses SVG will have the same features. Conformance to the SVG specification is therefore not a binary matter; sofware may be conforming within a restricted feature set.

使用SVG定义的图形有许多不同的应用。因此,并不是所有使用SVG的软件都会表现相同的特性。对于SVG规范的一致性不是二进制(数据)问题;而是应用软件可能在受限制的特征集中需要确认的。

Furthermore, SVG is designed to be integrated into other types of documents; depending on the type of integration, only a limited feature-set may be appropriate. There are various ways that an SVG document fragment can be referenced by or included in other documents and thereby be processed by a user agent. SVG documents can also be viewed directly, as the primary document. Each different method by which an SVG document fragment can be used implies a certain set of requirements on how the SVG document fragment must be processed.

将来,SVG被设计成能够集成到其它类型的文档中;依赖集成的类型,仅有有限的特征集能够适用。用户有很多中方法去引用或者包含SVG文档的片段。SVG文档片段能够体现在怎样处理SVG文档片段的某种需求上。

This chapter therefore defines a number of processing modes that encompass the different combinations of features which may be enabled or disabled in the document. In addition, it specifies normative requirements for which processing mode must be used when SVG documents reference or embed other SVG documents. The same set of processing modes may be used by reference in other specifications to describe how SVG documents should be processed.

所以,此章节阐述包括大量不同特征的组合的情形,它们有的有效,有的可能无效。此外,当SVG文档在其他SVG文档中引用或者嵌入时,该章节定义了通常的处理要求。

This document does not place normative requirements on other specifications that can reference or include SVG documents, such as HTML and various CSS specifications. The intention is for these other specifications to normatively point to the appropriate processing mode from this document.

此文不想把通常的需求置于能够引用或者包含SVG文档的规范之上,例如HTML和各种CSS规范。目的是让这些对于通常适用的处理情形能够从此文中得到参考。

This chapter also outlines specific conformance requirements for different types of SVG content, and different classes of software that use or create SVG.

此章节对于不同类型的SVG内容和不同级别的软件也勾勒了去使用或者创建SVG的特定一致性需求。

2.2. Processing modes 处理模式

This section defines a standard set of processing modes for SVG documents. Each processing mode specifies whether certain high level SVG features are enabled.

本节定义一套标准的处理模式。每一个处理模式定义了某种高水平SVG特性是否有效。

2.2.1. Features 特性

The features that can be enabled or disabled depending on the processing mode are as follows:

特性是否有效依赖与厦门的处理模式:

declarative animation

声明动画

Declarative animation includes both the animation elements in SVG – ‘animate’, ‘animateMotion’, ‘animateTransform’ and ‘set’ – and CSS Transitions and Animations (see the Animation appendix for details). When declarative animations are disabled in an SVG document, any animation elements or CSS Transitions or Animations must not be applied or run.

声明动画有两种方法:一种是SVG动画元素‘animate’, ‘animateMotion’, ‘animateTransform’ 和‘set’ ,另一种是CSS转化或动画(具体参考动画附录:Animation appendix)。当在SVG文档中声明动画无效时,任何动画元素或者CSS转化或动画不能被应用了。

This is not the same as pausing the document's animated state at 0s document time; if an animation is defined to begin at 0s, it still will not be applied.

这个与在文档中定义动画为0秒时暂停是不同的;如果一个动画被定义了从0秒开始,它仍然没有被应用。

references to external resources

引用外部资源

References to external resources are URLs references or network access requests made by markup, style properties, script or other Web platform features used in the document, except for:

引用网络外部资源,包括标记、风格属性、脚本或者其他网页平台使用的特性:

When external references are disabled in an SVG document, any attempt to fetch a document through an external reference must instead be treated as if a network error occurred and no data was received.

在SVG文档中当引用外部时,任何试图从外部引用中获取文档都需要处理当网络错误和没有收到数据的情形。

When external references are enabled, user agents that support external file requests from the Internet must adhere to the restrictions on cross-origin resource fetching, as outlined in the Linking chapter.

当引用外部可以时,支持从网络获取的外部的用户必须收到交叉资源的限制,在the Linking chapter进行了概要说明。

script execution

执行脚本

Script execution is the execution of any SVG ‘script’ elements, script found in event attributes(such as ‘onclick’ on SVG elements), or any other script defined by other Web platform features used in the document, such as any HTML ‘script’ elements. When script execution is disabled in an SVG document, no script in the document must be run.

执行脚本是执行SVG脚本元素,通过脚本处理SVG事件属性(‘onclick’ ),或者通过文档中定义的网页平台属性,例如HTML脚本元素。当在SVG文档中执行脚本被禁止,则此文档中的脚本都被禁止执行。

interaction

交互

Interaction refers to the delivery of DOM Events or the invocation of any user agent specific UI behaviors such as text selection, focus changing, link traversal, or animation or transition triggering that is done in response to user input such as mouse or keyboard activity. When interaction is disabled in an SVG document, any user input events that would be targetted at the document or any elements within the document must have no effect.

来自与DOM事件或者用户定义的UI行为的交互,例如选择文字、焦点变化、转链接、或者动画、或者响应用户键鼠输入后转化触发。当在SVG文档中禁止了交互,则任何指向该文档或者元素的用户输入事件都没有影响。

2.2.2. Dynamic interactive mode 动态交互模式

This processing mode imposes no restrictions on any feature of the SVG language.

此处理模式适用任何SVG特性。

Dynamic Interactive Features 动态交互特性
script execution 脚本执行 yes
external references 外部引用 yes
declarative animation 声明动画 yes
interactivity 交互 yes

2.2.3. Animated mode 动画模式

This processing mode is intended for circumstances where an SVG document is to be used as an animated image that is allowed to resolve external references, but which is not intended to be used as an interactive document.

此模式目的是解决当SVG文档被使用为允许解析外部引用的动画图片,但是又不想作为交互文档使用的情形。

Animated Features
script execution no
external references yes
declarative animation yes
interactivity no

2.2.4. Secure animated mode 安全动画模式

This processing mode is intended for circumstances where an SVG document is to be used as an animated image that is not allowed to resolve external references, and which is not intended to be used as an interactive document. This mode might be used where image support has traditionally been limited to raster images (such as JPEG, PNG and GIF).

此模式目的是解决当SVG文档被使用为允许解析外部引用的动画图片,但是又不想作为交互文档使用的情形。此模式可能用于支持传统受限于光栅图片(例如:JPEG,PNG,GIF)。

Secure Animated Features
script execution no
external references no
declarative animation yes
interactivity no

2.2.5. Static mode 静态模式

This processing mode is intended for circumstances where an SVG document is to be used as a non-animated image that is allowed to resolve external references, but which is not intended to be used as an interactive document. For example, an SVG viewer that processes graphics for inclusion in print documents would likely use static mode.

此模式目的是SVG文档被用于解析外部引用的非动画图像,但是又不想作为交互文档的情形。例如,含有打印文档的图形处理的SVG浏览器就可能使用静态模式。

Static Features
script execution no
external references yes
declarative animation no
interactivity no

2.2.6. Secure static mode 安全静态模式

This processing mode is intended for circumstances where an SVG document is to be used as a non-animated image that is not allowed to resolve external references, and which is not intended to be used as an interactive document. This mode might be used where image support has traditionally been limited to non-animated raster images (such as JPEG and PNG.)

此模式目的是SVG文档被用于解析外部引用的非动画图像,但是又不想作为交互文档的情形。此模式可能使用于支持传统受限于非动画光栅图像(例如:JPEG,PNG)

Secure Static Features
script execution no
external references no
declarative animation no
interactivity no
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章