140 likes | 155 Vues
MARC and XML ELAG 17-19 April 2002, Rome. Mette Båstrup mbl@portia.dk www.portia.dk. Overview. Introduction What has been done and what to achieve XML Schema specifications Gaining consensus. Why XML for MARC?. Widespread standard technologies http://www.w3c.org XML (data structure)
E N D
MARC and XMLELAG 17-19 April 2002, Rome Mette Båstrup mbl@portia.dk www.portia.dk
Overview • Introduction • What has been done and what to achieve • XML Schema specifications • Gaining consensus Mette Båstrup-Larsen, Portia
Why XML for MARC? • Widespread standard technologies http://www.w3c.org • XML (data structure) • XSD schemas for specification replacing DTD and XDR schemas • XSL (presentation and customised validation) • Standard tools available (IBM, Microsoft, XML Spy) Mette Båstrup-Larsen, Portia
What has been done in this area? • Library of Congress MARC DTD • ftp://ftp.loc.gov/pub/xmldtd/mrcbfile.dtd • Open Archive Initiative (OAI) MARC XML • http://www.openarchives.org/OAI/oai_marc.xsd • VisualCat XDR and XSD schemas Mette Båstrup-Larsen, Portia
Related technologies • Dublin Core RDF XML • http://dublincore.org/documents/2001/11/28/dcmes-xml/ • http://www.portia.dk/pubs/RDF/DcRdfBasic20020321a.xsd • MODS from Library of Congress • http://www.loc.gov/standards/mods/ Mette Båstrup-Larsen, Portia
MARC validation rules • Syntax rules • Format rules e.g. 5 digit subfield • List of valid codes • ISBN validation • Context dependent rules • If subfield a is 10 then subfield b is 20 • Sequences of subfields in a field • e.g. a e a e a e b k l Mette Båstrup-Larsen, Portia
Problems when going to XML • MARC records are not self identifying • Tag names (characters not allowed as an XML element name) • Character sets • No formal specification of MARC records • User specified fields in the header • Non valid MARC records Mette Båstrup-Larsen, Portia
Goals for XML Schemas • Self identifying MARC records • Specifying rules: • General MARC 2709 rules • Rules for the different MARC flavours • Rules for a specific application • Use built-in schema validation • Extend schemas with application specific information Mette Båstrup-Larsen, Portia
The general MARC Schema • Specifications at: http://www.portia.dk/pubs/VisualCat/Specs/MarcXml/MarcTemplate2.xsd • Specifying general information: • MARC record incl. MARC header • MARC field • MARC subfield • No specification of specific fields e.g. Field 001, Field 002 etc. Mette Båstrup-Larsen, Portia
General MARC schema excerpt <xs:complexType name="marcType" abstract="true"> <xs:sequence> <xs:element name="MarcLeader" type="mc:marcleaderType"/> </xs:sequence> </xs:complexType> <xs:complexType name="varfieldType" abstract="true"> <xs:attribute name="i1" type="xs:string" use="optional"/> <xs:attribute name="i2" type="xs:string" use="optional"/> </xs:complexType> Mette Båstrup-Larsen, Portia
The specific MARC flavour schema • Specification at: http://www.portia.dk/pubs/VisualCat/Specs/MarcXml/danMarc2Template2.xsd • Specifying record for a given MARC flavour i.e MARC21, UNIMARC etc. • Specifying validation rules • Redefining the schema for a given situation e.g. cataloguing music Mette Båstrup-Larsen, Portia
Specific MARC flavour schema excerpt I <xs:element name="Field-100"> <xs:annotation><xs:documentation> <DisplayName xml:lang="da">Personnavn</DisplayName><ElementDesc Location="http://www..." MarcTag="100"/> </xs:documentation></xs:annotation> <xs:complexType><xs:complexContent> <xs:extension base="mc:varfieldType"> <xs:sequence> <xs:element ref="dm2:Subfield-100-a" minOccurs="0" maxOccurs="1"/> Mette Båstrup-Larsen, Portia
Specific MARC flavour schema excerpt II <xs:extension base="mc:marcType"> <xs:sequence> <xs:element ref="dm2:Field-100"/> <xs:element ref="dm2:Field-245"/> </xs:sequence> <xs:attribute name="MarcRecordSyntax" use="required"> <xs:simpleType> <xs:restriction base="mc:marcrecordsyntaxType"> <xs:enumeration value="DANMARC"/> </xs:restriction> </xs:simpleType> Mette Båstrup-Larsen, Portia
What has been gained? • Platform independent specification of MARC format • Can be used directly in an application with freely available standard tools • Can be read and maintained by non technicians • To be determined: Schema for exchange of MARC records based on OAI MARC/XML Mette Båstrup-Larsen, Portia