Previous Topic: XML Publishing Using SQLNext Topic: Mapping Plain Text SQL to XML


XML Publishing

XML Publishing allows applications to generate XML data from data stored in a CA IDMS database easily and with high performance. Although the API is based on SQL, CA IDMS SQL supports SQL DML on non-SQL defined databases. Thus, also allowing non-SQL defined CA IDMS databases to be used as the data sources for XML Publishing.

XML Publishing is based on and implements a subset of the SQL/XML ISO standard as described in the ISO publication WD ISO/IEC 9075-14:2007 (E), titled "Information technology - Database languages - SQL - Part 14: XML-Related Specifications (SQL/XML)". A few extensions have been made available. These are indicated in the following section.

The XML Publishing capability is made available through a set of SQL functions, a new internal XML data type, an SQL table procedure, and an XML encoding session option.

SQL/XML Functions

The SQL/XML functions are not true SQL functions but pseudo functions. Some of the SQL/XML functions:

Following is a list of the SQL/XML routines (all functions except for one table procedure) that can be used for XML Publishing purposes:

XML Value Functions

CA IDMS Scalar Functions

Table Procedure

More Information
XML Data Type and XML Values

The XML data type is an internal only data type that represents XML data. XML values are usually used as arguments to some of the SQL/XML functions.

The only way to produce an XML value is through the invocation of an XML value function, possibly indirectly through using a subquery that returns an XML value. The return value of all XML value functions is of the XML data type. A subquery used as an XML-value-expression must be of the XML data type, which implies that its SELECT list contains an XML value function.

Data of the XML type cannot be stored in a database or directly used in application programs using the standard SQL API. Programs running in the CA IDMS CV address space or in batch local mode can access serialized XML data using the XMLPOINTER function. After serialization and casting to CHAR or VARCHAR through the XMLSERIALIZE function, XML data can be accessed using any supported SQL API on any platform.

To bypass the 30,000 length limit of the character string returned by XMLSERIALIZE, use the XMLSLICE table procedure.

Examples of valid XML values are as follows:

Syntax

No syntax is available. This is a special, internal only data type.

Mappings

SQL and XML are two different languages with their own specific language elements and grammar. When using SQL to produce XML, SQL language elements must be mapped to XML using appropriate rules.

This section describes the rules that are used for mapping of: