XML Schema for Preference Files

The XML file format supports multi-value commands and user-defined preference files. Commands in XML files are executed sequentially unless specific rules are defined.

The XML schema can have multiple sections and multiple commands. Commands can contain multiple parameters and parameters can have multiple values.

The cogtr.xml file conforms to the XML schema. The cogtr.xml file contains two major predefined groups of xml elements:

  • a section which contains a list of preferences, for example:
    <Sections>
    <Section Name="Transformer">
    <Preference Name="DataWorkDirectory" Value="..\temp"/>
    <Preference Name="AutoEdit"Value="0"/>
    <Preference Name="ChildRatioThreshold" Value="35"/>
    <Preference Name="CubeSaveDirectory" Value="..\temp"/>
    <Preference Name="DataSourceDirectory" Value="..\temp"/>
    </Section><Section Name="RecentFileList">
    <Preference Name="File1" Value="NationalOriginal.mdl"/>
    <Preference Name="File2" Value="Cubexx.mdl"/>
    <Preference Name="File3" Value="GreatOutdoorsCompany_Slow_v1.mdl"/>
    <Preference Name="File4" Value="testcube.mdl"/>
    </Section>
    </Sections>
  • a Commands section, which will be empty in most cases. The Commands section passes commands to Cognos® Transformer when it is used in batch mode.

The following diagram shows the XML schema.

Graphic - XML schema example

Example

The following example shows multiple preferences and commands being passed to Cognos Transformer.

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
<Settings xsi:noNamespaceSchemaLocation="cogtr_format_v2.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Sections>
		<Section Name="Transformer">
			<Preference Name="DataWorkDirectory" Value="..\temp"/>
			<Preference Name="AutoEdit" Value="0"/>
			<Preference Name="ChildRatioThreshold" Value="35"/>
			<Preference Name="CubeSaveDirectory" Value="..\temp"/>
			<Preference Name="DataSourceDirectory" Value="..\temp"/>
		</Section>
		<Section Name="RecentPackageList">
			<Preference Name="mru_entry_0" Value="/content
/package[@name=&apos;EquifaxCube&apos;]"/>
		</Section>
		<Section Name="RecentFileList">
			<Preference Name="File1" Value="c:\NationalOriginal.mdl"/>
			<Preference Name="File2" Value="c:\Modified Cubexx.mdl"/>
			<Preference Name="File3" Value="c:\GreatOutdoorsCompany_Slow_v1.mdl"/>
			<Preference Name="File4" Value="c:\testcube.mdl"/>
		</Section>
	</Sections>
	<Commands>
		<Command Name="Publish">
			<Parameters>
				<Parameter Name="CubeName" Value="test"/>
				<Parameter Name="CognosConnectionDataSourceName" Value="test"/>
				<Parameter Name="DataSourceWindowsLocation"
					Value="c:\test1.mdc"/>
				<Parameter Name="DataSourceUnixLinuxLocation" Value=""/>
				<Parameter Name="DataSourceNameSpace" Value=""/>
				<Parameter Name="ReadCacheSize" Value="0"/>
				<Parameter Name="DataSourceSignon" Value="FALSE"/>
				<Parameter Name="DataSourceDescription" Value=""/>
				<Parameter Name="DataSourceToolTip" Value=""/>
				<Parameter Name="DataSourceUpdate" Value="FALSE"/>
				<Parameter Name="PackageName" Value="tpc"/>
				<Parameter Name="Packagelocation" Value="/content"/>
				<Parameter Name="PackageDescription" Value=""/>
				<Parameter Name="PackageToolTip" Value=""/>
				<Parameter Name="PackageUpdate" Value="FALSE"/>
				<Parameter Name="PackageAllowNullSuppression" Value="TRUE"/>
				<Parameter Name="PackageAllowMultiEdgeSuppression"
					Value="TRUE"/>
				<Parameter Name="PackageAllowAccessToSuppressionOptions"
					Value="TRUE"/>
			</Parameters>
		</Command>
		<Command Name="prompts" Value="MyQuery1">
			<Parameters>
				<Parameter Name="Prompt1" Value="TestCube"/>
				<Parameter Name="Prompt2">
					<Values>
						<Value>c:\test\cube.mdc</Value>
						<Value>c:\test\cube1.mdc</Value>
						<Value>c:\test\cube2.mdc</Value>
					</Values>
				</Parameter>
				<Parameter Name="Prompt3" Value="TestPackage"/>
			</Parameters>
		</Command>
		<Command Name="prompts" Value="MyQuery2">
			<Parameters>
				<Parameter Name="Prompt4">
					<Values>
						<Value>1</Value>
						<Value>4</Value>
						<Value>8</Value>
					</Values>
				</Parameter>
			</Parameters>
		</Command>
	</Commands>
</Settings>