Portlet Factory, Version 6.1.2


 

SQL Transform to XML Builder Input

The SQL Transform To XML builder takes the inputs described in this table.

Table 1. SQL Transform to XML Builder Input
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Transform Result (Optional) A name for the XML storage variable that will be created by this builder. If no name is provided here, a default name, based on the builder name, will be supplied by the builder. Select the type of transform to be applied to the result set. Choices are:

Complete XML Document

Select this to create an XML variable in the Webapp. The transformed XML result will be written to this variable.

Note: When this choice is selected, the entire contents of the result set will be transformed into a single block of XML. Use this selection when you know the size of the returned result set will not be extremely large.

Paged XML Data Retriever

Select this to set up a variable in the Webapp that is backed by a data retriever LJO class. This class includes a method named getData() that queries the database, retrieves a subset of a result set, converts that information to XML, and returns it to the method's caller. A database query is performed each time this method is called and this can have performance implications. Use this selection when you are willing to trade off some performance for improved manageability of database connections and reduced memory impact from large result sets.
Row Count Calculation Indicate how the number of rows are calculated for the pageable result set. The choices are:

Automatically calculate count

The total number of rows is determined by the size of the data set. This option is good for data sets of a relatively limited size that do not adversely impact performance.

Leave count unspecified

The total number of rows is not determined. In this case, you will not be able to provide an access link to the last row.

Use custom count

Select this option to provide an alternative method to calcuate the number of rows, which is specified on the Row Count input.

Note: the Row Count Calculation input only appears when Transform Result is Paged XML DataRetriever

Row Count Provide an indirect reference to calculate the number of rows for the data set. This input is available only when Use custom count is selected for Row Count Calculation.
XML Variable Name The variable to hold the XML transformed from a SQL set. A variable is created if one doesn't exist.
Custom XML Element Names and Attributes

Create Verbose XML This option tells the builder to add extra information to the generated XML. This extra information will include a namespace on each element and may include element attributes that describe the database information in the element.

Note: This input is seldom used when transforming a result set for display.

Top Element Name Enter the name of the top-level element in the created XML.

RowSet is the default if nothing is provided for this input.

Row Element Name Enter the row element name you want to appear in the created XML.

Row is the default if nothing is provided for this input.

Use Column Labels Enable this box to use a column's database label as the XML element name for the column's value rather than the column's database name.

Some database drivers will treat a column label as the column's name. When this is the case this input may have no impact on the transformed XML.

Note: In some cases small changes might need to be made to the database labels to create valid XML element names.

Execution-Time XML Schema Generation

Generate Schema Enable this box to create and populate a variable with an XML schema that describes the transformed XML. The schema will be based on one row of data and will be generated at execution-time.

Note: Design-time generation makes a schema available to any other builders in the model that need it.

Schema Variable Name Enter the name of the variable that will be created to hold the generated XML schema. If you do not provide a value for this input, then the builder uses a default of buildernameSchema.
Target Name Space Enter a target name space for the generated schema so it may be used in a WSDL document for SOAP Web services. This entry provides a way for you to assign an XML name space to all the XML elements created by the transform.

If no name space is provided here, the builder will create one for you using configuration information derived from the IBM® WebSphere Portlet Factory Designer's application server configuration (host, port, application context, and so on), the model name, and the builder name.

Example: http://www.my_company.com/my_model/schema1

Execution-Time Meta-Data Generation

Generate Metadata Enable this box to create and populate a variable with result set metadata. This metadata is expressed as XML and is available within the WebApp for other builders to use.
Meta Data Variable Name Enter the name of the variable that will hold result set XML metadata.

If you do not provide a value for the this input, the builder will use a default of: buildernameMetaData.

Event and Statistics Generation

Log SQL Warnings Enable this box to log any SQL warnings that are generated when transforming a result set into XML.
Log Server Stats Enable this box to generate server statistics for this builder instance.
Fire Execution Events Enable this box to fire an event when a transform is executed.

Parent topic: SQL Transform to XML builder


Library | Support |