Alternate Style Database Table

Example

This is an example of a named table definition for an Oracle database table with alternate style column. This uses the DBDataSourceMetadata element to specify the geometry column and the alternate style column defined in the database table.

Note: Alternate style columns can be defined in any supported database type by changing the connection definition.

In this example, the database connection definition to the Oracle table is defined using the following tokens:

In addition, it defines a DBDataSourceMetadata element indicating the name of the geometry column and style columns to use for the alternate styling of the table.


<?xml version="1.0" encoding="UTF-8"?>
<NamedDataSourceDefinition version="MXP_WorkSpace_1_5">
	<DBConnection dbType="oracle">
        <ConnectionName>/myOracleConnection</ConnectionName>
        <JDBCDriverParameters>
            <JDBCUrl>jdbc:oracle:thin:scott/tiger@localhost:1521:MyDB</JDBCUrl>
            <DriverPropertySet>
                <Property name="user" value="scott"></Property>
                <Property name="password" value="tiger"></Property>
            </DriverPropertySet>
        </JDBCDriverParameters>
    </DBConnection>
	<DataSourceDefinitionSet>
		<DBDataSourceDefinition id="ora1" volatile="true">>
			<DataSourceName>oracle2</DataSourceName>
			<DBTable owner="@owner@" useQuotes="true">table2</DBTable>
			<DBDataSourceMetadata>
				<FeatureGeometryAttribute srsName="@srsname@">@geometrycolumn@</FeatureGeometryAttribute>
				<FeatureStyleAttribute type="@styletype@">@stylecolumn@</FeatureStyleAttribute>
			</DBDataSourceMetadata>
		</DBDataSourceDefinition>
	</DataSourceDefinitionSet>
	<DataSourceRef ref="ora1"/>
</NamedDataSourceDefinition>