Schema unimarcslim.xsd


UNIMARCSLIM:
UNIMARC XML Schema prepared by Giovanni Bergamin and Detlev Schumacher for BNCF and based on MARCXML (The MARC 21 XML Schema prepared by Corey Keith http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd).
August 8, 2004 Initial Release 0.1
January 21, 2018 Release 0.2 fixed regexp pattern value: last four chars ( /450./ instead of /450 | /)
This schema allows XML markup of UNIMARC records as specified in the MARC documentation
see UNIMARC bibliographic 2008 and Updates
This schema accommodates UNIMARC bibliographic and authority records and allows the embedded fields technique

5 test unimarcxml records




schema location:  unimarcslim.xsd
targetNamespace:  http://www.bncf.firenze.sbn.it/unimarc/slim
 
Elements  Complex types  Simple types 
collection  collectionType  controlDataType 
rec  controlFieldType  controltagDataType 
dataFieldType  idDataType 
leaderFieldType  indicatorDataType 
recordType  leaderDataType 
s1Type  recordTypeType 
subfieldatafieldType  subfieldcodeDataType 
subfieldDataType 
tagDataType 


element collection
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type collectionType
children rec
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 rec
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type recordType
children lab cf df
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="rec" 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.bncf.firenze.sbn.it/unimarc/slim
children rec
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="rec"/>
  </xsd:sequence>
  <xsd:attribute name="id" type="idDataType" use="optional"/>
</xsd:complexType>

complexType controlFieldType
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type extension of controlDataType
used by
elements recordType/cf s1Type/cf
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
t  controltagDataType  required      
annotation
documentation 
UNIMARC Fields 001-009
source
<xsd:complexType name="controlFieldType" id="controlfield.ct">
  <xsd:annotation>
    <xsd:documentation>UNIMARC Fields 001-009</xsd:documentation>
  </xsd:annotation>
  <xsd:simpleContent>
    <xsd:extension base="controlDataType">
      <xsd:attribute name="id" type="idDataType" use="optional"/>
      <xsd:attribute name="t" type="controltagDataType" use="required"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

complexType dataFieldType
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
children sf s1
used by
elements recordType/df s1Type/df
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
t  tagDataType  required      
i1  indicatorDataType  required      
i2  indicatorDataType  required      
annotation
documentation 
UNIMARC Variable Data Fields 010-999
source
<xsd:complexType name="dataFieldType" id="datafield.ct">
  <xsd:annotation>
    <xsd:documentation>UNIMARC Variable Data Fields 010-999</xsd:documentation>
  </xsd:annotation>
  <xsd:choice>
    <xsd:annotation>
      <xsd:documentation>UNIMARC field can be composed by standard subfields (strings) or by "s1" subfields with embedded tags indicators and subfields ex. g.: 4xx or 604 tags</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element name="sf" type="subfieldatafieldType"/>
    </xsd:sequence>
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element name="s1" type="s1Type"/>
    </xsd:sequence>
  </xsd:choice>
  <xsd:attribute name="id" type="idDataType" use="optional"/>
  <xsd:attribute name="t" type="tagDataType" use="required"/>
  <xsd:attribute name="i1" type="indicatorDataType" use="required"/>
  <xsd:attribute name="i2" type="indicatorDataType" use="required"/>
</xsd:complexType>

element dataFieldType/sf
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type subfieldatafieldType
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
c  subfieldcodeDataType  required      
source
<xsd:element name="sf" type="subfieldatafieldType"/>

element dataFieldType/s1
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type s1Type
children cf df
source
<xsd:element name="s1" type="s1Type"/>

complexType leaderFieldType
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type extension of leaderDataType
used by
element recordType/lab
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}(450.)
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
annotation
documentation 
UNIMARC record label 24 characters
source
<xsd:complexType name="leaderFieldType" id="leader.ct">
  <xsd:annotation>
    <xsd:documentation>UNIMARC record label 24 characters</xsd:documentation>
  </xsd:annotation>
  <xsd:simpleContent>
    <xsd:extension base="leaderDataType">
      <xsd:attribute name="id" type="idDataType" use="optional"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

