Child pages
  • HBO MODS Extension
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

XML Schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mods="http://www.loc.gov/mods/v3" xmlns="info:eu-repo/xmlns/hboMODSextension" targetNamespace="info:eu-repo/xmlns/hboMODSextension" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://www.loc.gov/mods/v3" schemaLocation="http://www.loc.gov/standards/mods/v3/mods-3-4.xsd"/>
	
	<!-- (1) HBO MODS extension -->
	
	<xs:element name="hbo" type="hboDefinition"/>
	
	<!-- (2) Group Definition -->
	
	<xs:group name="hboGroup">
		<xs:choice>
			<xs:element name="award" type="awardDefinition"/>
			<xs:element name="grade" type="gradeDefinition"/>
			<xs:element name="name" type="nameDefinition"/>
		</xs:choice>
	</xs:group>

	<xs:complexType name="hboDefinition">
		<xs:group ref="hboGroup" maxOccurs="unbounded"/>
	</xs:complexType>
	
	
	<!-- (3) Top Level Types -->	
	
	<!-- awardType definition -->
	<xs:complexType name="awardDefinition">
		<xs:sequence>
			<xs:element name="issuedBy" type="namedEntityType"/>
			<xs:element name="description" type="xs:string"/>
			<xs:element name="dateAwarded" type="mods:dateDefinition"/>
		</xs:sequence>
		<xs:attribute name="ID" type="xs:string" use="optional"/>
		<xs:attribute name="authority" type="xs:string" use="optional"/>
	</xs:complexType>
	
	<!-- gradeType definition -->
	<xs:complexType name="gradeDefinition">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="ID" type="xs:string" use="optional"/>
				<xs:attribute name="authority" type="xs:string" use="optional"/>
				<xs:attribute name="type" type="xs:string" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	
	<!-- nameDefinition -->
	<xs:complexType name="nameDefinition">
		<xs:complexContent>
			<xs:extension base="nameBaseDefinition">
				<xs:attribute name="altRepGroup" type="xs:string"/>
				<!--  altRepGroup new in 3.4 -->
				<xs:attribute name="nameTitleGroup" type="xs:string"/>
				<!--  nameTitleGroup new in 3.4 -->
				<xs:attribute name="usage" type="mods:usageAttributeDefinition"/>
				<!--  usage added to <name> in 3.4 -->
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
		
	
	<!-- (4) Subordinate Types -->
	
	<!-- namedEntityType definition -->
	<xs:complexType name="namedEntityType">
		<xs:simpleContent>
			<xs:extension base="xs:anyURI">
				<xs:attribute name="IDref" type="xs:string" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	
	<xs:group name="modsNameBaseGroup">
		<xs:choice>
			<xs:element ref="mods:namePart"/>
			<xs:element ref="mods:displayForm"/>
			<xs:element ref="mods:affiliation"/>
			<xs:element ref="mods:role"/>
			<xs:element ref="mods:description"/>
		</xs:choice>
	</xs:group>
	
	<!-- nameBaseDefinition -->
	<xs:complexType name="nameBaseDefinition">
		<xs:complexContent>
			<xs:extension base="mods:nameBaseDefinition">
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element name="namePart" type="namePartDefinition"/>
				</xs:choice>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	
	<!-- namePartDefinition definition -->
	<xs:complexType name="namePartDefinition">
		<xs:simpleContent>
			<xs:extension base="mods:xsString">
				<xs:attribute name="type"  type="unionNamePartTypeAttributeDefiniton"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>	
	
	<!-- namePartTypeAttributeDefinition -->
	<xs:simpleType name="namePartTypeAttributeDefinition">
		<xs:restriction base="xs:string">
			<xs:enumeration value="department"/>
			<xs:enumeration value="lectorate"/>
			<xs:enumeration value="organisation"/>
		</xs:restriction>
	</xs:simpleType>
	
	<!-- unionNamePartTypeAttributeDefinition -->
	<xs:simpleType name="unionNamePartTypeAttributeDefiniton">
		<xs:union memberTypes="mods:namePartTypeAttributeDefinition namePartTypeAttributeDefinition"/>
	</xs:simpleType>	
	
</xs:schema>
  • No labels