An XML Schema which Defines IPP

Robert Herriot, Sun Microsystems

robert.herriot@eng.sun.com

Introduction

This document uses an XML schema to define the XML encoding of IPP as defined in a previous document (Ipp-xml-980210.doc). The schema is defined in the "XML Data" document, which is available from W3C.

The schema defines the following characteristics of IPP

IMPORTANT NOTE: This document should be treated as a preliminary draft. I have tried to follow the XML Data document as much as possible, and where I have made extensions, I have tried to be as consistent as possible. This document is intended to stimulate discussion in the IPP community and the XML Data community. For the former, it shows how IPP can be specified. For the latter, it is an extended example which shows the strengths and need for extensions to define a real protocol.

Table of Contents

Introduction *

Table of Contents *

Schema for IPP Request *

Schema for IPP Response *

Schema for IPP Job Template Attributes *

Schema for IPP Job Description Attributes *

Schema for IPP Printer Description Attributes *

Schema for IPP Data Types *

Schema for IPP Supertypes *

Schema for IPP Contexts *

Schema for IPP Request

The schema that defines all IPP requests is below. The comments contain references to Section 15.3 in the model document where details of the protocol are spelled out. This schema could replace section 15.3 entirely or almost entirely.

I have extended the schema to include a context element and a context XML attribute. This extension allows me to make IPP attributes be defined only for certain operations.

To make the text easier to read, all comments are in blue, though they conform to XML syntax rules. There are numerous comment to explain an attribute or element the first time that it is used.

<s:schema id= "request" > <!-- The root is "request" for this schema, another schema does "response" -->

<elementType id="request"> <!-- This defines a "request" element in XML -->

<!-- I have not used the attribute 'content="CLOSED"'. Thus undefined child

elements are also allowed anyplace as siblings of the defined children. This is

less restrictive than section 15.3.4.2. The XML rule is simpler to specify -->

<description>The root of the operation.</description>

<!-- the operation and job elements must appear in the order shown below according to the

rules of XML Data -->

<element type="#operation" occurs="REQUIRED"

error = "client-error-bad-request" /> <!-- section 15.3.4.1, "operation" is required -->

<!-- I have added an "error" attribute to specify the error if the element is not present -->

<element type="#job" occurs="REQUIRED" context = "printOrSend"

error = "client-error-bad-request" />

<!-- section 15.3.4.1. If context (defined in a later section) is "printOrSend", then "job" is

REQUIRED-->

<attribute id="operation" occurs = "REQUIRED" dt = "enum" min = "2" max = "0xB"

error = "server-error-operation-not-supported" /> <!-- section 15.3.2 "operation attribute is

REQUIRED. The attribute "dt" specifies the "data type", and the attributes "min" and "max"

restrict the range of allowed values. I have added an "error" attribute to specify the error if

the REQUIRED attribute is not present or the value is not allowed. Note: there could be a

separate attribute for an error when the value is disallowed if the message is different. -->

<attribute id="version" occurs = "REQUIRED" dt = "string" values = "1.0"

error = "server-error-version-not-supported" /> <!-- section 15.3.1-->

<!-- The attribute "values" specifies the allowed values. -->

<attribute id="xml:lang" dt="language" occurs = "REQUIRED"

error = "client-error-bad-request" /> <!-- section 15.3.5, "values" is not specified because any

value whose data type is "language" is allowed. -->

<attribute id="request-id" dt="int" occurs = "REQUIRED"

error = "client-error-bad-request" /> <!-- section 15.3.3, any value of type "int" is allowed-->

</elementType >

<elementType id="operation"><!-- This defines the operation attributes for all requests -->

<description>Contains operation attributes.</description>

<group groupOrder="AND" >

<!-- the "AND" means that all group children must occur, but in any order, with no "groupOrder

specified, all group children must occur and they must be in the specified order. The "occurs"

default is "REQUIRED" so I left it out here. It is the children that determine what it really

required. -->

<element type="#printer-uri" dt = "uri" occurs="REQUIRED" context = "PrinterOp"

error = "client-error-bad-request" />

