1 بزودی
محتویات
1.1 در مورد SVG
این مشخصات خصیصه ها و ترکیب گرامری را برای
گرافیک برداری مقیاس پذیر (SVG)
تعیین می نمایند.
SVG زبانی برای توصیف گرافیک دو بعدی در [XML [XML10
می باشد. SVG
به سه نوع شیء دیداری اجازه می دهد: اشکال گرافیک برداری (برای مثال، مسیرها
شامل خطوط مستقیم و منحنی)، تصاویر و متن. اشیای گرافیکی می توانند گروه بندی
شده، سبک بندی شده، دگرگون شده و درون اشیای ارایه شده ی قبلی ترکیب شده باشند.
مجموعه ی ویژگی در بر دارنده ی دگرگونی های تو در تو، مسیرهای کوتاه کردن،
ماسکهای آلفا، اثرات فیلتر و اشیای قالب می باشد.
ترسیمات SVG می توانند فعل و انفعالی و
پویا باشند. انیمیشنها
هم می توانند بصورت اعلانی (یعنی، با تعبیه ی عناصر انیمیشن SVG در محتوای SVG)
یا از طریق اسکریپت نویسی صورت پذیرند.
موارد کاربردی ماهرانه ی SVG با استفاده از یک زبان اسکریپت نویسی الحاقی که
مدل شیء گرای سند DOM) SVG)در دسترس قرار می دهد امکانپذیر است، که دسترسی کامل به همه ی عناصر،
ویژگیها و مشخصات را فراهم می نماید. مجموعه ای غنی از
رسیدگی کنندگان رویداد همچون onmouseover
و onclick می توانند به هر شیء گرافیکی SVG نسبت داده شده باشند. بدلیل
سازگاری و اتکاپذیری دیگر استانداردهای وب
شان، خصیصه ها اسکریپت نویسی انجام شده در XHTML و
عناصر SVG
را همزمان درون صفحه وب یکسان دوست دارند.
SVG زبانی برای محتوای گرافیکی غنی می باشد. بنابر دلایل دستیابی پذیری، اگر
یک سند منبع اصلی ساختار و معانی سطح بالا هست، پیشنهاد شده که اطلاعات سطح
بالا ایجاد شده و بطریقی در دسترس باشد، با ساخت سند منبع اصلی در دسترس باشد،
یا ایجاد یک ورژن متناوب در دسترس در یک فرمت متناوب که اطلاعات سطح بالا را می
رساند، یا با استفاده از خصیصه های متعلق به SVG جهت در بر داشتن اطلاعات سطح
بالا درون محتوایSVG. برای فنون مورد اشاره در تحقق قابلیت دستیابی بهتر
دستیابی پذیری را ببینید.
1.1.1 پیمانه بندی
پیمانه بندی SVG در اینجا شامل یک تجزیه ی SVG 1.0 و اشتباهات تایپی به یک
جمع آوری پیمانه های انتزاعی که واحد های ویژه کاربرد گرایی است. این پیمانه ها
ممکن است با یکدیگر و با پیمانه های تعیین شده در دیگر مشخصات (همچون
XHTML) جهت ایجاد زیر مجموعه ی SVG و انواع سند
توسعه پذیر که بصورت اعضای خانواده ی SVG
انواع سند تعیین می گردند، تعیین شوند. تطبیق را
برای یک توضیح اسناد خانواده ی SVG، و [XHTMLplusMathMLplusSVG]
را برای پروفایلی که XHTML ،MathML و SVG را ترکیب می نماید، ببینید.
هر قسمت اصلی از مشخصات SVG یک پیمانه را پس از آن قسمت، برای نمونه "پیمانه
ی متن" یا "پیمانه ی ساختار بیسیک" نام برده ارایه می نماید. یک پیمانه ی بدون
پیشوند "بیسیک" اشاره دارد بر اینکه پیمانه شامل مجموعه ی کامل عناصر و ویژگی
ها، بدون هیچ محدودیتی مطابق قسمت مربوطه ی مشخصات است. اگر در آنجا نیازی جهت
تهیه ی یک زیر مجموعه ی کاربردگرایی ماژول کامل وجود دارد، آن هنگام یک ماژول
بیسیک با پیشوند " بیسیک" اضافه شده به نام ماژول کامل ایجاد شده است. برای
نمونه، "مازول متن بیسیک" زیر مجموعه ای از "ماژول متن" است.
این برای یک پروفایل SVG 1.1 اشتباهی است که شامل هر دوی ماژول کامل و مازول
زیر مجموعه ی بیسیک اش می باشد (برای نمونه، "ماژول متن" و "ماژول متن بیسیک").
1.1.2 مجموعه های عنصر و ویژگی
ماژول های مهم تر مجموعه ی مشخصی از عناصر و ویژگیها را تعریف می نمایند.
این مجموعه ها هنگامی که مجموعه ی ویژگیهای مجاز در یک عنصر مخصوص (برای نمونه،
مجموعه ویژگی "Style") یا مجموعه ی عناصر مجاز بصورت
زیر مجموعه ی یک عنصر خاص (برای مثال، مجموعه ی عنصر "Shape") را توصیف می کنند
بصورت تند نویسی بکار رفته اند. تمامی مجموعه ها نامهایی دارند که با یک
کاراکتر حرف بزرگ آغاز شده اند.
هنگامی که یک پروفایل در حال تعریف است، فرض می شود که تمام مجموعه ی ویژگی و
عنصر تعریف شده اند تا تهی باشند. بدین شیوه، یک ماژول می تواند مجموعه را
بصورتی که در پروفایل قرار گرفته دوباره تعریف کند، ویژگیها یا عناصر افزایشگر
جهت دسترسی در پروفایل آنها را بسازد.
بنابر این، این جهت ارجاع به یک مجموعه ی ویژگی یا عنصر مطابق ماژولی که در
پروفایل قرار نگرفته است اشتباه نیست، در واقع بدین منظور است که مجموعه تهی
است.
به استثنای این مجموعه ی Presentation.attrib است، که اتحاد تمام مجموعه های
ویژگی عرضه (یعنی، تمام مجموعه های ویژگی با رشته "Presentation" در نام شان)
می باشد.
Presentation.attrib در هر ماژول تعریف نشده است، اما در هر پروفایلی موجود
است.
یک ماژول زیر مجموعه (یعنی، یک مازول بیسیک) می تواند مجموعه ی مشخص متفاوتی
را مطابق یک ماژول ابر مجموعه تعریف نماید. پس از آن خطایی جهت قرار دادن یک
ماژول ابر مجموعه و زیر مجموعه ی گروه مشابه در یک پروفایل هست، تمام مجموعه
های عنصر و ویژگی هر یک می خواهند توسط ماژولی که شامل انها است یا می خواهند
مقدار تهی پیش فرض خودشان را داشته باشند برای یکمرتبه تعریف شده باشند (بار
دیگر، به استثنای Presentation.attrib که توسط هر ماژولی تعریف نشده است).
1.1.3 نمایه سازی مشخصات SVG
پیمانه بندی SVG 1.1 اجازه می دهد پروفایلها با لیست گیری ماژول های
SVG ای که اجازه داده شده اند و احتمالا یک شماره ی
کوچک محدودیتها یا الحاقات در عناصر مشروط توسط آن ماژول ها توصیف شده باشند.
پروفایل "Full" در SVG 1.1 مجموعه ی تمام ماژولهای کامل لیست شده در این
مشخصات است (یعنی هر ماژولی که یک ماژول زیر مجموعه نیست).
هنگامی که جهت انطباق بکار برده شده است، شرط نامحدود "SVG"
پروفایل "Full" در SVG 1.1 تعریف شده توسط این مشخصات را نتیجه می دهد. اگر یک
تحقق پذیری پروفایل Full را پیاده نکرده باشد، باید
وضعیت هر دوی پروفایل جهت وفق دادن با آن یا که تحقق زیر مجموعه ی
SVG انجام شود.
1.2 نوع SVG MIME، توسعه نام فایل و نوع فایل مکینتاش
نوع MIME برای SVG هست "image/svg+xml" ([RFC3023] را ببینید). ثبت این
نوع MIME در W3C در حال انعقاد است.
توصیه شده که فایلهای SVG در همه جا (کاملا با حروف کوچک) پسوند
"svg." داشته باشند. توصیه شده که فایلهای gzip فشرده شده ی SVG در همه
جا پسوند "svgz." (با حروف کاملا کوچک) داشته باشند.
توصیه شده که فایلهای SVG ذخیره شده در سیستم های فایل Macintosh HFS
یک نوع فایل "svg" باشند
(کاملا حروف کوچک، با یک کاراکتر فاصله بعنوان حرف چهارم). توصیه شده که
فایلهای SVG فشرده شده ی gzip ذخیره شده در سیستم های
فایل Macintosh HFS یک نوع فایل معین "svgz" باشد (کاملا با حروف
کوچک).
1.3 فضای نامی SVG، شناسه عمومی و شناسه سیستم
موارد ذیل فضای نامی SVG 1.1 هستند، شناسه ی عمومی و شناسه ی سیستم:
- فضای نامی SVG:
- http://www.w3.org/2000/svg
- شناسه ی عمومی برای SVG 1.1:
- PUBLIC "-//W3C//DTD SVG 1.1//EN"
- شناسه ی سیستم برای توصیه ی SVG 1.1:
- http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
مورد زیر نمونه ای از
اعلان نوع سند برای
یک سند SVG است:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
توجه داشته باشید که DTD لیست شده در شناسه ی سیستم یک DTD پیمانه بندی شده
است (یعنی محتویاتش بر روی فایلهای چندگانه گسترده شده اند)، که بدین منظور
است که یک اعتبار سنج می تواند ماژول های چندگانه بصورتی که معتبر شود جهت
واکشی داشته باشد. بدین سبب، در آنجا یک DTD
مسطح در دسترس است که مطابق DTD پیمانه بندی شده ی SVG 1.1
می باشد. آن می تواند در http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat.dtd
یافت شود.
1.4 سازگاری با تلاشهای دیگر استاندارد سازی
نیروی نفوذ و کامل شدن SVG با تلاشهای استاندارد
و مشخصات دیگر W3C. با اتکا و هماهنگی با دیگر استانداردها، SVG برای کاربران
جهت آموختن چگونگی پیوستن SVG به وب سایت هایشان نیرومندتر و ساختن آن آسانتر
می شود.
موارد ذیل برخی از روشهایی را که در حفاظت SVG
سازگار با، نفوذ و تکمیل با دیگر تلاشهای W3C را
توصیف می نمایند:
- SVG یک برنامه ی کاربردی XML و سازگار با توصیه ی
"زبان نشانه گذاری توسعه پذیر XML) 1.0)" می باشد [XML10]
- SVG سازگار با توصیه ی "فضاهای نامی در XML" است [XML-NS]
- SVG "زبان پیوندی اکس ام ال (
XLINK] "(XLink]
را برای ارجاع URI
بکار می برد و برای مشخصات مبنایی URI ملزومات
تعریف شده در "XML-BASE] "XML
Base] را پشتیبانی می نماید.
- ترکیب نحوی SVG برای ID
های عنصر ارجاعی یک زیر مجموعه ی سازگار ترکیب نحوی ارجاعی
ID در "زبان اشاره گر اکس ام ال
(XPointer] "(XPTR] است.
- محتوای SVG می تواند توسط هر دوی CSS (مشخصات "شیوه
نامه های آبشاری (CSS) سطح 2" را ببینید [CSS2]) یا XSL ("دگرگونی های XSL
ورژن 1.0(XSLT) " را ببینید [XSLT]) سبک شده باشد. (سبک
بندی با CSS و سبک بندی با XSL
را ببینید)
- SVG مشخصات وابسته و شیوه های مشترک با
CSS و XSL، بعلاوه ی خصیصه ها و معانی انتخاب شده ی CSS
را پشتیبانی می نماید، (مشخصات
سبک بندی SVG و کاربرد شیوه نامه
های SVG را ببینید).
- شیوه نامه های خارجی ارجاع شده اند تا سازوکار مستند شده در "شیوه نامه
های وابسته با اسناد " XML ورژن 1.0" [XML-SS] را بکار برند.
- SVG includes a complete Document Object Model (DOM) and
conforms to the "Document Object Model (DOM) level 1"
Recommendation [DOM1]. The
SVG DOM has a high level of compatibility and consistency
with the HTML DOM that is defined in the DOM Level 1
specification. Additionally, the SVG DOM supports and
incorporates many of the facilities described in "Document
Object Model (DOM) level 2" [DOM2], including
the CSS object model and event handling.
- SVG incorporates some features and approaches that are
part of the "Synchronized Multimedia Integration Language
(SMIL) 1.0 Specification" [SMIL1], including
the 'switch' element and the systemLanguage attribute.
- SVG's animation features (see Animation) were developed in
collaboration with the W3C Synchronized Multimedia (SYMM)
Working Group, developers of the Synchronized Multimedia
Integration Language (SMIL) 1.0 Specification [SMIL1]. SVG's
animation features incorporate and extend the general-purpose
XML animation capabilities described in the "SMIL Animation"
specification [
SMILANIM].
- SVG has been designed to allow future versions of SMIL to
use animated or static SVG content as media components.
- SVG attempts to achieve maximum compatibility with both
HTML 4 [HTML4]
and XHTML(tm) 1.0 [XHTML]. Many of SVG's
facilities are modeled directly after HTML, including its use
of CSS [CSS2],
its approach to event handling, and its approach to its
Document Object Model [DOM2].
- SVG is compatible with W3C work on internationalization.
References (W3C and otherwise) include: [UNICODE]
and [CHARMOD].
Also, see Internationalization
Support.
- SVG is compatible with W3C work on Web Accessibility [WAI]. Also, see Accessibility Support.
In environments which support [DOM2] for other
XML grammars (e.g., XHTML [XHTML]) and which also
support SVG and the SVG DOM, a single scripting approach can be
used simultaneously for both XML documents and SVG graphics, in
which case interactive and dynamic effects will be possible on
multiple XML namespaces using the same set of scripts.
1.5 اصطلاح شناسی
در داخل این مشخصات، کلید واژه های "MUST", "MUST NOT",
"REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY" و "OPTIONAL" بصورتی که در RFC 2119 توصیف شده، تفسیر شده
است ([RFC2119] را ببینید).
هرچند، برای خوانایی، این کلمات کاملا بصورت حروف بزرگ در این مشخصات ظاهر نمی
شوند.
گاه گاهی، این مشخصات طرز کار مناسب برای نویسندگان و عاملهای کاربری را
پیشنهاد می نمایند. این توصیه ها اصولی نیستند و تطابق با این مشخصات بسته به
ادراکشان نیست. These recommendations contain the
expression "We recommend ...", "This specification recommends
...", or some similar wording.
1.6 تعاریف
- basic shape
- Standard shapes which are predefined in SVG as a
convenience for common graphical operations. Specifically: 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon'.
- canvas
- A surface onto which graphics elements are drawn, which
can be real physical media such as a display or paper or an
abstract surface such as a allocated region of computer
memory. See the discussion of the SVG canvas in the chapter on
Coordinate Systems, Transformations and
Units.
- clipping path
- A combination of 'path', 'text' and basic shapes which serve as the
outline of a (in the absence of anti-aliasing) 1-bit mask,
where everything on the "inside" of the outline is allowed to
show through but everything on the outside is masked out. See
Clipping paths.
- container element
- An element which can have graphics elements and other
container elements as child elements. Specifically: 'svg', 'g', 'defs' 'symbol', 'clipPath', 'mask', 'pattern', 'marker', 'a' and 'switch'.
-
current innermost SVG document
fragment
- The XML document sub-tree which starts with the most
immediate ancestor 'svg' element of a given SVG
element.
- current SVG document
fragment
- The XML document sub-tree which starts with the outermost
ancestor 'svg' element of a given SVG
element, with the requirement that all container elements
between the outermost 'svg' and this element are
all elements in the SVG language.
- current transformation matrix
(CTM)
- Transformation matrices define the mathematical mapping
from one coordinate system into another using a 3x3 matrix
using the equation [x' y' 1] = [x
y 1] * matrix. The current transformation
matrix (CTM) defines the mapping from the user
coordinate system into the viewport coordinate system. See Coordinate
system transformations.
- fill
- The operation of painting the interior of a shape or the interior of the
character glyphs in a text string.
- font
- A font represents an organized collection of glyphs in which the various
glyph representations will share a common look or styling
such that, when a string of characters is rendered together,
the result is highly legible, conveys a particular artistic
style and provides consistent inter-character alignment and
spacing.
- glyph
- A glyph represents a unit of rendered content within a font. Often, there is a
one-to-one correspondence between characters to be drawn and
corresponding glyphs (e.g., often, the character "A" is
rendered using a single glyph), but other times multiple
glyphs are used to render a single character (e.g., use of
accents) or a single glyph can be used to render multiple
characters (e.g., ligatures). Typically, a glyph is defined
by one or more shapes such
as a path, possibly with additional
information such as rendering hints that help a font engine
to produce legible text in small sizes.
- graphics element
- One of the element types that can cause graphics to be
drawn onto the target canvas. Specifically: 'path', 'text', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon', 'image' and 'use'.
- graphics referencing
element
- A graphics element which uses a reference to a different
document or element as the source of its graphical content.
Specifically: 'use' and 'image'.
- local URI reference
- A Uniform Resource Identifier [URI] that does
not include an <absoluteURI> or <relativeURI> and thus
represents a reference to an element within the current
document. See References and the
'defs' element.
- mask
- A container
element which can contain graphics elements
or other container elements which define a set of graphics
that is to be used as a semi-transparent mask for compositing
foreground objects into the current background. See Masks.
- non-local URI reference
- A Uniform Resource Identifier [URI] that
includes an <absoluteURI> or <relativeURI> and thus
(usually) represents a reference to a different document or
an element within a different document. See References and the 'defs' element.
- paint
- A paint represents a way of putting color values onto the
canvas. A paint might consist of both color values and
associated alpha values which control the blending of colors
against already existing color values on the canvas. SVG
supports three types of built-in paint: color, gradients and patterns.
- presentation attribute
- An XML attribute on an SVG element which specifies a
value for a given property for that element. See Styling.
- property
- A parameter that helps specify how a document should be
rendered. A complete list of SVG's properties can be found in
Property Index. Properties are
assigned to elements in the SVG language either by presentation
attributes on elements in the SVG language or by using a
styling language such as CSS [CSS2]. See Styling.
- shape
- A graphics element that is defined by some combination of
straight lines and curves. Specifically: 'path', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon'.
- stroke
- The operation of painting the outline of a shape or the outline of
character glyphs in a text string.
- SVG canvas
- The canvas onto which the SVG
content is rendered. See the discussion of the SVG canvas in the chapter on
Coordinate Systems, Transformations and
Units.
- SVG document fragment
- The XML document sub-tree which starts with an 'svg' element. An SVG
document fragment can consist of a stand-alone SVG document,
or a fragment of a parent XML document enclosed by an 'svg' element. When an 'svg' element is a descendant
of another 'svg' element, there are two
SVG document fragments, one for each 'svg' element. (One SVG
document fragment is contained within another SVG document
fragment.)
- SVG viewport
- The viewport within the SVG canvas which defines the
rectangular region into which SVG content is rendered. See
the discussion of the SVG
viewport in the chapter on Coordinate Systems, Transformations and
Units.
- text content element
- One of SVG's elements that can define a text string that
is to be rendered onto the canvas. SVG's text content
elements are the following: 'text', 'tspan', 'tref', 'textPath' and 'altGlyph'.
- transformation
- A modification of the current
transformation matrix (CTM) by providing a supplemental
transformation in the form of a set of simple transformations
specifications (such as scaling, rotation or translation)
and/or one or more transformation matrices.
See Coordinate
system transformations.
- transformation matrix
- Transformation matrices define the mathematical mapping
from one coordinate system into another using a 3x3 matrix
using the equation [x' y' 1] = [x
y 1] * matrix. See current
transformation matrix (CTM) and Coordinate
system transformations.
- URI Reference
- A Uniform Resource Identifier [URI] which
serves as a reference to a file or to an element within a
file. See References and the 'defs' element.
- user agent
- The general definition of a user agent is an application
that retrieves and renders Web content, including text,
graphics, sounds, video, images, and other content types. A
user agent may require additional user agents that handle
some types of content. For instance, a browser may run a
separate program or plug-in to render sound or video. User
agents include graphical desktop browsers, multimedia
players, text browsers, voice browsers, and assistive
technologies such as screen readers, screen magnifiers,
speech synthesizers, onscreen keyboards, and voice input
software.
A "user agent" may or may not have the ability to retrieve
and render SVG content; however, an "SVG user agent"
retrieves and renders SVG content.
- user coordinate system
- In general, a coordinate system defines locations and
distances on the current canvas.
The current user coordinate
system is the coordinate system that is currently
active and which is used to define how coordinates and
lengths are located and computed, respectively, on the
current canvas. See initial
user coordinate system and Coordinate
system transformations.
- user space
- A synonym for user
coordinate system.
- user units
- A coordinate value or length expressed in user units
represents a coordinate value or length in the current user coordinate system.
Thus, 10 user units represents a length of 10 units in the
current user coordinate system.
- viewport
- A rectangular region within the current canvas onto which graphics elements are to be
rendered. See the discussion of the SVG viewport in the
chapter on Coordinate Systems,
Transformations and Units.
- viewport coordinate system
- In general, a coordinate system defines locations and
distances on the current canvas.
The viewport coordinate
system is the coordinate system that is active at the
start of processing of an 'svg' element, before
processing the optional viewBox attribute. In the
case of an SVG document fragment that is embedded within a
parent document which uses CSS to manage its layout, then the
viewport coordinate system will have the same orientation and
lengths as in CSS, with the origin at the top-left on the viewport. See The initial viewport and
Establishing a
new viewport.
- viewport space
- A synonym for viewport coordinate
system.
- viewport units
- A coordinate value or length expressed in viewport units
represents a coordinate value or length in the viewport coordinate
system. Thus, 10 viewport units represents a length of 10
units in the viewport coordinate system.