W3C

SVG Print 1.2, Part 2: Language

W3C Working Draft 21 December 2007

This version:
http://www.w3.org/TR/2007/WD-SVGPrint12-20071221/
Latest version:
http://www.w3.org/TR/SVGPrint12/
Previous version:
http://www.w3.org/TR/2007/WD-SVGPrint12-20070501/
Editors:
Alex Danilo, Canon Information Systems Research Australia, <alex@research.canon.com.au>
Craig Northway, Canon Information Systems Research Australia, <craign@research.canon.com.au>
Andrew Shellshear, Canon Information Systems Research Australia, <andrews@research.canon.com.au>
Anthony Grasso, Canon Information Systems Research Australia, <anthony.grasso@research.canon.com.au>
Chris Lilley, W3C <chris@w3.org>
Authors:
The authors of this specification are the participants of the W3C SVG Working Group.

Abstract

This Working Draft defines features of the Scalable Vector Graphics (SVG) Language that are specifically for printing environments.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is a Last Call Working Draft. The W3C Membership and other interested parties are invited to review the document and send comments to to public-svg-print@w3.org (archives) until 8 February 2008. There is an accompanying SVG Print 1.2, Part 1: Primer that lists the ways SVG Print, along with other SVG documents, may be used for SVG Printing.

This document has been produced by the W3C SVG Working Group as part of the W3C Graphics Activity within the Interaction Domain. The Working Group expects to advance this Working Draft to Recommendation Status.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.


How to read this document and give feedback

This draft of SVG Print is a snapshot of a work-in-progress.

The main purpose of this document is to encourage public feedback. The best way to give feedback is by sending an email to public-svg-print@w3.org. Please identify in the subject line of your message the part of the specificationto which your comment refers (e.g "Print compositing" or "Print render formats"). If you have comments on multiple areas of this document, then it is preferable to send several separate comments.

The public are welcome to comment on any aspect in this document, but there are a few areas in which the SVG Working Group are explicitly requesting feedback. These areas are noted in place within this document. There is also a specific area related to the specification that is listed here:

Interaction with other print standards. The SVG Working Group believe that some design decisions would be best made in collaboration with other print standards bodies, and would welcome liaison statements in this area.

Table of Contents

1 Introduction

This document lists features that may be used in the context of printing. The various usage scenarios are listed in the SVG Print Requirements document.

This document is normative.

This document contains explicit conformance criteria that overlap with some RNG definitions in requirements. If there is any conflict between the two, the explicit conformance criteria are the definitive reference.

This document contains conformance criteria for a number of different entities:

Some conformance criteria allow or require the User Agent for Printing and the User Agent for Print Preview to communicate with each other.

The conformance criteria have awkward names - any suggestions for replacing "A User Agent for Printing", "A User Agent for Print Preview", and "A User Agent for Printing or Print Preview" would be welcome.

TODO: The above terms will probably be replaced as follows:

SVG Print Preview Device ---> Print Preview Agent (PPA)
SVG Printing Device ---> Print Reproduction Agent (PRA)
SVG Printing or Print Preview Device ---> Print User Agent (PUA)

2 User Agents

A User Agent for Print Preview SHOULD, when requested to print, provide a mechanism for passing details for that printing to a User Agent for Printing. The mechanisms for doing so are covered by other specifications and are outside the scope of the present one.

A User Agent for Printing SHOULD provide a mechanism for accepting details for that printing (from a User Agent for Print Preview, or other sources). The mechanisms for doing so are covered by other specifications and are outside the scope of the present one.

A User Agent for Printing MUST NOT print any content if there is no pageSet element and if there is no content that would otherwise mark the SVG canvas.

A User Agent for Printing MUST comply with the Static Profile of SVG Tiny 1.2.

A User Agent for Print Preview MUST comply with the Static Profile of SVG Tiny 1.2.

3 Printing using Pages

3.1 The pageSet element

The pageSet element is the container for a set of page elements.