<group groupOrder= "OR" context = "JobOp" >

<element type="#job-uri"dt="uri" occurs="REQUIRED" error = "client-error-bad-request"/>

<group groupOrder= "AND" >

<element type="#printer-uri" dt="uri" occurs="REQUIRED"

error ="client-error-bad-request" />

<element type="#job-id" dt ="int" occurs="REQUIRED"

error="client-error-bad-request" />

</group >

</group >

<element type="#requesting-user-name" occurs="OPTIONAL" dt = "name"

default = "anonymous" />

<!-- OPTIONAL means that the processor understands the element but it may be absent in a

request. The "default" attributes specifies the value when the element is absent -->

<element type = "#last-document" dt = "boolean" occurs="REQUIRED" context = "Send"

error = "client-error-bad-request" />

<group groupOrder= "AND" context = "Print" >

<element type="#job-name" dt = "name" occurs="OPTIONAL">

<default> <!-- default is value of document-name or document-uri. This an alternate to

XML attribute "default" which is for non structured values. -->

<group groupOrder= "OR" >

<elementValue type = "#document-name"/>

<!-- This element represents the value of "document-name"

There are unresolved issues about specifying the object

Containing "document-name" -->

<elementValue type = "#document-uri"/>

</group>

</default>

</element>

<element type="#ipp-attribute-fidelity" occurs="OPTIONAL" dt = "boolean" default = "0" />

<!-- default is "0", which means false -->

<element type="#job-k-octets" dt="int" occurs="OPTIONAL" implement = "LINKED" />

<!-- "#LINKED" means that the processor implements this element if it also implements

the like named element, "job-k-octets" in this case. If the processor does not

implement the linked element, the processor treats this element as undefined. There

are unresolved issues pertaining to what object the name is in. -->

<element type="#job-impressions" dt="int" occurs="OPTIONAL" implement = "LINKED"/>

<element type="#job-media-sheets" dt="int" occurs="OPTIONAL" implement="LINKED"/>

</group >

<element type="#compression" occurs="OPTIONAL" implement = "LINKED"

context = "PrintOrSend" dt = "compressionKeyword" default = "none" />

<!-- "compressionKeyword and other new types are defined in Data Types sections-->

<element type="#message" occurs="OPTIONAL" context = "CancelJob"

implement = "OPTIONAL" dt = "text" />

<group groupOrder= "AND" context = "PrintWDoc" >

<element type="#document-name" occurs="OPTIONAL" dt= "name" />

<element type="#document-natural-language" occurs="OPTIONAL"

implement="OPTIONAL " dt = "language" />

<!-- This element does not depend on a definition, so 'implement="OPTIONAL" is

enough-->

</group >

<element type="#document-format" occurs="OPTIONAL"

context = " PrintWDocOrGetPrinterAttr " dt = "mimeMediaType" />

<default><elementValue type = "printer:document-format-default"/></default>

<!-- In this example, I specify the object with "printer:", but may conflict with namespaces-->

</element>

<element type="#document-uri" occurs="REQUIRED" context = "Doc-URI"

error = "client-error-bad-request" dt = "uri" />

<element type="#requested-attributes" occurs="OPTIONAL" context = "Get-Job-Attributes">

<datatype >

<element type = "item" occurs="ONEORMORE" dt = "keyword"

valuesOfSuperType = "job" />

<!-- "valueOfSuperType" means that the values allowed are the names of each

element which is a member of the superType. There are issues about

whether names, such as "all" are handled by my "nickName" attribute-->

</datatype>

</element>

<element type="#requested-attributes" occurs="OPTIONAL" context = "Get-Jobs ">

<datatype >

<element type = "item" occurs="ONEORMORE" dt = "keyword"

valuesOfSuperType = "job" />

</datatype>

</element>

<element type="#requested-attributes" occurs="OPTIONAL" context = "Get-Printer-Attributes">

<datatype >

<element type = "item" occurs="ONEORMORE" dt = "keyword"

valuesOfSuperType = "printer" />

</datatype>

</element>

