Schema MARC21slim.xsd


schema location:  http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
targetNamespace:  http://www.loc.gov/MARC21/slim
 
Elements  Complex types  Simple types 
collection  collectionType  controlDataType 
record  controlFieldType  controltagDataType 
dataFieldType  idDataType 
leaderFieldType  indicatorDataType 
recordType  leaderDataType 
subfieldatafieldType  recordTypeType 
subfieldcodeDataType 
subfieldDataType 
tagDataType 


schema location:  http://www.loc.gov/standards/marcxml/schema/xml.xsd
targetNamespace:  http://www.w3.org/XML/1998/namespace
 
Attr. groups 
xmlGlobalAttributes 


element collection
diagram
namespace http://www.loc.gov/MARC21/slim
type collectionType
children record
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
annotation
documentation 
collection is a top level container element for 0 or many records
source
<xsd:element name="collection" type="collectionType" nillable="true" id="collection.e">
  <xsd:annotation>
    <xsd:documentation>collection is a top level container element for 0 or many records</xsd:documentation>
  </xsd:annotation>
</xsd:element>

element record
diagram
namespace http://www.loc.gov/MARC21/slim
type recordType
children leader controlfield datafield
used by
complexType collectionType
attributes
Name  Type  Use  Default  Fixed  Annotation
type  recordTypeType  optional      
id  idDataType  optional      
annotation
documentation 
record is a top level container element for all of the field elements which compose the record
source
<xsd:element name="record" type="recordType" nillable="true" id="record.e">
  <xsd:annotation>
    <xsd:documentation>record is a top level container element for all of the field elements which compose the record</xsd:documentation>
  </xsd:annotation>
</xsd:element>

complexType collectionType
diagram
namespace http://www.loc.gov/MARC21/slim
children record
used by
element collection
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
source
<xsd:complexType name="collectionType" id="collection.ct">
  <xsd:sequence minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="record"/>
  </xsd:sequence>
  <xsd:attribute name="id" type="idDataType" use="optional"/>
</xsd:complexType>

complexType controlFieldType
diagram
namespace http://www.loc.gov/MARC21/slim
type extension of controlDataType
used by
element recordType/controlfield
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
tag  controltagDataType  required      
xml:space  xsd:NCName      preserve  
annotation
documentation 
MARC21 Fields 001-009
source
<xsd:complexType name="controlFieldType" id="controlfield.ct">
  <xsd:annotation>
    <xsd:documentation>MARC21 Fields 001-009</xsd:documentation>
  </xsd:annotation>
  <xsd:simpleContent>
    <xsd:extension base="controlDataType">
      <xsd:attribute name="id" type="idDataType" use="optional"/>
      <xsd:attribute name="tag" type="controltagDataType" use="required"/>
      <xsd:attribute ref="xml:space" fixed="preserve"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

complexType dataFieldType
diagram
namespace http://www.loc.gov/MARC21/slim
children subfield
used by
element recordType/datafield
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
tag  tagDataType  required      
ind1  indicatorDataType  required      
ind2  indicatorDataType  required      
annotation
documentation 
MARC21 Variable Data Fields 010-999
source
<xsd:complexType name="dataFieldType" id="datafield.ct">
  <xsd:annotation>
    <xsd:documentation>MARC21 Variable Data Fields 010-999</xsd:documentation>
  </xsd:annotation>
  <xsd:sequence maxOccurs="unbounded">
    <xsd:element name="subfield" type="subfieldatafieldType"/>
  </xsd:sequence>
  <xsd:attribute name="id" type="idDataType" use="optional"/>
  <xsd:attribute name="tag" type="tagDataType" use="required"/>
  <xsd:attribute name="ind1" type="indicatorDataType" use="required"/>
  <xsd:attribute name="ind2" type="indicatorDataType" use="required"/>
</xsd:complexType>

element dataFieldType/subfield
diagram
namespace http://www.loc.gov/MARC21/slim
type subfieldatafieldType
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
code  subfieldcodeDataType  required      
source
<xsd:element name="subfield" type="subfieldatafieldType"/>

complexType leaderFieldType
diagram
namespace http://www.loc.gov/MARC21/slim
type extension of leaderDataType
used by
element recordType/leader
facets
whiteSpace preserve
pattern [\d ]{5}[\dA-Za-z ]{1}[\dA-Za-z]{1}[\dA-Za-z ]{3}(2| )(2| )[\d ]{5}[\dA-Za-z ]{3}(4500| )
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
xml:space  xsd:NCName      preserve  
annotation
documentation 
MARC21 Leader, 24 bytes
source
<xsd:complexType name="leaderFieldType" id="leader.ct">
  <xsd:annotation>
    <xsd:documentation>MARC21 Leader, 24 bytes</xsd:documentation>
  </xsd:annotation>
  <xsd:simpleContent>
    <xsd:extension base="leaderDataType">
      <xsd:attribute name="id" type="idDataType" use="optional"/>
      <xsd:attribute ref="xml:space" fixed="preserve"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

complexType recordType
diagram
namespace http://www.loc.gov/MARC21/slim
children leader controlfield datafield
used by
element record
attributes
Name  Type  Use  Default  Fixed  Annotation
type  recordTypeType  optional      
id  idDataType  optional      
source
<xsd:complexType name="recordType" id="record.ct">
  <xsd:sequence minOccurs="0">
    <xsd:element name="leader" type="leaderFieldType"/>
    <xsd:element name="controlfield" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="datafield" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
  <xsd:attribute name="type" type="recordTypeType" use="optional"/>
  <xsd:attribute name="id" type="idDataType" use="optional"/>