complexType recordType
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
children lab cf df
used by
element rec
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="lab" type="leaderFieldType"/>
    <xsd:element name="cf" type="controlFieldType" maxOccurs="unbounded"/>
    <xsd:element name="df" 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/lab
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/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}(450.)
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
source
<xsd:element name="lab" type="leaderFieldType"/>

element recordType/cf
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type controlFieldType
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
t  controltagDataType  required      
source
<xsd:element name="cf" type="controlFieldType" maxOccurs="unbounded"/>

element recordType/df
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type dataFieldType
children sf s1
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
t  tagDataType  required      
i1  indicatorDataType  required      
i2  indicatorDataType  required      
source
<xsd:element name="df" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>

complexType s1Type
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
children cf df
used by
element dataFieldType/s1
annotation
documentation 
The embedded fields technique  introduced by s1 tag
source
<xsd:complexType name="s1Type" id="s1.ct">
  <xsd:annotation>
    <xsd:documentation>The embedded fields technique  introduced by s1 tag</xsd:documentation>
  </xsd:annotation>
  <xsd:sequence>
    <xsd:element name="cf" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="df" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
</xsd:complexType>

element s1Type/cf
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type controlFieldType
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
t  controltagDataType  required      
source
<xsd:element name="cf" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>

element s1Type/df
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type dataFieldType
children sf s1
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
t  tagDataType  required      
i1  indicatorDataType  required      
i2  indicatorDataType  required      
source
<xsd:element name="df" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>

complexType subfieldatafieldType
diagram
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type extension of subfieldDataType
used by
element dataFieldType/sf
facets
whiteSpace preserve
attributes
Name  Type  Use  Default  Fixed  Annotation
id  idDataType  optional      
c  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="c" type="subfieldcodeDataType" use="required"/>
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>

simpleType controlDataType
namespace http://www.bncf.firenze.sbn.it/unimarc/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.bncf.firenze.sbn.it/unimarc/slim
type restriction of xsd:string
used by
attribute controlFieldType/@t
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.bncf.firenze.sbn.it/unimarc/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.bncf.firenze.sbn.it/unimarc/slim
type restriction of xsd:string
used by
attributes dataFieldType/@i1 dataFieldType/@i2
facets
whiteSpace preserve
pattern [\d\|a-z ]{1}
source
<xsd:simpleType name="indicatorDataType" id="ind.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <xsd:pattern value="[\d\|a-z ]{1}"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType leaderDataType
namespace http://www.bncf.firenze.sbn.it/unimarc/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}(450.)
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}(450.)"/>
  </xsd:restriction>
</xsd:simpleType>

simpleType recordTypeType
namespace http://www.bncf.firenze.sbn.it/unimarc/slim
type restriction of xsd:NMTOKEN
used by
attribute recordType/@type
facets
enumeration Bibliographic
enumeration Authority
source
<xsd:simpleType name="recordTypeType" id="type.st">
  <xsd:restriction base="xsd:NMTOKEN">
    <xsd:enumeration value="Bibliographic"/>
    <xsd:enumeration value="Authority"/>
  </xsd:restriction>
</xsd:simpleType>

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

simpleType subfieldDataType
namespace http://www.bncf.firenze.sbn.it/unimarc/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.bncf.firenze.sbn.it/unimarc/slim
type restriction of xsd:string
used by
attribute dataFieldType/@t
facets
whiteSpace preserve
pattern (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}))
source
<xsd:simpleType name="tagDataType" id="tag.st">
  <xsd:restriction base="xsd:string">
    <xsd:whiteSpace value="preserve"/>
    <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}))"/>
  </xsd:restriction>
</xsd:simpleType>


XML Schema documentation generated with
XML Spy Schema Editor http://www.altova.com/xmlspy