Schema: pageSet
    <define name='pageSet'>
      <element name='pageSet'>
        <ref name='pageSet.AT'/>
        <zeroOrMore><ref name='page'/></zeroOrMore>
      </element>
    </define>

    <define name='pageSet.AT' combine='interleave'>
      <ref name='svg.Core.attr'/>
    </define>
    

A User Agent for Printing or Print Preview MUST treat all pageSet elements beyond the first as unsupported elements.

A User Agent for Printing or Print Preview MUST treat all children of a pageSet element as unsupported elements except for page elements, masterPage elements and use elements.

A User Agent for Printing or Print Preview MUST treat all elements from the SVG namespace between the closing pageSet tag and the closing svg tag as unsupported elements.

3.2 The page element

The page element appears only as a child of a pageSet element.

Schema: page
    <define name='page'>
      <element name='page'>
        <ref name='page.AT'/>
        <zeroOrMore><ref name='svg.G.group'/></zeroOrMore>
      </element>
    </define>

    <define name='page.AT' combine='interleave'>
      <ref name='svg.Core.attr'/>
      <ref name='svg.page-orientation.attr'/>
    </define>
    

Conceptually, the page element is similar to an svg element but without transformation and positioning. All pages are in the coordinate system of their pageSet, which is in the coordinate system of the root svg element.

A User Agent for Printing or Print Preview MUST, when rendering a page, render only the children of the page, and any relevant Master Pages.

A User Agent for Printing or Print Preview MUST treat page elements that are not inside the pageSet element as unsupported elements.

Content that has references inside a page element MUST refer only to elements within the same page or in the SVG document before the pageSet element.

A User Agent for Printing or Print Preview MUST treat any references in a page that refer to content in a different page in the same document as unsupported.

Content MAY have references inside a page element that refer to external documents, but authors SHOULD use the externalResourcesRequired feature in this case.

A User Agent for Printing MAY discard a page element and all its children after that page element has been dealt with.

3.3 The masterPage element

The masterPage element appears only as a child of a pageSet element.

Schema: masterPage
    <define name='masterPage'>
      <element name='masterPage'>
        <ref name='masterPage.AT'/>
        <zeroOrMore><ref name='svg.G.group'/></zeroOrMore>
      </element>
    </define>

    <define name='masterPage.AT' combine='interleave'>
      <ref name='svg.Core.attr'/>
      <ref name='svg.rendering-order.attr'/>
    </define>
    

A User Agent for Printing or Print Preview MUST NOT directly render any masterPage element or any of its children.

3.4 The rendering-order attribute

The rendering-order attribute may appear only on the masterPage element.

Attribute definition:

rendering-order = "over" | "under"

The attribute value can be either of the following:
over
This master page is rendered over (ie. after) display-pages.
under
The default value. This master page is rendered underneath (ie. before) display-pages.

Animatable: No

A Foreground Master Page is a Master Page with rendering-order set to "over".

A Background Master Page is a Master Page with rendering-order set to "under".

It is possible to have multiple Background Master Pages and/or Foreground Master Pages in an SVG Print document, though only one of each can be active at any given time. Whenever the renderer encounters a Background or Foreground Master Page, it replaces the current Background or Foreground Master Page with the new one, and subsequent pages use the newer one.

A User Agent for Printing or Print Preview MUST apply one Background Master Page and one Foreground Master Page to a displayed page. The Background Master Page and Foreground Master Page MUST be the ones most closely preceding the page in document order.

A User Agent for Printing or Print Preview MUST render content that is part of the Background Master Page on each displayed page, before the page content.

A User Agent for Printing or Print Preview MUST render content that is part of the Foreground Master Page on each displayed page, after the page content.

A User Agent for Printing or Print Preview MUST discard the Foreground Master Page and all its children when the next Foreground Master Page is parsed.

A User Agent for Printing or Print Preview MUST discard the Background Master Page and all its children when the next Background Master Page is parsed.

3.5 Default Master Pages

The default master pages are made available as a simple default that gives sensible printing behaviour for documents that do not have pageSet elements.

A User Agent for Printing or Print Preview MUST use all elements in the SVG document after the opening svg tag and before the opening pageSet tag as the initial Background Master Page, applying to all page elements that appear before the next Background Master Page in document order.

