RDS template

The standard RDS template file, template.xml, defines the information required by the Publisher API and subscribers. Since the subscriber allows lookups of a field value from a database table before inserting the value into the Sybase RAP schema, the template also allows the information required for this lookup to be defined.

A sample template is shown below. Each of the elements that are allowed in the template is described in the table that follows the sample. An XML schema (.xsd) describing the XML format is shipped as part of the product.

<Template>
	<MessageDefnList>
		<MessageDefn>
			<MessageDesc>Stock Quote</MessageDesc>
			<MessageType>1</MessageType>
			<DestTableName>STOCK_QUOTE</DestTableName>
			<FieldDefnList>
				<FieldDefn>
					<FieldName>Instrument ID</FieldName>
					<IntegerField>
						<IntegerDataType>
							uint32	
						</IntegerDataType>
					</IntegerField>
					<DestColumName>
						INSTRUMENT_ID
					</DestColumnName>
					<Lookup>
						<LookupTableName>
							INSTRUMENT
						</LookupTableName>
						<LookupColumnName>
							INSTRUMENT_ID
						</LookupColumnName>
						<LookupColumnReturn>
							INSTRUMENT_NAME
						</LookupColumnReturn>
					</Lookup>
				</FieldDefn >
				<FieldDefn>
					<FieldName>
						Quote Date
					</FieldName>
					<DateField/>
					<DestColumnName>
						QUOTE_DATE
					</DestColumnName>
				</FieldDefn>
				<FieldDefn>
					<FieldName>Quote Time</FieldName>
					<TimeField/>
					<DestColumnName>
						QUOTE_TIME
					</DestColumnName>
				</FieldDefn>
				<FieldDefn>
					<FieldName>
						Trading Symbol
					</FieldName>
					<StringField/>
					<DestColumnName>
						TRADING_SYMBOL
					</DestColumnName>
				</FieldDefn>
				<FieldDefn>
					<FieldName>Ask Price</FieldName>
					<DecimalField>
						<Precision>10</Precision>
						<Scale>2</Scale>
					</DecimalField>
					<DestColumnName>
						ASK_PRICE
					</DestColumnName>
				</FieldDefn>
			</FieldDefnList>
		</MessageDefn>
		<MessageDefn>
			...
		</MessageDefn>
	</MessageDefnList>
</Template>