
ONIX for Books
Product Information Message
– Release 2.1
Download the XML Schema
Revised 31
January 2006 and now including Code Lists Issue 8. Please see the
Read-me
file included in the download
package for details.
This
ZIP file contains the set of text
files which together constitute
a formal definition of the ONIX for Books Product Information Message
as an XML Schema. The Schema includes two alternative forms: one using
text reference names for the elements, and one using short alphanumeric
tags. Both forms of the Schema are identical in their functionality.
With the Schema, you can use standard XML software to parse, verify and
operate on the content of correctly-formulated Product Information
Messages.
The
specifications and code lists are common to both the DTD and Schema: To
obtain copies of these and further information, visit the DTD
download
page.
Differences
between the DTD and Schema
The
XML Schema conforms to the W3C XML
Schema Recommendation
and this has led to some significant differences in functionality.
These are as follows.
- There
is no support in W3C XML Schema for the use of named special character
entity references (such as '–' for an en rule). For this
reason it is recommended that Unicode (UTF-8 or UTF-16) always be used
to encode ONIX messages that are to be processed using the XML Schema,
although Unicode character references (such as '–' for an
en rule) may also be used.
- W3C
XML Schema supports the definition of data types for data element
content. The ONIX Schema therefore defines data types for all data
elements whose value must be taken from a code list. An ONIX message
that contains incorrect codes, which would be valid if parsed against
the DTD, will be invalid
when parsed against the Schema.
- W3C
XML Schema supports the definition of minimum and maximum string
lengths in data element content. The ONIX Schema therefore defines a
minimum string length of '1' for all data elements that should contain
free text strings. With the exception of a very small number of
elements that must always be empty if used (e.g.
<NoEdition/>), an ONIX message that contains empty
elements, which, although incorrect in ONIX terms, would be reported as
valid if parsed against the DTD, will be invalid
when parsed against the Schema.
- Each
of the two forms (short tag and reference tag) of the ONIX Schema
defines a Namespace in accordance with the W3C Namespaces in XML
Recommendation. An ONIX message that does not declare the correct
Namespace will be invalid
when parsed against the Schema.
Using the schema
interactively for validation
For
validation purposes, master versions of the ONIX Schema are accessible
on the EDItEUR website. The URIs for these master versions are NOT
the same as the Namespace URIs. They are, for the reference version:
http://www.editeur.org/onix/2.1/reference/ONIX_BookProduct_Release2.1_reference.xsd
and
for the short version:
http://www.editeur.org/onix/2.1/short/ONIX_BookProduct_Release2.1_short.xsd.
|