A User Agent for Printing or Print Preview MUST set the initial Foreground Master Page to be empty.

Note that, as a consequence of the foregoing conformance statements, the default background master page (all the elements between the svg element and the pageSet element) is no longer used as a default master page when another background master page is set. Elements in the defs element of an svg document will be available to all pages in the pageSet element.

Content that has MasterPage elements SHOULD NOT make use of the default background master page (ie. should not have content between the svg element and the pageSet element).

3.6 Job Control

A User Agent for Printing MAY allow control over the job information (e.g. JDF), by means of an encapsulation of an SVG file or document fragment.

3.7 Printing Pages

A User Agent for Printing or Print Preview MAY, when requested to print an SVG document, and in the absence of conflicting Job Control information, provide a means for selecting which pages to print.

A User Agent for Printing SHOULD, when requested to print an SVG document, and in the absence of conflicting Job Control information, print all pages, in the order in which the pages appear in the SVG document.

If an SVG document fragment with multiple pages is embedded in, or referenced by, a document from another namespace, such as XHTML, then typically it is up to that namespace to define the processing of pages.

3.8 The page-orientation property

The orientation of each page element can be controlled by the page-orientation property. This enables the content to define whether a portrait or landscape mode is used for display and printing.

page-orientation
Value: -270 | -180 | -90 | 0 | 90 | 180 | 270
Initial: 0
Applies to: page elements
Inherited: no
Percentages: N/A
Media: visual print
Animatable: yes

When displaying a page on a User Agent for Print Preview, the value of the page-orientation property introduces the following transform before the top-level viewport transformation:

0
No additional transform
-90 or 270
translate(0 height) rotate(-90)
180 or -180
translate(width height) rotate(180)
90 or -270
translate(width 0) rotate(90)

The values for width and height are the dimensions of the top-level viewBox in the user coordinate system or the dimensions of the top-level viewport if there is no viewBox specified.

A User Agent for Printing or Print Preview MUST display each page with the orientation as specified by page-orientation.

3.9 The use-master-page attribute

The use-master-page attribute may appear only on a use element referencing an external page element.

Attribute definition:

use-master-page = "current" | "external"

The attribute value can be either of the following:
current
The current Master Pages within the referencing document must be used for the externally referenced page.
external
The current Master Pages from the referenced document must be used for the externally referenced page.

Animatable: No

Both the current Foreground Master Page and Background Master Page of the referencing document must be used when use-master-page is set to current.

Both the current Foreground Master Page and Background Master Page of the externally referenced document must be used when use-master-page is set to external.

By default, if the use-master-page attribute is not specified on the use element referencing an external page, then both the current Foreground Master Page and Background Master Page of the referencing document must be used.

A User Agent for Printing or Print Preview MUST use the current Foreground Master Page and Background Master Page of the referencing document when use-master-page is set to a value of current.

A User Agent for Printing or Print Preview MUST use the current Foreground Master Page and Background Master Page of the externally referenced document when use-master-page is set to a value of external.

A User Agent for Printing or Print Preview MUST use the current Foreground Master Page and Background Master Page of the referencing document if use-master-page is not set on the use element.

TODO: Need feedback on this feature. Are there compelling uses cases for having this extra complexity? What benefit does it provide?

Attribute definition:

print-display = "noPrint" | "print"

The attribute value can be either of the following:
noPrint
This element and its children are ignored for the purposes of printing.
print
The default value. This element is not ignored for the purposes of printing.

Animatable: No

A User Agent for Printing or Print Preview MUST, for the purposes of printing or print preview, treat a value of noPrint for the print-display attribute as though the element has display=none.

TODO: Need feedback on this feature. display-print is a replacement for noPrint. The attribute was originally a boolean. This changes is still under consideration. The following alternatives are available:

Add to 'print-display' the values "printOnly", "All" and "None"
Replaced with @media. Could have @media print {.foo {display:none}}
Replaced with a print feature string.

3.11 CSS and pages