<element type="#limit" occurs="OPTIONAL" context = "Get-Jobs" dt = "int"

default = "#MAXINT" />

<element type="#which-jobs" occurs="OPTIONAL" context = "Get-Jobs" dt= "keyword"

values = "completed not-completed" default = "not-completed" />

<element type="#my-jobs" occurs="OPTIONAL" context = "Get-Jobs" dt = "boolean"

default = "0" />

</group>

</elementType >

<elementType id="job"> <!-- This defines the job attributes for all requests -->

<description>Contains job attributes.</description>

<group groupOrder="AND" >

<element type="#job-priority" occurs="OPTIONAL" implement = "LINKED">

<default><elementValue type="printer:priority-default"/></default>

<!-- This defines the default of this element in the context of a job attribute group

The value is of some other attribute -->

</element>

<element type="#job-hold-until" occurs="OPTIONAL" implement = "LINKED" >

<default><elementValue type="printer:job-hold-until-default"/></default>

<values><elementValue type="printer:job-hold-until-supported"/></values>

<!-- This defines the allowed value of this element in the context of a job attribute group

The value is of some other attribute. This overrides the values specified in the

definition which specifies all values allowed by the standard. -->

</element>

<element type="#job-sheets" occurs="OPTIONAL" implement = "LINKED" >

<default><elementValue type="printer:job-sheets-default"/></default>

<values><elementValue type="printer:job-sheets-supported"/></values>

</element>

<element type="#multiple-document-handling" occurs="OPTIONAL" implement = "LINKED">

<default><elementValue type="printer:multiple-document-handling-default"/></default>

<values><elementValue type="printer:multiple-document-handling-supported"/></values>

</element>

<element type="#copies" occurs="OPTIONAL" implement = "LINKED" >

<default><elementValue type="printer:copies-default"/></default>

<min>1<min>

<max><elementValue type="printer:copies-supported"/></max>

</element>

<element type="#finishings" occurs="OPTIONAL" implement = "LINKED" >

<default><elementValue type="printer:finishings-default"/></default>

<values occurs = "ONEORMORE">

<elementValue type="printer:finishings-supported"/>

<!-- This Set of values from a set of values needs more work -->

</values>

</element>

<condition id = "pageRangesSupported" >

<isTrue> <elementValue type = "printer: page-ranges-supported"/> </isTrue>

<!-- This defines a conditional expression that evaluates to a boolean -->

</ condition >

<group condition = "pageRangesSupported">

<element type="#page-ranges" occurs="OPTIONAL" implement = "LINKED" />

<default dt = "outOfBand" > all</default> <!-- this is implied by the model -->

</element>

</group>

<element type="#sides" occurs="OPTIONAL" implement = "LINKED" />

<default><elementValue type="printer:sides-default"/></default>

<values><elementValue type="printer:sides-supported"/></values>

</element>

<element type="#number-up" occurs="OPTIONAL" implement = "LINKED" />

<default><elementValue type="printer:number-up-default"/></default>

<values><elementValue type="printer:number-up-supported"/></values>

</element>

<element type="#orientation-requested" occurs="OPTIONAL" implement = "LINKED"

<default><elementValue type="printer:orientation-requested-default"/></default>

<values><elementValue type="printer:orientation-requested-supported"/></values>

</element>

<element type="#media" occurs="OPTIONAL" implement = "LINKED" />

<default><elementValue type="printer:media-default"/></default>

<values><elementValue type="printer:media-supported"/></values>

</element>

<element type="#printer-resolution" occurs="OPTIONAL" implement = "LINKED" />

<default><elementValue type="printer:printer-resolution-default"/></default>

<values><elementValue type="printer:printer-resolution-supported"/></values>

</element>

<element type="#print-quality" occurs="OPTIONAL" implement = "LINKED" />

<default><elementValue type="printer:print-quality-default"/></default>

<values><elementValue type="printer:print-quality-supported"/></values>

</element>

</group>

</elementType >

</schema >

Schema for IPP Response

This section is still being worked on. References to section 15.3 are not complete.

