XML Schema Documentation

Table of Contents

top

Schema Document Properties

Target Namespace None
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations belong to this schema's target namespace.
  • By default, local attribute declarations have no namespace.
Schema Composition
Documentation This XML Schema defines a job description format used to process a print job within PEAX and its toolset (Straatos, World Of Documents etc.). It carries metadata about the job and is also used to generate job metadata for the print service provider.

Declared Namespaces

Prefix Namespace
xml http://www.w3.org/XML/1998/namespace
xs http://www.w3.org/2001/XMLSchema
xsi http://www.w3.org/2001/XMLSchema-instance
Schema Component Representation
<xs:schema elementFormDefault="qualified">
<xs:include schemaLocation="px-document-metadata.xsd"/>
...
</xs:schema>
top

Global Declarations

Element: document

Name document
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<document>
<printfile-reference> ... </printfile-reference> [1]
<recipient> ... </recipient> [1]
<peax-delivery-metadata> ... </peax-delivery-metadata> [0..1] ?
<peax-instructions> ... </peax-instructions> [0..1]
<print-instructions> ... </print-instructions> [1]
<email-instructions> ... </email-instructions> [0..1] ?
<inserts> ... </inserts> [0..1]
<parts> ... </parts> [1]
<properties> ... </properties> [1]
</document>
Schema Component Representation
<xs:element name="document">
<xs:complexType>
<xs:sequence>
<xs:element ref=" printfile-reference "/>
<xs:element ref=" recipient "/>
<xs:element ref=" peax-delivery-metadata " minOccurs="0"/>
<-- <xs:element name="language" type="xs:language"> <xs:annotation> <xs:documentation> The document language needed for controlling language-dependent post-processing. Valid values shall be restricted to the following 2-letter language codes: de, fr, it and en. Additional languages can be enabled as needed. </xs:documentation> </xs:annotation> </xs:element> -->
<xs:element ref=" peax-instructions " minOccurs="0"/>
<xs:element ref=" print-instructions "/>
<xs:element ref=" email-instructions " minOccurs="0"/>
<xs:element ref=" inserts " minOccurs="0"/>
<xs:element ref=" parts "/>
<xs:element ref=" properties "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: documents

Name documents
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<documents>
<document> ... </document> [1..*]
</documents>
Schema Component Representation
<xs:element name="documents">
<xs:complexType>
<xs:sequence>
<xs:element ref=" document " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: email-instructions

Name email-instructions
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<email-instructions>
<from> EmailWithNameType </from> [1] ?
<to> EmailWithNameType </to> [1] ?
</email-instructions>
Schema Component Representation
<xs:element name="email-instructions">
<xs:complexType>
<xs:sequence>
<xs:element name="from" type=" EmailWithNameType "/>
<xs:element name="to" type=" EmailWithNameType "/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: header

Name header
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Defines metadata that applies to the whole job.
XML Instance Representation
<header>
<jobid> xs:NMTOKEN </jobid> [1]
<print-file> ... </print-file> [1]
<tenant> ... </tenant> [1]
<job-type> xs:anyURI </job-type> [1] ?
<creation-date> xs:dateTime </creation-date> [1]
<properties> ... </properties> [0..1]
</header>
Schema Component Representation
<xs:element name="header">
<xs:complexType>
<xs:sequence>
<xs:element name="jobid" type=" xs:NMTOKEN "/>
<xs:element ref=" print-file "/>
<xs:element ref=" tenant "/>
<xs:element name="job-type" type=" xs:anyURI "/>
<xs:element name="creation-date" type=" xs:dateTime "/>
<xs:element ref=" properties " minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: insert

Name insert
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<insert
name=" xs:NCName [1]"
condition=" xs:NCName (value comes from list: {'auto'|'physical-only'|'pdf-append'}) [0..1]"/>
Schema Component Representation
<xs:element name="insert">
<xs:complexType>
<xs:attribute name="name" type=" xs:NCName " use="required"/>
<xs:attribute name="condition" default="auto">
<xs:simpleType>
<xs:restriction base=" xs:NCName ">
<xs:enumeration value="auto"/>
<xs:enumeration value="physical-only"/>
<xs:enumeration value="pdf-append"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
top

