You can include dynamic data source elements to be defined
at run time. The Data Source Configuration element
allows you to reconfigure a data source. This is useful when you do
not know the connection information while starting to design your
document. For example, if you linked artifacts from two products,
A and B, the data source information can be picked up from the B at
run time. By reconfiguring a data source, you change the properties
such as URI, user name, password, and any other data source-specific
properties used by Rational® Publishing Engine when
extracting data.
Before you begin
The Data Source Configuration element must be placed in the
document template before the element containing queries for the configured
data source.
About this task
Use the
Data Source Configuration element
to reconfigure the data source. A data source configuration element
must be connected to a data source schema that is used in the template.
Depending on the data source configuration, the dynamic data source
element includes properties similar to the properties in document
specification. At the time of document generation, this element initializes
or reinitialize the data source. Use the Data Source Configuration
element to define only the properties that are not known at run time.
Using this element for all properties such as the user name, password,
location of
exe files make the templates less
portable.
Although
the Data Source Configuration element properties
are similar to the ones defined for data source element in document
specification, the properties from the document specification have
static values while the properties from the Data Source
Configuration element use values from another data source
available in their context.
Procedure
To reconfigure the data source:
- In the Palette view, drag the
Data Source Configuration element
onto the template.
- Select the data source configuration element.
- In the Properties view, expand .
- In the target data source property,
enter the name of the data source schema. After a data source configuration
is connected to a data source schema, its formatting properties are
updated to reflect the run time properties of the data source schema
type.
- In the inherited data configuration property,
enter the name of a data source schema used in the template. By default
this property does not contain a value. You can change this value
with the data source schema name that is used in the template. If
this property is used, the target data source is configured using
the settings taken from the inherited data source, along with the
properties defined in the data source configuration.
The
properties from the inherited data source are used as long as a value
is not specified for the target data source. For example, the URL
of the inherited data source is used for the target data source as
long as the URL property is not filled for the target data source.
A common use for the inherited data source property is to provide
credentials only once for data sources.
- Expand the dynamic configuration property.
- In the URI property, specify the
data source URI. Remove any encoding from the URI, if
there is any. Rational Publishing Engine creates
encoding and if the encoding is duplicated, the URI cannot resolve.
Other
properties can also be specified or they are taken from either the
values provided in the Document Specification or the data source defined
under the
inherited data source property.
Note: The
target data source and inherited data source can be the same data
source. If inherited data source is left empty, the target
data source is used.
Unless the data source configuration
property is empty, it takes precedence over the document specification
property. Rational Publishing Engine combines
the properties defined in the Data Source Configuration element with
those defined in the Document Specification.