</xsd:complexType>

element recordType/leader
diagram
namespace http://www.loc.gov/MARC21/slim
type leaderFieldType
facets
whiteSpace preserve
pattern [\d ]{5}[\dA-Za-z ]{1}[\dA-Za-z]{1}[\dA-Za-z ]{3}(2| )(2| )[\d ]{5}[\dA-Za-z ]{3}(4500| )
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
xml:space  xsd:NCName      preserve  
source
<xsd:element name="leader" type="leaderFieldType"/>

element recordType/controlfield
diagram
namespace http://www.loc.gov/MARC21/slim
type controlFieldType
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
tag  controltagDataType  required      
xml:space  xsd:NCName      preserve  
source
<xsd:element name="controlfield" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>

element recordType/datafield
diagram
namespace http://www.loc.gov/MARC21/slim
type dataFieldType
children subfield
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
tag  tagDataType  required      
ind1  indicatorDataType  required      
ind2  indicatorDataType  required      
source
<xsd:element name="datafield" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>

complexType subfieldatafieldType
diagram
namespace http://www.loc.gov/MARC21/slim
type extension of subfieldDataType
used by
element dataFieldType/subfield
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
code  subfieldcodeDataType  required      
source
<xsd:complexType name="subfieldatafieldType" id="subfield.ct">
  <xsd:simpleContent>
    <xsd:extension base="subfieldDataType">
      <xsd:attribute name="id" type="idDataType" use="optional"/>
      <xsd:attribute name="code" type="subfieldcodeDataType" use="required"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

simpleType controlDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
complexType controlFieldType
facets
whiteSpace preserve
source
<xsd:simpleType name="controlDataType" id="controlfield.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType controltagDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
attribute controlFieldType/@tag
facets
whiteSpace preserve
pattern 00[1-9A-Za-z]{1}
source
<xsd:simpleType name="controltagDataType" id="controltag.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <xsd:pattern value="00[1-9A-Za-z]{1}"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType idDataType
namespace http://www.loc.gov/MARC21/slim
type xsd:ID
used by
attributes collectionType/@id recordType/@id leaderFieldType/@id controlFieldType/@id dataFieldType/@id subfieldatafieldType/@id
source
<xsd:simpleType name="idDataType" id="id.st">
  <xsd:restriction base="xsd:ID"/>
</xsd:simpleType>

simpleType indicatorDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
attributes dataFieldType/@ind1 dataFieldType/@ind2
facets
whiteSpace preserve
pattern [\dA-Za-z ]{1}
source
<xsd:simpleType name="indicatorDataType" id="ind.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <xsd:pattern value="[\dA-Za-z ]{1}"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType leaderDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
complexType leaderFieldType
facets
whiteSpace preserve
pattern [\d ]{5}[\dA-Za-z ]{1}[\dA-Za-z]{1}[\dA-Za-z ]{3}(2| )(2| )[\d ]{5}[\dA-Za-z ]{3}(4500| )
source
<xsd:simpleType name="leaderDataType" id="leader.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <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|    )"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType recordTypeType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
attribute recordType/@type
facets
enumeration Bibliographic
enumeration Authority
enumeration Holdings
enumeration Classification
enumeration Community
source
<xsd:simpleType name="recordTypeType" id="type.st">
  <xsd:restriction base="xsd:string">
    <xsd:enumeration value="Bibliographic"/>
    <xsd:enumeration value="Authority"/>
    <xsd:enumeration value="Holdings"/>
    <xsd:enumeration value="Classification"/>
    <xsd:enumeration value="Community"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType subfieldcodeDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
attribute subfieldatafieldType/@code
facets
whiteSpace preserve
pattern [\dA-Za-z!"#$%&'()*+,-./:;<=>?{}_^`~\[\]\\]{1}
source
<xsd:simpleType name="subfieldcodeDataType" id="code.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <xsd:pattern value="[\dA-Za-z!"#$%&'()*+,-./:;<=>?{}_^`~\[\]\\]{1}"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType subfieldDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
complexType subfieldatafieldType
facets
whiteSpace preserve
source
<xsd:simpleType name="subfieldDataType" id="subfield.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType tagDataType
namespace http://www.loc.gov/MARC21/slim
type restriction of xsd:string
used by
attribute dataFieldType/@tag
facets
whiteSpace preserve
pattern (0([1-9A-Z]|[1-9a-z]){1}[\dA-Z]{1})|(([1-9A-Z]|[1-9a-z]){1}([\dA-Z]|[\da-z]){2})
source
<xsd:simpleType name="tagDataType" id="tag.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <xsd:pattern value="(0([1-9A-Z]|[1-9a-z]){1}[\dA-Z]{1})|(([1-9A-Z]|[1-9a-z]){1}([\dA-Z]|[\da-z]){2})"/>
  </xsd:restriction>
</xsd:simpleType>

attributeGroup xml:xmlGlobalAttributes
namespace http://www.w3.org/XML/1998/namespace
attributes
Name  Type  Use  Default  Fixed  Annotation
x:lang  xsd:language        
x:space  xsd:NCName    preserve    
x:base  xsd:anyURI        
source
<xsd:attributeGroup name="xmlGlobalAttributes">
  <xsd:attribute ref="x:lang"/>
  <xsd:attribute ref="x:space"/>
  <xsd:attribute ref="x:base"/>
</xsd:attributeGroup>


XML Schema documentation generated with
XML Spy Schema Editor www.xmlspy.com