Element: inserts

Name inserts
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<inserts>
<insert> ... </insert> [1..*]
</inserts>
Schema Component Representation
<xs:element name="inserts">
<xs:complexType>
<xs:sequence>
<xs:element ref=" insert " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: page

Name page
Type Locally-defined complex type
Nillable no
Abstract no
Documentation This element represents a single page in the document (or document part).
XML Instance Representation
<page>
<medium> xs:NMTOKEN </medium> [1] ?
<underlay> xs:NMTOKEN </underlay> [0..*] ?
<overlay> xs:NMTOKEN </overlay> [0..*] ?
</page>
Schema Component Representation
<xs:element name="page">
<xs:complexType>
<xs:sequence>
<xs:element name="medium" type=" xs:NMTOKEN "/>
<xs:element name="underlay" type=" xs:NMTOKEN " minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="overlay" type=" xs:NMTOKEN " minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: part

Name part
Type Locally-defined complex type
Nillable no
Abstract no
Documentation See the documentation on the parent "parts" element.
XML Instance Representation
<part>
<page> ... </page> [1..*]
</part>
Schema Component Representation
<xs:element name="part">
<xs:complexType>
<xs:sequence>
<xs:element ref=" page " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: parts

Name parts
Type Locally-defined complex type
Nillable no
Abstract no
Documentation A part here means part of a document. It can also be called a sub-document. Example: there's an invoice (say 2 pages) and a form (say 1 page) that the recipient can fill out and send in. Applications which can't (or don't want to) map this, just generate one part for the whole document.
XML Instance Representation
<parts>
<part> ... </part> [1..*]
</parts>
Schema Component Representation
<xs:element name="parts">
<xs:complexType>
<xs:sequence>
<xs:element ref=" part " maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: peax-delivery-metadata

Name peax-delivery-metadata
Type Locally-defined complex type
Nillable no
Abstract no
Documentation This element contains the PEAX delivery metadata in XML form. The JSON equivalent is described at: http://api-doc.peax.ch/#api-Delivery-deliver Some of the metadata here is updated from the address lookup in the Partner Dictionary. At the moment, only invoice and the generic document type are defined. More will be added later.
XML Instance Representation
<peax-delivery-metadata>
Start Choice [1]
<document> DocumentType </document> [1]
<invoice> InvoiceType </invoice> [1]
End Choice
</peax-delivery-metadata>
Schema Component Representation
<xs:element name="peax-delivery-metadata">
<xs:complexType>
<xs:choice>
<xs:element name="document" type=" DocumentType "/>
<xs:element name="invoice" type=" InvoiceType "/>
</xs:choice>
</xs:complexType>
</xs:element>
top

Element: peax-instructions

Name peax-instructions
Type Locally-defined complex type
Nillable no
Abstract no
Documentation This element is not filled by the customer (ex. Green), but by the address validation step.
XML Instance Representation
<peax-instructions>
<org-status> xs:boolean </org-status> [0..1] ?
<activation-code> PEAXActivationCode </activation-code> [0..1]
<invitation-code> PEAXInvitationCode </invitation-code> [0..1]
</peax-instructions>
Schema Component Representation
<xs:element name="peax-instructions">
<xs:complexType>
<xs:sequence>
<-- Using PEAX delivery metadata's receiverPeaxId <xs:element name="id" type="PEAXID"> <xs:annotation> <xs:documentation> The PEAX ID is usually inserted by the address validation. </xs:documentation> </xs:annotation> </xs:element> -->
<xs:element name="org-status" type=" xs:boolean " minOccurs="0"/>
<xs:element name="activation-code" type=" PEAXActivationCode " minOccurs="0"/>
<xs:element name="invitation-code" type=" PEAXInvitationCode " minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: print-file

Name print-file
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Indicates the print file associates with this job description.
XML Instance Representation
<print-file
file=" xs:anyURI [1]"
size=" xs:integer [0..1]"
timestamp=" xs:dateTime [0..1]"/>
Schema Component Representation
<xs:element name="print-file">
<xs:complexType>
<xs:attribute name="file" type=" xs:anyURI " use="required"/>
<xs:attribute name="size" type=" xs:integer " use="optional"/>
<xs:attribute name="timestamp" type=" xs:dateTime " use="optional"/>
</xs:complexType>
</xs:element>
top

Element: printfile-reference

Name printfile-reference
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<printfile-reference>
<start-page> xs:positiveInteger </start-page> [1]
<end-page> xs:positiveInteger </end-page> [1]
<filename> xs:anyURI </filename> [0..1] ?
</printfile-reference>
Schema Component Representation
<xs:element name="printfile-reference">
<xs:complexType>
<xs:sequence>
<xs:element name="start-page" type=" xs:positiveInteger "/>
<xs:element name="end-page" type=" xs:positiveInteger "/>
<xs:element name="filename" type=" xs:anyURI " minOccurs="0"/>
<-- TODO: needed? -->
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: print-instructions

Name print-instructions
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<print-instructions>
<send-date-from> xs:date </send-date-from> [0..1] ?
<send-date-to> xs:date </send-date-to> [0..1] ?
<shipping> xs:NCName (value comes from list: {'priority'|'economy'|'super-economy'}) </shipping> [1]
<address-placement> xs:NCName (value comes from list: {'left'|'right'}) </address-placement> [1]
<envelope-type> xs:NCName </envelope-type> [1] ?
<duplex> xs:boolean </duplex> [1]
<color-mode> xs:NCName (value comes from list: {'color'|'monochrome'}) </color-mode> [1]
</print-instructions>
Schema Component Representation
<xs:element name="print-instructions">
<xs:complexType>
<xs:sequence>
<xs:element name="send-date-from" type=" xs:date " minOccurs="0"/>
<xs:element name="send-date-to" type=" xs:date " minOccurs="0"/>
<xs:element name="shipping">
<xs:simpleType>
<xs:restriction base=" xs:NCName ">
<xs:enumeration value="priority"/>
<xs:enumeration value="economy"/>
<xs:enumeration value="super-economy"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="address-placement">
<xs:simpleType>
<xs:restriction base=" xs:NCName ">
<xs:enumeration value="left"/>
<xs:enumeration value="right"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="envelope-type" type=" xs:NCName "/>
<xs:element name="duplex" type=" xs:boolean " default="false"/>
<xs:element name="color-mode" default="color">
<xs:simpleType>
<xs:restriction base=" xs:NCName ">
<xs:enumeration value="color"/>
<xs:enumeration value="monochrome"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: properties

Name properties
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<properties>
<property> ... </property> [0..*]
</properties>
Schema Component Representation
<xs:element name="properties">
<xs:complexType>
<xs:sequence>
<xs:element ref=" property " minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: property

Name property
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<property
key=" xs:NCName [1]"
value=" xs:string [1]"/>
Schema Component Representation
<xs:element name="property">
<xs:complexType>
<xs:attribute name="key" type=" xs:NCName " use="required"/>
<xs:attribute name="value" type=" xs:string " use="required"/>
</xs:complexType>
</xs:element>
top

Element: px-oms

Name px-oms
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Root element.
XML Instance Representation
<px-oms
version=" xs:decimal [0..1]">
<header> ... </header> [1]
<documents> ... </documents> [1]
</px-oms>
Schema Component Representation
<xs:element name="px-oms">
<xs:complexType>
<xs:sequence>
<xs:element ref=" header "/>
<xs:element ref=" documents "/>
</xs:sequence>
<xs:attribute name="version" type=" xs:decimal " default="1.0"/>
</xs:complexType>
</xs:element>
top

Element: recipient

Name recipient
Type Locally-defined complex type
Nillable no
Abstract no
Documentation The recipient metadata is mostly used for easy sorting by the print service provider and for reference when doing forensics. Interesting information related to this: <a href="https://confluence.cip4.org/display/PUB/Common+Metadata+for+Document+Production+Workflow+ICS"> ICS - Common Metadata for Document Production Workflows by CIP4</a> as used in JDF (Job Definition Format).
XML Instance Representation
<recipient>
<country> CountryCode </country> [1]
<zip> xs:string </zip> [1]
<formatted-address> xs:string </formatted-address> [1] ?
<routing> xs:NMTOKEN (value comes from list: {'peax'|'print'|'email'}) </routing> [1]
</recipient>
Schema Component Representation
<xs:element name="recipient">
<xs:complexType>
<xs:sequence>
<xs:element name="country" type=" CountryCode "/>
<xs:element name="zip" type=" xs:string "/>
<xs:element name="formatted-address" type=" xs:string "/>
<xs:element name="routing">
<xs:simpleType>
<xs:restriction base=" xs:NMTOKEN ">
<xs:enumeration value="peax"/>
<xs:enumeration value="print"/>
<xs:enumeration value="email"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
top

Element: tenant

Name tenant
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<tenant
id=" xs:NCName [1] ?"
name=" xs:string [0..1] ?"/>
Schema Component Representation
<xs:element name="tenant">
<xs:complexType>
<xs:attribute name="id" type=" xs:NCName " use="required"/>
<xs:attribute name="name" type=" xs:string " use="optional"/>
</xs:complexType>
</xs:element>
top

Global Definitions

Complex Type: EmailWithNameType

Super-types: xs:string < EmailType (by restriction) < EmailWithNameType (by extension)
Sub-types: None
Name EmailWithNameType
Abstract no
XML Instance Representation
<...
name=" xs:string [0..1]">
EmailType
</...>
Schema Component Representation
<xs:complexType name="EmailWithNameType">
<xs:simpleContent>
<xs:extension base=" EmailType ">
<xs:attribute name="name" type=" xs:string " use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
top

Simple Type: CountryCode

Super-types: xs:NCName < CountryCode (by restriction)
Sub-types: None
Name CountryCode
Content
  • Base XSD Type: NCName
  • length >= 2
Documentation 2-letter ISO 3166-1 ALPHA-2 country code. Example: CH, DE
Schema Component Representation
<xs:simpleType name="CountryCode">
<xs:restriction base=" xs:NCName ">
<xs:minLength value="2"/>
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
top

Simple Type: EmailType

Super-types: xs:string < EmailType (by restriction)
Sub-types:
Name EmailType
Content
  • Base XSD Type: string
  • pattern = [^@]+@[^\.]+\..+
Schema Component Representation
<xs:simpleType name="EmailType">
<xs:restriction base=" xs:string ">
<xs:pattern value="[^@]+@[^\.]+\..+"/>
</xs:restriction>
</xs:simpleType>
top

Simple Type: PEAXActivationCode

Super-types: xs:positiveInteger < PEAXActivationCode (by restriction)
Sub-types: None
Name PEAXActivationCode
Content
  • Base XSD Type: positiveInteger
Documentation PEAX Activation Code
Schema Component Representation
<xs:simpleType name="PEAXActivationCode">
<xs:restriction base=" xs:positiveInteger "/>
</xs:simpleType>
top

Simple Type: PEAXID

Super-types: xs:string < PEAXID (by restriction)
Sub-types: None
Name PEAXID
Content
  • Base XSD Type: string
  • pattern = \d{3}\.\d{4}\.\d{4}\.\d{2}
Documentation PEAX ID as EAN-13
Schema Component Representation
<xs:simpleType name="PEAXID">
<xs:restriction base=" xs:string ">
<xs:pattern value="\d{3}\.\d{4}\.\d{4}\.\d{2}"/>
</xs:restriction>
</xs:simpleType>
top

Simple Type: PEAXInvitationCode

Super-types: xs:positiveInteger < PEAXInvitationCode (by restriction)
Sub-types: None
Name PEAXInvitationCode
Content
  • Base XSD Type: positiveInteger
Documentation PEAX Invitation Code
Schema Component Representation
<xs:simpleType name="PEAXInvitationCode">
<xs:restriction base=" xs:positiveInteger "/>
</xs:simpleType>
top

Legend

Complex Type:

Schema Component Type

AusAddress

Schema Component Name
Super-types: Address < AusAddress (by extension)
Sub-types:
  • QLDAddress (by restriction)
If this schema component is a type definition, its type hierarchy is shown in a gray-bordered box.
Name AusAddress
Abstract no
The table above displays the properties of this schema component.
XML Instance Representation
<... country="Australia" >
<unitNo> string </unitNo> [0..1]
<houseNo> string </houseNo> [1]
<street> string </street> [1]
Start Choice [1]
<city> string </city> [1]
<town> string </town> [1]
End Choice
<state> AusStates </state> [1]
<postcode> string <<pattern = [1-9][0-9]{3}>> </postcode> [1] ?
</...>

The XML Instance Representation table above shows the schema component's content as an XML instance.

Schema Component Representation
<complexType name="AusAddress">
<complexContent>
<extension base=" Address ">
<sequence>
<element name="state" type=" AusStates "/>
<element name="postcode">
<simpleType>
<restriction base=" string ">
<pattern value="[1-9][0-9]{3}"/>
</restriction>
</simpleType>
</element>
</sequence>
<attribute name="country" type=" string " fixed="Australia"/>
</extension>
</complexContent>
</complexType>
The Schema Component Representation table above displays the underlying XML representation of the schema component. (Annotations are not shown.)
top

Glossary

Abstract (Applies to complex type definitions and element declarations). An abstract element or complex type cannot used to validate an element instance. If there is a reference to an abstract element, only element declarations that can substitute the abstract element can be used to validate the instance. For references to abstract type definitions, only derived types can be used.

All Model Group Child elements can be provided in any order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-all.

Choice Model Group Only one from the list of child elements and model groups can be provided in instances. See: http://www.w3.org/TR/xmlschema-1/#element-choice.

Collapse Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32). Then, collapse contiguous sequences of space characters into single space character, and remove leading and trailing space characters.

