1 <?xml version="1.0"?>
\r
2 <xsd:schema targetNamespace="http://www.loc.gov/MARC21/slim" xmlns="http://www.loc.gov/MARC21/slim" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1" xml:lang="en">
\r
5 MARCXML: The MARC 21 XML Schema
\r
6 Prepared by Corey Keith
\r
8 August 4, 2003 - Version 1.1 - Removed import of xml namespace and the use of xml:space="preserve" attributes on the leader and controlfields.
\r
9 Whitespace preservation in these subfields is accomplished by the use of xsd:whiteSpace value="preserve"
\r
11 May 21, 2002 - Version 1.0 - Initial Release
\r
13 This schema supports XML markup of MARC21 records as specified in the MARC documentation (see www.loc.gov). It allows tags with
\r
14 alphabetics and subfield codes that are symbols, neither of which are as yet used in the MARC 21 communications formats, but are
\r
15 allowed by MARC 21 for local data. The schema accommodates all types of MARC 21 records: bibliographic, holdings, bibliographic
\r
16 with embedded holdings, authority, classification, and community information.
\r
17 </xsd:documentation>
\r
19 <xsd:element name="record" type="recordType" nillable="true" id="record.e">
\r
21 <xsd:documentation>record is a top level container element for all of the field elements which compose the record</xsd:documentation>
\r
24 <xsd:element name="collection" type="collectionType" nillable="true" id="collection.e">
\r
26 <xsd:documentation>collection is a top level container element for 0 or many records</xsd:documentation>
\r
29 <xsd:complexType name="collectionType" id="collection.ct">
\r
30 <xsd:sequence minOccurs="0" maxOccurs="unbounded">
\r
31 <xsd:element ref="record"/>
\r
33 <xsd:attribute name="id" type="idDataType" use="optional"/>
\r
35 <xsd:complexType name="recordType" id="record.ct">
\r
36 <xsd:sequence minOccurs="0">
\r
37 <xsd:element name="leader" type="leaderFieldType"/>
\r
38 <xsd:element name="controlfield" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>
\r
39 <xsd:element name="datafield" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>
\r
41 <xsd:attribute name="type" type="recordTypeType" use="optional"/>
\r
42 <xsd:attribute name="id" type="idDataType" use="optional"/>
\r
44 <xsd:simpleType name="recordTypeType" id="type.st">
\r
45 <xsd:restriction base="xsd:NMTOKEN">
\r
46 <xsd:enumeration value="Bibliographic"/>
\r
47 <xsd:enumeration value="Authority"/>
\r
48 <xsd:enumeration value="Holdings"/>
\r
49 <xsd:enumeration value="Classification"/>
\r
50 <xsd:enumeration value="Community"/>
\r
53 <xsd:complexType name="leaderFieldType" id="leader.ct">
\r
55 <xsd:documentation>MARC21 Leader, 24 bytes</xsd:documentation>
\r
58 <xsd:extension base="leaderDataType">
\r
59 <xsd:attribute name="id" type="idDataType" use="optional"/>
\r
61 </xsd:simpleContent>
\r
63 <xsd:simpleType name="leaderDataType" id="leader.st">
\r
64 <xsd:restriction base="xsd:string">
\r
65 <xsd:whiteSpace value="preserve"/>
\r
66 <xsd:pattern value="[\d ]{5}[\dA-Za-z ]{1}[\dA-Za-z]{1}[\dA-Za-z ]{3}(2| )(2| )[\d ]{5}[\dA-Za-z ]{3}(4500| )"/>
\r
69 <xsd:complexType name="controlFieldType" id="controlfield.ct">
\r
71 <xsd:documentation>MARC21 Fields 001-009</xsd:documentation>
\r
74 <xsd:extension base="controlDataType">
\r
75 <xsd:attribute name="id" type="idDataType" use="optional"/>
\r
76 <xsd:attribute name="tag" type="controltagDataType" use="required"/>
\r
78 </xsd:simpleContent>
\r
80 <xsd:simpleType name="controlDataType" id="controlfield.st">
\r
81 <xsd:restriction base="xsd:string">
\r
82 <xsd:whiteSpace value="preserve"/>
\r
85 <xsd:simpleType name="controltagDataType" id="controltag.st">
\r
86 <xsd:restriction base="xsd:string">
\r
87 <xsd:whiteSpace value="preserve"/>
\r
88 <xsd:pattern value="00[1-9A-Za-z]{1}"/>
\r
91 <xsd:complexType name="dataFieldType" id="datafield.ct">
\r
93 <xsd:documentation>MARC21 Variable Data Fields 010-999</xsd:documentation>
\r
95 <xsd:sequence maxOccurs="unbounded">
\r
96 <xsd:element name="subfield" type="subfieldatafieldType"/>
\r
98 <xsd:attribute name="id" type="idDataType" use="optional"/>
\r
99 <xsd:attribute name="tag" type="tagDataType" use="required"/>
\r
100 <xsd:attribute name="ind1" type="indicatorDataType" use="required"/>
\r
101 <xsd:attribute name="ind2" type="indicatorDataType" use="required"/>
\r
103 <xsd:simpleType name="tagDataType" id="tag.st">
\r
104 <xsd:restriction base="xsd:string">
\r
105 <xsd:whiteSpace value="preserve"/>
\r
106 <xsd:pattern value="(0([1-9A-Z][0-9A-Z])|0([1-9a-z][0-9a-z]))|(([1-9A-Z][0-9A-Z]{2})|([1-9a-z][0-9a-z]{2}))"/>
\r
109 <xsd:simpleType name="indicatorDataType" id="ind.st">
\r
110 <xsd:restriction base="xsd:string">
\r
111 <xsd:whiteSpace value="preserve"/>
\r
112 <xsd:pattern value="[\da-z ]{1}"/>
\r
115 <xsd:complexType name="subfieldatafieldType" id="subfield.ct">
\r
116 <xsd:simpleContent>
\r
117 <xsd:extension base="subfieldDataType">
\r
118 <xsd:attribute name="id" type="idDataType" use="optional"/>
\r
119 <xsd:attribute name="code" type="subfieldcodeDataType" use="required"/>
\r
121 </xsd:simpleContent>
\r
123 <xsd:simpleType name="subfieldDataType" id="subfield.st">
\r
124 <xsd:restriction base="xsd:string">
\r
125 <xsd:whiteSpace value="preserve"/>
\r
128 <xsd:simpleType name="subfieldcodeDataType" id="code.st">
\r
129 <xsd:restriction base="xsd:string">
\r
130 <xsd:whiteSpace value="preserve"/>
\r
131 <xsd:pattern value="[\da-z!"#$%&'()*+,-./:;<=>?{}_^`~\[\]\\]{1}"/>
\r
134 <xsd:simpleType name="idDataType" id="id.st">
\r
135 <xsd:restriction base="xsd:ID"/>
\r