<s:schema id= "response" > <!-- The root is "response" for this schema, another schema does "response" -->

<elementType id="response"> <!-- This defines a "request" element in XML -->

<!-- I have not used the attribute 'content="CLOSED"'. Thus undefined child

elements are also allowed anyplace as siblings of the defined children. This is

less restrictive than section 15.3.4.2. The XML rule is simpler to specify -->

<description>The root of the operation.</description>

<!-- the operation and job elements must appear in the order shown below according to the

rules of XML Data -->

<element type="#operation" occurs="REQUIRED" /> <!-- section 15.3.4.3, "operation" is required -->

<element type="#unsupported" occurs="OPTIONAL" />

<element type="#job" occurs="REQUIRED" context = "PrintOrSendNoVal" />

<!-- If context "PrintOrSendNoVal" is met then "job" is REQUIRED-->

<element type="#job" occurs="REQUIRED" context = "Get-Job-Attributes" />

<!-- If context "Get-Job-Attributes" is met then "job" is REQUIRED-->

<element type="#job" occurs="ZEROORMORE" context = "Get-Jobs" />

<!-- section 15.3.4.3, if context "Get-Jobs" is met then "job" occurs 0 or more times-->

<element type="#printer" occurs="REQUIRED" context = "Get-Printer-Attributes" />

<!-- section 15.3.4.1. If context "Get-Printer-Attributes" is met then "printer" is REQUIRED-->

<attribute id="operation" occurs = "REQUIRED" dt = "enum" min = "2" max = "0xB"

error = "server-error-operation-not-supported" /> <!-- I have added an operation attribute in the

response so a response can be verified without reference to its request . If this is not added

then I need a mechanism for a "context" in a reponse to look at an attribute in the request -->

<attribute id="version" occurs = "REQUIRED" dt = "string" values = "1.0"

error = "server-error-version-not-supported" /> <!-- section 15.3.1-->

<!-- The attribute "values" specifies the allowed values. -->

<attribute id="xml:lang" occurs = "REQUIRED" dt="language"

error = "client-error-bad-request" /> <!-- section 15.3.5, "values" is not specified because any

value of whose data type is "language" is allowed. -->

<attribute id="request-id" occurs = "REQUIRED" dt="int"

error = "client-error-bad-request" /> <!-- section 15.3.3, any value of type "int" is allowed-->

</elementType >

<elementType id="operation"><!-- This defines the operation attributes for all requests -->

<description>Contains operation attributes.</description>

<group groupOrder="AND" >

<element type="#status-code" occurs="REQUIRED" dt = "int"/>

<element type="#status-message" occurs="OPTIONAL" dt = "text"/>

</group>

</elementType >

<elementType id="unsupported"> <!-- This defines the unsupported attributes for all requests -->

<description>Contains unsupported attributes.</description>

<element occurs = "ONEORMORE"/> <!-- This allows anything. With more work we could

probably specify what the levels of syntax really mean -->

</elementType >

<elementType id="job" context = "PrintOrSendNoVal" >

<description>Contains operation attributes.</description>

<group groupOrder="AND" >

<element type="#job-id" occurs="REQUIRED" />

<element type="#job-uri" occurs="REQUIRED" />

<element type="#job-state" occurs="REQUIRED" />

<element type="#job-state-reasons" occurs="REQUIRED" />

<element type="#job-state-message" occurs="REQUIRED" />

<element type="#number-of-intervening-jobs" occurs="REQUIRED" />

</group>

</elementType >

<elementType id="job" context = "Get-Job-Attributes" >

<description>Contains operation attributes.</description>

<element supertype ="#job" occurs="ZEROORMORE" />

<!-- the supertype stands for any element that is a member of "job". I think this is not exactly what

XML Data means by super type.This needs work -->

</elementType >

<elementType id="job" context = "Get-Jobs " >

<description>Contains operation attributes.</description>

<element supertype ="#job" occurs="ZEROORMORE" />

</elementType >

<elementType id="printer" context = "Get-Printer-Attributes" >

<description>Contains operation attributes.</description>

<element supertype ="#printer" occurs="ZEROORMORE" />