Disallowed Substitutions (Applies to element declarations). If substitution is specified, then substitution group members cannot be used in place of the given element declaration to validate element instances. If derivation methods, e.g. extension, restriction, are specified, then the given element declaration will not validate element instances that have types derived from the element declaration's type using the specified derivation methods. Normally, element instances can override their declaration's type by specifying an xsi:type attribute.

Key Constraint Like Uniqueness Constraint, but additionally requires that the specified value(s) must be provided. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Key Reference Constraint Ensures that the specified value(s) must match value(s) from a Key Constraint or Uniqueness Constraint. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Model Group Groups together element content, specifying the order in which the element content can occur and the number of times the group of element content may be repeated. See: http://www.w3.org/TR/xmlschema-1/#Model_Groups.

Nillable (Applies to element declarations). If an element declaration is nillable, instances can use the xsi:nil attribute. The xsi:nil attribute is the boolean attribute, nil, from the http://www.w3.org/2001/XMLSchema-instance namespace. If an element instance has an xsi:nil attribute set to true, it can be left empty, even though its element declaration may have required content.

Notation A notation is used to identify the format of a piece of data. Values of elements and attributes that are of type, NOTATION, must come from the names of declared notations. See: http://www.w3.org/TR/xmlschema-1/#cNotation_Declarations.

Preserve Whitespace Policy Preserve whitespaces exactly as they appear in instances.

Prohibited Derivations (Applies to type definitions). Derivation methods that cannot be used to create sub-types from a given type definition.

Prohibited Substitutions (Applies to complex type definitions). Prevents sub-types that have been derived using the specified derivation methods from validating element instances in place of the given type definition.

Replace Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32).

Sequence Model Group Child elements and model groups must be provided in the specified order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-sequence.

Substitution Group Elements that are members of a substitution group can be used wherever the head element of the substitution group is referenced.

Substitution Group Exclusions (Applies to element declarations). Prohibits element declarations from nominating themselves as being able to substitute a given element declaration, if they have types that are derived from the original element's type using the specified derivation methods.

Target Namespace The target namespace identifies the namespace that components in this schema belongs to. If no target namespace is provided, then the schema components do not belong to any namespace.

Uniqueness Constraint Ensures uniqueness of an element/attribute value, or a combination of values, within a specified scope. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

top