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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章