</elementType >

</schema >

Schema for IPP Job Template Attributes

This section defines the job template attributes.

<schema >

<group implement = "OPTIONAL"> <!-- all of this group is implemented or none of it is -->

<elementType id="#job-priority" supertype = "jobT" dt = "int" min = "1" max = "100"/>

<!-- The supertype specifies the membership in a supertype. This is redundant with the

supertype definitions elsewhere. -->

<elementType id="#job-priority-default" supertype = "printerT" dt = "int" min = "1" max = "100"/>

<elementType id="#job-priority-supported" supertype = "printerT" dt = "int" min = "1" max = "100"/>

</group >

<group implement = "OPTIONAL">

<elementType id="#job-hold-until" supertype = "jobT" dt = "keywordHoldUntil" altdts = "name" />

<!-- "altdts" defines alternate datatype, which require an explicit "dt" attribute

"keywordHoldUntil" is specified in the data type section. The type implies the

allowed values. -->

<elementType id="#job-hold-until-default " supertype = "printerT" dt = "keywordHoldUntil"

altdts = "name" />

<elementType id="#job-hold-until-supported " supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "keywordHoldUntil" aldts = "name"/>

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#job-sheets" supertype = "jobT" dt = "keywordJobSheets" altdts = "name" />

<elementType id="#job-sheets-default" supertype = "printerT" dt = "keywordJobSheets"

altdts = "name" />

<elementType id="#job-sheets-supported" " supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "keywordJobSheets" aldts = "name"/>

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#multiple-document-handling" supertype = "jobT" dt = "keywordMultiDoc" />

<elementType id="#multiple-document-handling-default" supertype = "printerT"

dt = "keywordMultiDoc" />

<elementType id="#multiple-document-handling-supported " supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "keywordMultiDoc" />

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#copies" supertype = "jobT" dt = "int"/>

<elementType id="#copies-default" supertype = "printerT" dt = "int"/>

<elementType id="#copies-supported" supertype = "printerT" dt = "int"/>

</group >

<group implement = "OPTIONAL">

<elementType id="#finishings" supertype = "jobT" dt = "setOfFinishings"/>

<elementType id="#finishings-default" supertype = "printerT" dt = "setOfFinishings"/>

<elementType id="#finishings-supported" supertype = "printerT" dt = "setOfFinishings"/>

</group >

<group implement = "OPTIONAL">

<elementType id="#page-ranges" supertype = "jobT" dt = "setOfRangeOfInteger" />

<elementType id="#page-ranges-supported" supertype = "printerT" dt = "boolean" />

</group >

<group implement = "OPTIONAL">

<elementType id="#sides" supertype = "jobT" dt = "keywordSides"/>

<elementType id="#sides-default" supertype = "printerT" dt = "keywordSides"/>

<elementType id="#sides-supported" supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "keywordSides" />

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#number-up" supertype = "jobT" dt = "int" />

<elementType id="#number-up-default" " supertype = "printerT" dt = "int" />

<elementType id="#number-up-supported" " supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "int" altdts = "rangeOfInteger" />

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#orientation-requested" supertype = "jobT" dt = "enumOrientations" />

<elementType id="#orientation-requested-default" " supertype = "printerT" dt ="enumOrientations"/>

<elementType id="#orientation-requested-supported"" supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "enumOrientations" />

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#media" supertype = "jobT" dt = "keywordMedia" altdts = "name" />

<elementType id="#media-default" " supertype = "printerT" dt = "keywordMedia" altdts = "name" />

<elementType id="#media-supported"" supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "keywordMedia" altdts = "name" />

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#printer-resolution" supertype = "jobT" dt = "resolution" />

<elementType id="#printer-resolution-default" " supertype = "printerT" dt = "resolution" />

<elementType id="#printer-resolution-supported" " supertype = "printerT" >

<element type = "item" occurs ="ONEORMORE" dt = "resolution" />

</elementType>

</group >

<group implement = "OPTIONAL">

<elementType id="#print-quality" supertype = "jobT" dt = "enumPrintQuality" />