Content that uses CSS SHOULD define all styles for use in the entire document at the start of the SVG document, prior to any page elements.

Content intended for print applications SHOULD be authored using presentation attributes exclusively.

4 Animation and Scripting

A User Agent for Printing MUST NOT run any script or start any animation in the SVG document.

A User Agent for Print Preview MUST NOT run any script or start any animation in any page being displayed.

5 Color

SVG Print extends the control of color, relative to SVG Tiny 1.2, in two ways. Firstly by adding an additional color space for interpolation and compositing; this means that colors are no longer constrained to the sRGB gamut. Secondly by extending the syntax for Paint, thus allowing colors to be specified as calibrated (ICC and named) and uncalibrated ('device') color.

5.1 Color interpolation

The color-interpolation property, not in SVG Tiny 1.2 but used in SVG 1.1 [SVG11], is extended by this specification to add new values using the CIE L*a*b* color space. Both the cartesian (CIE-Lab) and polar (CIE-LCHab) forms are supported.

A User Agent for Printing or Print Preview MUST use the color space defined by color-interpolation for calculations when interpolating between gradient stops and alpha compositing of graphics elements into the current background.

'color-interpolation'
Value: auto | sRGB | linearRGB | CIE-Lab | CIE-LCHab | inherit
Initial: sRGB
Applies to: container elements, graphics elements and 'animateColor'
Inherited: yes
Percentages: N/A
Media: visual
Animatable: yes
auto
Indicates that the user agent can choose any of the color spaces - sRGB, linearRGB, CIE-Lab or CIE-LCHab- for color interpolation. This option indicates that the author doesn't require that color interpolation occur in a particular color space.
sRGB
Indicates that color interpolation must occur in the sRGB color space defined by [sRGB].
linearRGB
Indicates that color interpolation must occur in the linearized RGB color space (sRGB with a linear transfer function) as defined in [sRGB].
CIE-Lab
Indicates that color interpolation must occur in the cartesian L*a*b* color space defined by [CIE15].
CIE-LCHab
Indicates that color interpolation must occur in the polar L*CHab color space defined by [CIE15].

The 'color-interpolation' property specifies the color space for gradient interpolations and alpha compositing.

When a child element is blended into a background, the value of the 'color-interpolation' property on the child determines the type of blending, not the value of the 'color-interpolation' on the parent.

5.2 Specifying paint

The definition of paint in SVG Tiny 1.2 [SVGT12] is extended by this specification to add the icc-color values from paint in SVG Full 1.1 [SVG11] and also to add new values for named colors and uncalibrated (device) colors.

<paint> :       none |
currentColor |
<color> |
<color> icc-color(<name> [,<icccolorvalue>]*) |
<color> icc-named-color(<name>, <namedColor>) |
<color> device-color(<name> [,<devicecolorvalue>]*) |
<FuncXMLRI> [ none | currentColor | <color>] |
<system paint> |

inherit
none
Indicates that no paint shall be applied.
currentColor
Indicates that painting shall be done using the color specified by the current value of the 'color' property. This mechanism is provided to facilitate sharing of color attributes between parent grammars such as other (non-SVG) XML. This mechanism allows you to define a style in your HTML which sets the 'color' property and then pass that style to the SVG user agent so that your SVG text will draw in the same color.
<color>
the explicit color (in the sRGB [rRGB] color space, see sRGB colors).
<color> icc-color(<name> [,<icccolorvalue>]*)
Indicates that the user agent searches the color profile description database for a color profile description entry whose name descriptor matches <name> and uses the last matching entry that is found; painting shall be done using the given ICC color, where the comma-separated list (with optional white space) of <icccolorvalue>'s is a set of ICC-profile-specific color values, expressed as <number>s (see ICC colors). If no match is found, then the fallback sRGB color is used.
<color> icc-named-color(<name>, <namedColor>)
Indicates that the user agent searches the color profile description database for a color profile description entry whose name descriptor matches <name> and uses the last matching entry that is found; painting shall be done using the given ICC color, where namedColor is a <strinf> indicating the named color to use.
<color> device-color(<name> [,<devicecolorvalue>]*)
Indicates that the user agent searches the device color description database for a deviceColor element entry whose name descriptor matches <name> and uses the last matching entry that is found; painting shall be done using the given the device color, where the data of <devicecolorvalue> is a value or set of values understood by the device that recognises the namesapce of the deviceColor element. If no match is found, then the fallback sRGB color is used.

