You can use the IBM® XML
Application Programming Interface (API) to perform operations that
use the new and updated W3C XML standards.
Before you begin
Limitations of the processor: - When using the namespace axis, only the namespaces declared on
the current node are accessible through the namespace axis (rather
than all of the namespaces that are in scope for the current node)
if the input document supplied is a StreamSource, SAXSource, or StAXSource.
- When evaluating some string functions and operations, the processor
might not handle Unicode characters with code points above #xFFFF
correctly; it might incorrectly treat the surrogate pair in the UTF-16
encoding of the character as two separate characters.
- Whitespace text nodes might not be stripped
from elements that have complex type with element-only content. When
matching children of such an element, use a sequence type that matches
only elements such as element() to avoid processing these text nodes.
- The column number reported in an error message
relating to an operator expression might not point to the operand
that is actually in error. Consider both operands when determining
the cause of the error.
- Using a variable declared in an XQuery typeswitch
clause as an operand in an arithmetic expression might cause an error.
When
using the variable declared in an XQuery typeswitch clause in an arithmetic
expression such as in the following example, the processor might incorrectly
report a type error.
typeswitch (.)
case $a as xs:integer return ($a + 1)
default return 17
To work around this limitation,
cast the variable to the expected type. For example:
typeswitch (.)
case $a as xs:integer return (($a cast as xs:integer) + 1)
default return 17
Procedure