<elementType id="#print-quality" supertype = "printerT" dt = "enumPrintQuality" />

<elementType id="#print-quality"" supertype = "printerT" />

<element type = "item" occurs ="ONEORMORE" dt = "enumPrintQuality" />

</elementType>

</group >

</schema >

Schema for IPP Job Description Attributes

TBD

Schema for IPP Printer Description Attributes

TBD

Schema for IPP Data Types

This schema defines the data types for IPP. "dt" is the XML attribute used to name a set of values. There are some primitive "dt"s, namely "int", "string", "uri", "dateTime" and "boolean". "DateTime" uses ISO 8601 format. The others are built from them. The XML attribute "value" specifies the allowed values if it is a subset of that specified by "dt". The XML attributes "min" and "max" is another way of specifying the values by giving the lower and upper bounds of the range.

<schema >

<datatype id = "text" dt = "string" maxOctets = "1023" />

<!-- "text" is a string limited to 1023 octets -->

<datatype id = "name" dt = "string" maxOctets = "255" />

<datatype id = "keyword" dt = "string" maxOctets = "255" chars = "a-z0-9-._" lang = "en-us" />

<!-- The allowed characters are enumerated in "chars" and the assumed language in "lang" -->

<datatype id = "enum" dt = "int" />

<datatype type = "uri" maxOctets = "1023" />

<!-- URI is primitive, but we want to restrict its length -->

<datatype id = "urischeme" dt = "string" maxOctets = "63" codeset = "US-ASCII"

values = "http https ftp mailto file" content = "OPEN" />

<!-- The "codeset" restricts the characters to those in "US-ASCII" -->

<datatype id = "charset" dt = "string" maxOctets = "63" codeset = "US-ASCII" />

<!-- We don't specify the values -->

<datatype id = "language" dt = "string" maxOctets = "63" codeset = "US-ASCII" />

<!-- We don't specify the values -->

<datatype id = "mimeMediaType" dt = "string" maxOctets = "63" codeset = "US-ASCII" />

<!-- We don't specify the values -->

<datatype id = "rangeOfInteger" >

<element type = "min" occurs = "REQUIRED" dt = "int" />

<element type = "max" occurs = "REQUIRED" dt = "int" />

</datatype>

<datatype id = "resolution" >

<element type = "xfeed" occurs = "REQUIRED" dt = "int" />

<element type = "feed" occurs = "REQUIRED" dt = "int" />

<element type = "units" occurs = "REQUIRED" dt = "enum" values = "3 4" />

</datatype>

<datatype id = "keywordHoldUntil" dt = "keyword"

values = "no-hold day-time evening night weekend second-shift third-shift" />

<!-- "keywordHoldUntil" is a "keyword" restricted to the values specified in "values" -->

<datatype id = "keywordJobSheets" dt = "keyword" values = "none standard" />

<datatype id = "keywordMultiDoc" dt = "keyword" values = "single-document

separate-documents-uncollated-copies separate-documents-collated-copies" />

<datatype id = "setOfFinishings" >

<element type = "item" occurs = "ONEORMORE" dt = "finishings" />

</datatype>

<datatype id = "finishings" dt = "enum" min = "3" max = "7" />

<datatype id = "setOfRangeOfInteger" >

<element type = "item" occurs = "ONEORMORE" dt = "rangeOfInteger" />

</datatype>

<datatype id = "keywordSides" dt = "keyword" values = "one-sided two-sided-long-edge

two-sided-short-edge " />

<datatype id = "enumOrientations " dt = "enum" min = "3" max = "6" />

<datatype id = "keywordMedia" dt = "keyword" values = "default iso-a4-white na-letter-white top middle

bottom envelope manual iso-a4 na-letter" />

<!-- not all media values are here. There are two many for this example -->

<datatype id = "enumPrintQuality" dt = "enum" min = "3" max = "5" />

</schema >

Schema for IPP Supertypes

This section shows the hierarchy of names used to refer to attributes. The "nickName" XML attribute defines the name that is used elsewhere to reference to collection of elements.