TODO: Need feedback on this feature. Looking into the possibility of having ICC or Name ICC fallback for Device Color as well. ICC or Named ICC should have priority over an sRGB fallback if both types of fallback are specified.

<FuncXMLRI> [ none | currentColor | <color>]
The <FuncXMLRI> specifies a paint server such as a gradient. The fragment identifier of the <FuncXMLRI> provides a link to the paint server (e.g., a gradient or 'solidColor' ) that shall be used to paint the current object. The IRI reference must be a Local IRI reference . If the Local IRI reference is not valid (e.g., it points to an object that doesn't exist or the object is not a valid paint server), then the fallback value (if specified) is used; otherwise it must be treated as if none was specified.
<system paint>
A System Paint Server

Note that by default, color interpolation occurs in the sRGB color space, even if an ICC-based color specification is provided, unless the 'color-interpolation' property is set to one of the CIE Lab color spaces. If an sRGB color interpolation space is specified, all ICC-based colors used for the interpolation must be converted into the sRGB interpolation colorspace.

5.2.1 sRGB colors

As with SVG Tiny 1.2, colors may be specified in the sRGB color space (see [sRGB]). Since all SVG Print and SVG Print Preview User Agents are color management capable, the rendering requirements are more strict than for SVG User Agents [SVG11] where color management is optional.

When an sRGB color is used - because it is the sole color specification, or in a permitted fallback situation - a conformant SVG Print or SVG Print Preview User Agent shall render it in conformance with the ICC profile for sRGB to obtain the desired color appearance.

5.2.2 ICC colors

As with SVG Full 1.1, SVG Print content may specify color using an ICC profile (see [ICC42]). For resiliency and for compatibility with SVG Tiny 1.2, an sRGB fallback must still be provided.

If ICC-based colors are provided, a conformant SVG Print or SVG Print Preview user agent MUST use the the ICC-based color in preference to the sRGB fallback color, unless the ICC color profile is unavailable, malformed, or uses a profile connection space other than CIE XYZ or CIE LAB.

When an ICC color is used, a conformant SVG Print or SVG Print Preview User Agent shall render it in conformance with the specified ICC profile to obtain the desired color appearance.

5.2.3 Named color

SVG Print introduces the ability to specify a color using a 'Named Color Profile'.

If ICC-based named colors are provided, a conformant SVG Print or SVG Print Preview user agent MUST use the the ICC-based named color in preference to the sRGB fallback color, unless the ICC named color profile is unavailable, malformed, or uses a profile connection space other than CIE XYZ or CIE LAB.

When an ICC named color is used, a conformant SVG Print or SVG Print Preview User Agent shall render it in conformance with the specified ICC profile to obtain the desired color appearance.

5.2.4 Uncalibrated device colors

SVG Print also introduces a method of specifying uncallibrated device colors. This is sometimes useful in print workflows. This feature utilises the deviceColor element and the device-color keyword.

As these are uncalibrated, any interpolation or compositing occurs using the fallback sRGB color space

TODO: Need feedback on this feature. Looking into the possibility of having ICC or Name ICC fallback for Device Color as well. ICC or Named ICC should have priority over an sRGB fallback if both types of fallback are specified.

5.3 Color profile descriptions

5.3.1 Overview of color profile descriptions

The International Color Consortium has established a standard, the ICC Profile [ICC32], for documenting the color characteristics of input and output devices. Using these profiles, it is possible to build a transform and correct visual data for viewing on different devices.

A color profile description provides the bridge between an ICC profile and references to that ICC profile within SVG content. The color profile description is added to the user agent's list of known color profiles and then used to select the relevant profile. The color profile description contains descriptors for the location of the color profile on the Web, a name to reference the profile and information about rendering intent.

5.3.2 Alternative ways for defining a color profile description

Color profile descriptions can be specified in either of the following ways:

If a color profile with the same name value has been identified by both a 'color-profile' element and @color-profile rules within a CSS style sheet, then the user agent MUST first attempt to locate the profile by using the specifications in the @color-profile rules first.

5.3.3 The 'color-profile' element

Schema: color-profile
    <define name='color-profile'>
      <element name='color-profile'>
        <ref name='color-profile.AT'/>
        <empty/>
      </element>
    </define>

    <define name='color-profile.AT' combine='interleave'>
      <ref name='svg.Core.attr'/>
      <ref name='svg.local.attr'/>
      <ref name='svg.name.attr'/>
      <ref name='svg.rendering-intent.attr'/>
    </define>
    

Attribute definitions:

xlink:href = "<iri>"
The location of an ICC profile resource.
Animatable: no.
local = "<string>"
The unique ID for a locally stored color profile. <string> is the profile's unique ID as specified by International Color Consortium.
If both the xlink:href and the local attributes are specified, then the user agent MUST search the local system for the locally stored color profile first, and, if not available locally, then attempt to use the resource identified by the xlink:href attribute.
(Note: Profile description fields do not represent a profile's unique ID. With current ICC proposals, the profile's unique ID is an MD5-encoded value within the profile header.).
Animatable: no.
name = "<name>"
The name which is used as the first parameter for icc-color specifications within 'fill', 'stroke', 'stop-color', 'flood-color' and 'lighting-color' property values to identify the color profile to use for the ICC color specification and the name which can be the value of the 'color-profile' property. Note that if <name> is not provided, it will be impossible to reference the given color profile description.
The name "sRGB" is predefined; any color profile descriptions with <name> set to "sRGB" MUST be ignored. When used in a style sheet, for consistency with CSS lexical scanning and parsing rules, the keyword "sRGB" MUST be case-insensitive. However, it is recommended that the mixed capitalization "sRGB" SHOULD be used for consistency with common industry practice.

Animatable: no.
rendering-intent = "auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric"

'rendering-intent' permits the specification of a color profile rendering intent other than the default. 'rendering-intent' is applicable primarily to color profiles corresponding to CMYK color spaces. The different options cause different methods to be used for translating colors to the color gamut of the target rendering device:

auto
This is the default behavior. The user agent determines the best intent based on the content type.
For image content containing an embedded profile, the User Agent MUST use the intent specified within the profile. Otherwise, the user agent MUST use the current profile and force the intent, overriding any intent that might be stored in the profile itself.
perceptual
This method, often the preferred choice for images, preserves the relationship between colors.
This method MUST maintain relative color values among the pixels as they are mapped to the target device gamut. This method MAY change pixel values that were originally within the target device gamut, in order to avoid hue shifts and discontinuities and to preserve as much as possible the overall appearance of the scene.
saturation
This option MUST preserve the relative saturation (chroma) values of the original pixels. Out of gamut colors MUST be converted to colors that have the same saturation but fall just inside the gamut.
relative colorimetric
This method MUST leave colors that fall inside the gamut unchanged. This method MUST convert out-of-gamut colors to colors that have the same lightness but fall just inside the gamut.
absolute colorimetric
This method MUST disable white point matching when converting colors.
In general, this option is not recommended.

Animatable: no.

5.3.4 @color-profile when using CSS styling

When the document is styled using CSS, the @color-profile rule can be used to specify a color profile description. The general form is:

@color-profile { <color-profile-description> }

where the <color-profile-description> has the form:

descriptor: value;
[...]
descriptor: value;

Each @color-profile rule specifies a value for every color profile descriptor, either implicitly or explicitly. Those not given explicit values in the rule take the initial value listed with each descriptor in this specification. These descriptors apply solely within the context of the @color-profile rule in which they are defined, and do not apply to document language elements. Thus, there is no notion of which elements the descriptors apply to, or whether the values are inherited by child elements.

The following are the descriptors for a <color-profile-description>:

'src' (Descriptor)
Values: sRGB | <local-profile> | <iri> | (<local-profile> <iri>) | inherit
Initial: sRGB
Media: visual
sRGB
The source profile is the sRGB color space. For consistency with CSS lexical scanning and parsing rules, the keyword "sRGB" is case-insensitive; however, it is recommended that the mixed capitalization "sRGB" be used for consistency with common industry practice.
<local-profile>
The source profile is a locally-stored profile. The syntax for <local-profile> is:
"local(" + <string> + ")"
where <string> is the profile's unique ID as specified by International Color Consortium. (Note: Profile description fields do not represent a profile's unique ID. With current ICC proposals, the profile's unique ID is an MD5-encoded value within the profile header.)
<iri>
The source profile is a IRI reference to a color profile.
(<local-profile> <iri>)
Two profiles are specified. If <local-profile> cannot be found on the local system, then the <iri> is used.
'name' (Descriptor)
Values: <name>
Initial: undefined
Media: visual
<name>
See the description for the name attribute on the 'color-profile' element. Note that if <name> is not provided, it will be impossible to reference the given @color-profile definition.
'rendering-intent' (Descriptor)
Values: auto | perceptual | relative-colorimetric |
saturation | absolute-colorimetric
Initial: auto
Media: visual
Animatable: no

See the description for the rendering-intent attribute on the 'color-profile' element.

TODO: Need some conformance criteria. Also, this reiterates some of the color-profile element stuff, so we should reference that more here.

5.3.5 'color-profile' property

'color-profile'
Value: auto | sRGB | <name> | <iri> | inherit
Initial: auto
Applies to: 'image' elements that refer to raster images
Inherited: yes
Percentages: N/A
Media: visual
Animatable: yes
auto
This is the default behavior. All colors are presumed to be defined in the sRGB color space unless a more precise embedded profile is specified within content data. For images that do have a profile built into their data, that profile is used. For images that do not have a profile, the sRGB profile is used.
sRGB
The source profile is assumed to be sRGB. This differs from auto in that it overrides an embedded profile inside an image.

For consistency with CSS lexical scanning and parsing rules, the keyword "sRGB" is case-insensitive; however, it is recommended that the mixed capitalization "sRGB" be used for consistency with common industry practice.
<name>
A name corresponding to a defined color profile that is in the user agent's color profile description database. The user agent searches the color profile description database for a color profile description entry whose name descriptor matches <name> and uses the last matching entry that is found. If a match is found, the corresponding profile overrides an embedded profile inside an image. If no match is found, then the embedded profile inside the image is used.
<iri>
A IRI reference to the source color profile. The referenced color profile overrides an embedded profile inside the image.

TODO: Need some conformance criteria. Also, need to reference color-profile element.

5.4 deviceColor Element

Certain print applications can improve printing quality by specifying colors by name or in an alternative color format. This is commonly referred to as using 'spot' colors, device colors or inks, and usually means that a particular ink will be used for the color when it is printed. Furthermore, there are applications in the printing press industry where presses can be set up with different inks for different jobs. This means that the content creator will need to create content tailored to the particular press setup in order to obtain the best results.

The deviceColor element can be used to indicate an alternative color for a particular paint. This element will be mostly used in closed workflows, since the names of the inks and the parameters (percentages of each ink's color components) rarely have meaning outside the domain of the target device.

Schema: deviceColor
<xs:element name="deviceColor">
  <xs:complexType>

    <xs:attribute ref="href" use="required"
        namespace="http://www.w3.org/1999/xlink"/>
    <xs:attribute ref="name" use="required" type="string"/>
    <xs:anyAttribute namespace="##any" processContents="skip"/>
  </xs:complexType>
</xs:element>      

TODO: This needs to be converted to RNG

xlink:href

A URI used to identify the device-specific information included in this element. If the User Agent does not recognize the URI (ie. is not able to recognize the particular device parameters) then the element should be ignored and should not be part of the rendering process.

Animatable: no
name

The name of this device-specific color information. The name attribute is used within the device-color specification within <paint> to reference this deviceColor element.

Animatable: no

The deviceColor element uses attributes from external namespaces to define the device specific properties that are to be used when the deviceColor is referenced from a <paint>.

The following example illustrates the use of deviceColor. There are two things to note:

  1. The deviceColor element describes device specific setup information.
  2. The device-color keyword is used as an alternative <paint> specification, achieving the desired <paint> when the output is the named device (or when the User Agent is able to understand the device specific information).
Example: deviceColor
<svg xmlns="http://www.w3.org/2000/svg" version="1.2"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:ecpi="http://www.example.com/press/inks">

  <defs>
     <!-- describe a particular output device -->
     <deviceColor name="device-inks"
                  xlink:href="http://www.example.com/pressInks"
             ecpi:value="Cyan, Magenta, Yellow, Black, Silver, Gray, Green"/>
  </defs>

  <text x="100" y="150" font-family="Verdana" font-size="35"
        fill="rgb(22,33,44) device-color(device-inks, 11,55,66,77,0,0,88)" >

     Hello, out there

  </text>

</svg>    

In the example above, a supplemental attribute, value, from a private namespace has been added. This example value attribute provides the definitions of colors or inks to be interpreted in the context of the URI specified. It is in a private namespace so that content and context authors can use any understood format to convey the necessary information. When the particular deviceColor element is referenced later by a device-color keyword specification, it is generally expected that the number of parameters following the name reference (1st parameter) in the function-like representation for the value of device-color alternate in a fill or stroke attribute (for example) will have an understood one-to-one correspondence with the information specified for the value attribute in the the deviceColor element. The interpretation of the parameters is implied specifically by the context set by the URI.

TODO: Need some conformance criteria.

6 Definitions

color appearance
Color-appearance models extend basic colorimetry, as defined by CIE tristimulus values, to the prediction of color matches and color appearance across varying viewing conditions.
gamut
The subset of colors which can be accurately represented in a given colorspace or on a given output device.

7 References

7.1 Normative References

[CIE15]
International Commission on Illumination (CIE). Colorimetry, 3rd Edition. Publication CIE 15:2004, ISBN 3-901-906-33-9
Available at http://www.cie.co.at/publ/abst/15-2004.html
[ICC42]
International Color Consortium. Specification ICC.1:2004-10 (Profile version 4.2.0.0) Image technology colour management — Architecture, profile format, and data structure.
Available at http://www.color.org/ICC1V42.pdf
[SRGB]
IEC 61966-2-1 (1999-10) - "Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB, ISBN: 2-8318-4989-6 ­ ICS codes: 33.160.60, 37.080 ­ TC 100 ­ 51 pp.
Available at: http://domino.iec.ch/webstore/webstore.nsf/artnum/025408.
[SVG12]
Scalable Vector Graphics (SVG) 1.2 Specification, Dean Jackson editor, W3C, 27 October 2004 (Working Draft). See http://www.w3.org/TR/2004/WD-SVG12-20041027/

7.2 Informative References

[SVG11]
Scalable Vector Graphics (SVG) 1.1, J. Ferraiolo, 藤沢 淳 (Fujisawa Jun), D. Jackson, eds. World Wide Web Consortium,14 January 2003.
Latest version available at: http://www.w3.org/TR/SVG11/
[SVG12Reqs]
SVG 1.1/1.2/2.0 Requirements, Dean Jackson editor, W3C, 22 April 2002 (Working Draft). See http://www.w3.org/TR/2002/WD-SVG2Reqs-20020422/
[SVGPrintReqs]
SVG Printing Requirements, Jun Fujisawa, Lee Klosterman Craig Brown, Alex Danilo editors, W3C, 18 February 2003 (Working Draft). See http://www.w3.org/TR/2003/WD-SVGPrintReqs-20030218/
[SVG12PrintPrimer]
SVG Print 1.2 Primer, Anthony Grasso, Andrew Shellshear, Chris Lilley, editors, W3C, 21 December 2007 (Working Draft). See http://www.w3.org/TR/2007/WD-SVGPrintPrimer12-20071221/