W3C

MARC21slim

The document http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd has been classified as being possibly an Advanced XML Schema Patterns for Databinding 1.0 conformant document as it only exhibits the following patterns:

Status Nodes Name XPath
basic TargetNamespace .[@targetNamespace]/ (., @targetNamespace)
basic QualifiedLocalElements .[@elementFormDefault = 'qualified']/ (@elementFormDefault)
basic UnqualifiedLocalAttributes .[not(@attributeFormDefault) or @attributeFormDefault = 'unqualified']/ (., @attributeFormDefault)
basic SchemaVersion ./@version
basic DocumentationElement .//xs:annotation/xs:documentation/ (.., ., .//*, .//@*)
basic IdentifierName .//.[matches(@name, "^[A-Za-z_]([A-Za-z0-9_]0 31)$")]/ (@name)
advanced GlobalElementUnqualifiedType ./xs:element[@name and @type and not(contains(@type, ':'))]/ (., @name, @type)
advanced ElementTypeDefaultNamespace .//xs:element[@name and @type and not(contains(@type, ':'))]/ (@name, @type)
basic Id .//@id
basic ElementMinOccurs0MaxOccursUnbounded .//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs)
basic AttributeOptional .//xs:attribute[@use = 'optional']/ (@use)
advanced AttributeRequired .//xs:attribute[@use = 'required']/ (@use)
basic GlobalSimpleType ./xs:simpleType[@name]/ (., @name)
basic GlobalComplexType ./xs:complexType[@name]/ (., @name)
advanced NMTOKENEnumerationType .//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:NMTOKEN') and xs:enumeration]/ (., @base, xs:enumeration/(., @value))
basic ComplexTypeAttribute .//xs:complexType/xs:attribute[@name]/ (., @name)
basic ComplexTypeSequence .//xs:complexType/xs:sequence/ (., xs:element/(., @name))
advanced SequenceMinOccurs0 .//xs:sequence[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/ (@minOccurs, @maxOccurs)
advanced SequenceMinOccurs0MaxOccursUnbounded .//xs:sequence[@minOccurs = '0' and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs)
advanced SequenceMinOccurs1MaxOccursUnbounded .//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs)
advanced ExtendedSimpleContent .//xs:complexType/xs:simpleContent/xs:extension[@base]/ (.., ., ./@base, xs:attribute/ (., @name))
basic SequenceElement .//xs:sequence/xs:element/(.)
basic NillableElement .//xs:element[@nillable = 'true' and not(@minOccurs = '0')]/ (@nillable)
advanced ElementTypeReferenceUnqualified .//xs:element[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and not(contains(@type, ':'))]/ (., @name, @type)
advanced ElementReferenceUnqualified .//xs:element[@ref and not(contains(@ref, ':'))]/ (., @ref)
advanced AttributeTypeReferenceUnqualified .//xs:attribute[@name and @type and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' and not(contains(@type, ':'))]/ (., @name, @type)
advanced StringSimpleTypePattern .//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:pattern[@value]/ (.., ../@base, ., @value)
advanced SimpleTypeRenamed .//xs:simpleType/xs:restriction[@base and count(./*) = 0]/ (., @base)
advanced RestrictedWhitespacePreserve .//xs:simpleType/xs:restriction/xs:whiteSpace[@value='preserve']/(.., ../@base, ., @value, @fixed)
advanced XmlLang .[@xml:lang] / (@xml:lang)