<schema >

<superElementType id = "job" nickName = "all" >

<!-- The supertype "job" is defined. It is referred to by "all" in a job context and contains two

supertypes "jobT" and "jobD". -->

<superElement type = "#jobT">

<superElement type = "#jobD">

</superElementType >

<superElementType id = "jobT" nickName = "jobTemplate" >

<element type = "#job-priority">

<element type = "#job-hold-until">

<element type = "#job-sheets">

<element type = "#job-sheets-supported">

<element type = "#multiple-document-handling">

<element type = "#copies">

<element type = "#finishings">

<element type = "#page-ranges">

<element type = "#sides">

<element type = "#orientation-requested">

<element type = "#media">

<element type = "#printer-resolution">

<element type = "#print-quality">

</superElementType >

<superElementType id = "jobD" nickName = "jobDescription" >

<element type = "#job-uri">

<element type = "#job-id">

<element type = "#job-printer-uri">

<element type = "#job-more-info">

<element type = "#job-name">

<element type = "#job-originating-user-name">

<element type = "#job-state">

<element type = "#job-state-reasons">

<element type = "#job-state-message">

<element type = "#number-of-documents">

<element type = "#output-device-assigned">

<element type = "#time-at-creation">

<element type = "#time-at-processing">

<element type = "#time-at-completed">

<element type = "#number-of-intervening-jobs">

<element type = "#job-message-from-operator">

<element type = "#job-k-octets">

<element type = "#job-impressions">

<element type = "#job-media-sheets">

<element type = "#job-k-octets-processed">

<element type = "#job-impressions-completed">

<element type = "#job-media-sheets-completed">

<element type = "#attributes-charset">

<element type = "#attributes-natural-language">

<element type = "#print">

</superElementType >

<superElementType id = "printer" nickName = "all" >

<superElement type = "#printerT">

<superElement type = "#printerD">

</superElementType >

<superElementType id = " printerT " nickName = "jobTemplate" >

<element type = "#job-priority-default">

<element type = "#job-hold-until-default">

<element type = "#job-sheets-default">

<element type = "#job-sheets-supported-default">

<element type = "#multiple-document-handling-default">

<element type = "#copies-default">

<element type = "#finishings-default">

<element type = "#sides-default">

<element type = "#orientation-requested-default">

<element type = "#media-default">

<element type = "#printer-resolution-default">

<element type = "#print-quality-default">

<element type = "#job-priority-supported">

<element type = "#job-hold-until-supported">

<element type = "#job-sheets-supported">

<element type = "#job-sheets-supported-supported">

<element type = "#multiple-document-handling-supported">

<element type = "#copies-supported">

<element type = "#finishings-supported">

<element type = "#page-ranges-supported">

<element type = "#sides-supported">

<element type = "#orientation-requested-supported">

<element type = "#media-supported">

<element type = "#printer-resolution-supported">

<element type = "#print-quality-supported">

</superElementType >

<superElementType id = "printerD" nickName = "printerDescription" >

<element type = "#printer-uri-supported">

<element type = "#uri-security-supported">

<element type = "#printer-name">

<element type = "#printer-location">

<element type = "#printer-info">

<element type = "#printer-more-info">

<element type = "#printer-driver-installer">

<element type = "#printer-make-and-model">

<element type = "#printer-more-info-manufacturer">

<element type = "#printer-state">

<element type = "#printer-state-reasons">

<element type = "#printer-state-message">

<element type = "#operations-supported">

<element type = "#charset-configured">

<element type = "#charset-supported">

<element type = "#natural-language-configured ">

<element type = "#generated-natural-language-supported">

<element type = "#document-format-supported">

<element type = "#printer-is-accepting-jobs">

<element type = "#queued-job-count">

<element type = "#printer-message-from-operator">

<element type = "#color-supported">

<element type = "#reference-uri-schemes-supported">

<element type = "#pdl-override-supported">

<element type = "#printer-up-time">

<element type = "#printer-current-time">

<element type = "#multiple-operation-time-out">

<element type = "#compression-supported">

