DatabaseRecordReader.xml

From DISMARC Help

(Difference between revisions)
Jump to: navigation, search

Herzoga (Talk | contribs)
(New page: XMLs that follow the schema below, are used for DatabaseRecordReaders. These config files will create a hierarchical XML. == Sample == <?xml version="1.0" encoding="UTF-8"?...)
Next diff →

Revision as of 08:48, 31 July 2008

XMLs that follow the schema below, are used for DatabaseRecordReaders. These config files will create a hierarchical XML.


Sample

  <?xml version="1.0" encoding="UTF-8"?>
  <MdmDatabaseRecordReaderConfig>
  	<dsn>mysql:host=localhost;dbname=jazz;</dsn>
  	<username></username>
  	<password></password>
  	<limitfrom>0</limitfrom>
  	<limitsize>0</limitsize>
<TableJoin to="ArtistId" from="Artist1" />
<TableJoin to="ArtistId" from="Artist2" />
<TableJoin from="BolagsId" to="BolagsId" />
<TableJoin from="FormatId" to="ID"></TableJoin>
<TableJoin from="SkivId" to="SkivId"></TableJoin>
<TableJoin from="MusikerId" to="MusikerId" />
<TableJoin from="InstrumentId" to="InstrumentId" />
<TableJoin from="SkivId" to="SkivId" />
<TableJoin from="NamnId" to="NamnId" />
  </MdmDatabaseRecordReaderConfig>

Description

Schema

  <?xml version="1.0" encoding="UTF-8"?>
  <xsd:schema targetNamespace="http://www.ait.co.at/mdm/recordreader/databaserecordreader" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mdm="http://www.ait.co.at/mdm/recordreader/databaserecordreader">
      <xsd:element name="MdmDatabaseRecordReaderConfig" type="mdm:MdmDatabaseRecordReaderConfigComplexType">
      </xsd:element>
      <xsd:complexType name="MdmDatabaseRecordReaderConfigComplexType">
      	<xsd:sequence>
      		<xsd:element ref="mdm:dsn" minOccurs="1" maxOccurs="1"></xsd:element>
      		<xsd:element ref="mdm:username" minOccurs="1"
      			maxOccurs="1">
      		</xsd:element>
      		<xsd:element ref="mdm:password" minOccurs="1"
      			maxOccurs="1">
      		</xsd:element>
      		<xsd:element ref="mdm:limitfrom" minOccurs="1"
      			maxOccurs="1">
      		</xsd:element>
      		<xsd:element ref="mdm:limitsize" minOccurs="1"
      			maxOccurs="1">
      		</xsd:element>
      		<xsd:element ref="mdm:CharacterSetClient" maxOccurs="1" minOccurs="0"></xsd:element>
      		<xsd:element ref="mdm:CharacterSetResult" maxOccurs="1" minOccurs="0"></xsd:element>
      		<xsd:element ref="mdm:CharacterSetConnection" maxOccurs="1" minOccurs="0"></xsd:element>
              <xsd:element ref="mdm:Table" maxOccurs="1" minOccurs="0"></xsd:element>
          </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="dsn" type="xsd:string"></xsd:element>
      <xsd:element name="username" type="xsd:string"></xsd:element>
      <xsd:element name="password" type="xsd:string"></xsd:element>
      <xsd:element name="limitfrom" type="xsd:string"></xsd:element>
      <xsd:element name="limitsize" type="xsd:string"></xsd:element>
  
  
      <xsd:element name="Table" type="mdm:TableType"></xsd:element>
      
  
      <xsd:complexType name="TableType">
      	<xsd:sequence>
      		<xsd:element name="TableJoin" maxOccurs="unbounded"
      			minOccurs="0">
      			<xsd:complexType>
      				<xsd:attribute name="from" type="xsd:string"
      					use="required">
      				</xsd:attribute>
      				<xsd:attribute name="to" type="xsd:string"
      					use="required">
      				</xsd:attribute>
      			</xsd:complexType>
      		</xsd:element>
      		<xsd:element name="TableConstrain">
      			<xsd:complexType>
      				<xsd:attribute name="field" type="xsd:string" use="required">
      				</xsd:attribute>
      				<xsd:attribute name="value" type="xsd:string" use="required">
      				</xsd:attribute>
      				<xsd:attribute name="op" use="required">
      					<xsd:simpleType>
      						<xsd:restriction base="xsd:string">
      							<xsd:enumeration value="<"></xsd:enumeration>
      							<xsd:enumeration value=">"></xsd:enumeration>
      							<xsd:enumeration value="="></xsd:enumeration>
      							<xsd:enumeration value="!="></xsd:enumeration>
      						</xsd:restriction>
      					</xsd:simpleType>
      				</xsd:attribute>
      			</xsd:complexType>
      		</xsd:element>
      		<xsd:element name="Ignore" type="xsd:string"
      			maxOccurs="unbounded" minOccurs="0">
      		</xsd:element>
      		<xsd:element ref="mdm:Table" maxOccurs="unbounded"
      			minOccurs="0">
      		</xsd:element>
      	</xsd:sequence>
      	<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
      	<xsd:attribute name="identifier" type="xsd:string" use="optional"></xsd:attribute>
      </xsd:complexType>
  
      <xsd:element name="CharacterSetClient" type="xsd:string"></xsd:element>
  
      <xsd:element name="CharacterSetResult" type="xsd:string"></xsd:element>
  
      <xsd:element name="CharacterSetConnection" type="xsd:string"></xsd:element>
  </xsd:schema>
Personal tools