tsd:subTreeSQL

Purpose

This element is needed to map a sub-tree of an XML document to an SQL table. The primary key of the mapped SQL table can be specified using the tsd:primaryKeyColumn child element of the tsd:subTreeSQL element. Furthermore, an access predicate can be defined using the tsd:accessPredicate child element and its child, tsd:nodeParameter, belonging to this element.

The subtree must contain the tsd:nodeSQL element.

Parent element tsd:map
Child elements tsd:primaryKeyColumn, tsd:accessPredicate
Attributes table, userid, password, datasource, schema
Attributes
Name Type Description
table xs:string This attribute specifies the table for SQL storage of an XML sub-tree.
userid xs:string This attribute specifies the userid for the ODBC connection that is used for SQL storage of an XML sub-tree.
password xs:string This attribute specifies the password required to access a given Adabas database.
datasource xs:string This attribute specifies the ODBC data source for SQL storage of an XML sub-tree.
schema xs:string This attribute specifies the name of an external SQL schema.

Note:
Some SQL database systems do not have the concept of a schema. Then, the schema attribute must be omitted.

Example

This example demonstrates the use of the tsd:subTreeSQL element and its subelements tsd:nodeParameter, tsd:primaryKeyColumn and tsd:accessPredicate including all attributes:

<tsd:subTreeSQL datasource="myAdabasd" schema="mySchema" table="myTable"
                userid="myUserID" password="myPassword" >
  <tsd:primarykeyColumn>myPrimaryKeyColumn1</tsd:primarykeyColumn>
  <tsd:primarykeyColumn>myPrimaryKeyColumn2</tsd:primarykeyColumn>
  <tsd:accessPredicate>
         "login"     = <tsd:nodeParameter>/SQLMapping2/SQLMappingElement</tsd:nodeParameter>
     AND "accountNo" = <tsd:nodeParameter>/SQLMapping2/SQLMappingElement2</tsd:nodeParameter>
  </tsd:accessPredicate>
</tsd:subTreeSQL>