<element type = "#job-k-octets-supported">

<element type = "#job-impressions-supported">

<element type = "#job-media-sheets-supported">

</superElementType >

</schema >

Schema for IPP Contexts

This section defines various contexts, which are referenced in the request and response schemas. All of the contexts here specify a set of operations. The request and response schemas use this to specify the operations in which a particular element is allowed.

<s:schema >

<!-- A series of contexts are defined. They are referenced in element and XML attribute definitions,

and control whether an element or XML attribute is present for a particular operation.-->

<context id = "PrintOrSend" > <!-- the context is named "PrintOrSend" -->

<element type = "request"> <!-- referencing element must be in a "request" -->

<group groupOrder= "OR"> <!-- the "request" must contain an attribute specified below -->

<attribute name = "operation" value = "2"/> <!-- Print-Job -->

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "4"/> <!—Validate-Job -->

<attribute name = "operation" value = "5"/> <!-- Create-Job -->

<attribute name = "operation" value = "6"/> <!-- Send-Document -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

</group >

</element>

</context>

<context id = "PrintOrSendNoVal" >

<element type = "request"> <!-- referencing element must be in a "request" -->

<group groupOrder= "OR"> <!-- the "request" must contain an attribute specified below -->

<attribute name = "operation" value = "2"/> <!-- Print-Job -->

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "5"/> <!-- Create-Job -->

<attribute name = "operation" value = "6"/> <!-- Send-Document -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

</group >

</element>

</context>

<context id = "Print">

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "2"/> <!-- Print-Job -->

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "4"/> <!—Validate-Job -->

<attribute name = "operation" value = "5"/> <!-- Create-Job -->

</group >

</element>

</context>

</context>

<context id = "PrintWDoc" >

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "2"/> <!-- Print-Job -->

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "4"/> <!-- Validate-Job -->

<attribute name = "operation" value = "6"/> <!-- Send-Document -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

</group >

</element>

</context>

<context id = "PrintWDocOrGetPrinterAttr" >

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "2"/> <!-- Print-Job -->

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "4"/> <!-- Validate-Job -->

<attribute name = "operation" value = "6"/> <!-- Send-Document -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

<attribute name = "operation" value = "0xB"/> <!-- Get-Printer-Attributes -->

</group >

</element>

</context>

<context id = "Doc-URI">

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

</group >

</element>

</context>

<context id = "PrinterOp" >

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "2"/> <!-- Print-Job -->

<attribute name = "operation" value = "3"/> <!-- Print-URI -->

<attribute name = "operation" value = "4"/> <!-- Validate-Job -->

<attribute name = "operation" value = "5"/> <!-- Create-Job -->

<attribute name = "operation" value = "0xA"/> <!-- Get-Jobs -->

<attribute name = "operation" value = "0xB"/> <!-- Get-Printer-Attributes -->

</group >

</element>

</context>

<context id = "JobOp" >

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "6"/> <!-- Send-Document -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

<attribute name = "operation" value = "8"/> <!-- Cancel-Job -->

<attribute name = "operation" value = "9"/> <!-- Get-Job-Attributes -->

</group >

</element>

</context>

<context id = "Send">

<element type = "request">

<group groupOrder= "OR">

<attribute name = "operation" value = "6"/> <!-- Send-Document -->

<attribute name = "operation" value = "7"/> <!-- Send-URI -->

</group >

</element>

</context>

<context id = "CancelJob" >

<element type = "request">

<attribute name = "operation" value = "8"/> <!-- Cancel-Job -->

</element>

</context>

<context id = "Get-Printer-Attributes" >

<element type = "request">

<attribute name = "operation" value = "0xB"/> <!-- Get-Printer-Attributes -->

</element>

</context>

<context id = "Get-Job-Attributes" >

<element type = "request">

<attribute name = "operation" value = "0x9"/> <!-- Get-Job-Attributes -->

</element>

</context>

<context id = "Get-Jobs" >

<element type = "request">

<attribute name = "operation" value = "0xA"/> <!-- Get-Jobs -->

</element>

</context>

</schema >