<xsd:schema TargetNamespace UnqualifiedLocalAttributes targetNamespace="http://www.loc.gov/MARC21/slim" TargetNamespace elementFormDefault="qualified" QualifiedLocalElements attributeFormDefault="unqualified" UnqualifiedLocalAttributes version="1.1" SchemaVersion xml:lang="en" XmlLang >
<xsd:annotation DocumentationElement >
<xsd:documentation DocumentationElement >
MARCXML: The MARC 21 XML Schema Prepared by Corey Keith August 4, 2003 - Version 1.1 - Removed import of xml namespace and the use of xml:space="preserve" attributes on the leader and controlfields. Whitespace preservation in these subfields is accomplished by the use of xsd:whiteSpace value="preserve" May 21, 2002 - Version 1.0 - Initial Release This schema supports XML markup of MARC21 records as specified in the MARC documentation (see www.loc.gov). It allows tags with alphabetics and subfield codes that are symbols, neither of which are as yet used in the MARC 21 communications formats, but are allowed by MARC 21 for local data. The schema accommodates all types of MARC 21 records: bibliographic, holdings, bibliographic with embedded holdings, authority, classification, and community information.
</xsd:documentation>
</xsd:annotation>
<xsd:element GlobalElementUnqualifiedType ElementTypeReferenceUnqualified name="record" IdentifierName GlobalElementUnqualifiedType ElementTypeDefaultNamespace ElementTypeReferenceUnqualified type="recordType" GlobalElementUnqualifiedType ElementTypeDefaultNamespace ElementTypeReferenceUnqualified nillable="true" NillableElement id="record.e" Id >
<xsd:annotation DocumentationElement >
<xsd:documentation DocumentationElement >
record is a top level container element for all of the field elements which compose the record
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element GlobalElementUnqualifiedType ElementTypeReferenceUnqualified name="collection" IdentifierName GlobalElementUnqualifiedType ElementTypeDefaultNamespace ElementTypeReferenceUnqualified type="collectionType" GlobalElementUnqualifiedType ElementTypeDefaultNamespace ElementTypeReferenceUnqualified nillable="true" NillableElement id="collection.e" Id >
<xsd:annotation DocumentationElement >
<xsd:documentation DocumentationElement >
collection is a top level container element for 0 or many records
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType GlobalComplexType name="recordType" IdentifierName GlobalComplexType id="record.ct" Id > </xsd:complexType>
<xsd:simpleType GlobalSimpleType name="recordTypeType" IdentifierName GlobalSimpleType id="type.st" Id >
<xsd:restriction NMTOKENEnumerationType base="xsd:NMTOKEN" NMTOKENEnumerationType >
<xsd:enumeration NMTOKENEnumerationType value="Bibliographic" NMTOKENEnumerationType />
<xsd:enumeration NMTOKENEnumerationType value="Authority" NMTOKENEnumerationType />
<xsd:enumeration NMTOKENEnumerationType value="Holdings" NMTOKENEnumerationType />
<xsd:enumeration NMTOKENEnumerationType value="Classification" NMTOKENEnumerationType />
<xsd:enumeration NMTOKENEnumerationType value="Community" NMTOKENEnumerationType />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType GlobalComplexType name="leaderFieldType" IdentifierName GlobalComplexType id="leader.ct" Id >
<xsd:annotation DocumentationElement >
<xsd:documentation DocumentationElement >
MARC21 Leader, 24 bytes
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent ExtendedSimpleContent ></xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType GlobalSimpleType name="leaderDataType" IdentifierName GlobalSimpleType id="leader.st" Id >
<xsd:restriction StringSimpleTypePattern RestrictedWhitespacePreserve base="xsd:string" StringSimpleTypePattern RestrictedWhitespacePreserve >
<xsd:pattern StringSimpleTypePattern value="[\d ]{5}[\dA-Za-z ]{1}[\dA-Za-z]{1}[\dA-Za-z ]{3}(2| )(2| )[\d ]{5}[\dA-Za-z ]{3}(4500| )" StringSimpleTypePattern />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType GlobalComplexType name="controlFieldType" IdentifierName GlobalComplexType id="controlfield.ct" Id >
<xsd:annotation DocumentationElement >
<xsd:documentation DocumentationElement >
MARC21 Fields 001-009
</xsd:documentation>
</xsd:annotation>
</xsd:complexType>
<xsd:simpleType GlobalSimpleType name="controlDataType" IdentifierName GlobalSimpleType id="controlfield.st" Id >
<xsd:restriction RestrictedWhitespacePreserve base="xsd:string" RestrictedWhitespacePreserve ></xsd:restriction>
</xsd:simpleType>
<xsd:simpleType GlobalSimpleType name="controltagDataType" IdentifierName GlobalSimpleType id="controltag.st" Id >
<xsd:restriction StringSimpleTypePattern RestrictedWhitespacePreserve base="xsd:string" StringSimpleTypePattern RestrictedWhitespacePreserve >
<xsd:pattern StringSimpleTypePattern value="00[1-9A-Za-z]{1}" StringSimpleTypePattern />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType GlobalComplexType name="dataFieldType" IdentifierName GlobalComplexType id="datafield.ct" Id >
<xsd:annotation DocumentationElement >
<xsd:documentation DocumentationElement >
MARC21 Variable Data Fields 010-999
</xsd:documentation>
</xsd:annotation>
</xsd:complexType>
<xsd:simpleType GlobalSimpleType name="tagDataType" IdentifierName GlobalSimpleType id="tag.st" Id >
<xsd:restriction StringSimpleTypePattern RestrictedWhitespacePreserve base="xsd:string" StringSimpleTypePattern RestrictedWhitespacePreserve >
<xsd:pattern StringSimpleTypePattern 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}))" StringSimpleTypePattern />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType GlobalSimpleType name="indicatorDataType" IdentifierName GlobalSimpleType id="ind.st" Id ></xsd:simpleType>
<xsd:complexType GlobalComplexType name="subfieldatafieldType" IdentifierName GlobalComplexType id="subfield.ct" Id ></xsd:complexType>
<xsd:simpleType GlobalSimpleType name="subfieldDataType" IdentifierName GlobalSimpleType id="subfield.st" Id >
<xsd:restriction RestrictedWhitespacePreserve base="xsd:string" RestrictedWhitespacePreserve ></xsd:restriction>
</xsd:simpleType>
<xsd:simpleType GlobalSimpleType name="subfieldcodeDataType" IdentifierName GlobalSimpleType id="code.st" Id >
<xsd:restriction StringSimpleTypePattern RestrictedWhitespacePreserve base="xsd:string" StringSimpleTypePattern RestrictedWhitespacePreserve >
<xsd:pattern StringSimpleTypePattern value="[\da-z!"#$%&'()*+,-./:;<=>?{}_^`~\[\]\\]{1}" StringSimpleTypePattern />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType GlobalSimpleType name="idDataType" IdentifierName GlobalSimpleType id="id.st" Id >
<xsd:restriction SimpleTypeRenamed base="xsd:ID" SimpleTypeRenamed />
</xsd:simpleType>
</xsd:schema>

This document was produced by the W3C XML Schema Patterns for Databinding Working Group. Comments on this document may be sent to the public public-xsd-databinding-comments@w3.org mailing list (public archive).