IBM Support

Known limitations of XQuery on DataPower appliances

Question & Answer


Question

What are the known limitations in the XQuery implementation on DataPower appliances?

Cause

The latest DataPower firmware version removes some of the limitations of the earlier XQuery implementation and integration with other DataPower functions.

Answer

An "X" in a column indicates the limitation exists in that version.

Limitation6.0.06.0.17.0.07.1.07.2.07.5.0
Post-Schema-Validation Infoset (PSV)
    During type-assessment, elements are not qualified by their context. For correct type-assessment, all element names must be globally unique.
    X
    X
    X
    X
X
X
Collation
    Unsupported collations are checked at run time, when used, instead of during compilation. Collation URLs, other than the codepoint URL and DB2 collation URLs, are not supported. If you use an unsupported URL, collation uses the codepoint URL without any error or warning.
    X
    X
    X
    X
X
X
Preceding-axis
    Preceding axis traversal does not work for text nodes.
    X
    X
    X
    X
X
X
Messages





    Error messages do not have enough information. The error message might not include the file name and line number.

    Note:
    This limitation is improved in 6.0.1 and further improved in 7.2.0.
    X
    X
    X
    X
X
X
    Parser error messages might give a reason that is in English and is not translated.
    X





Functions





    Arguments to the fn:concat() function
      The fn:concat() function accepts arguments of anyAtomicType* type without warning or error. According the specification and schema, the fn:concat() function should accept arguments of anyAtomicType? type. In schema syntax, * indicates 0 or more and ? indicates 0 or 1.
    X
    X
    X
    X
X
X
    Messages for the fn:doc() function
      No message is logged for an invalid codepoint in an NCName. The XML parser allows the invalid codepoint. An example of an invalid codepoint is an umlaut in an NCName.
    X
    X
    X
    X
X
X
    Result type of the fn:sum() function
      When you apply the fn:sum() function to an xs:float value, the result is a value of type xs:double.
    X
    X
    X
    X
X

    Extension functions
      In version 6.0.0, except for the MapUtils conv: functions, DataPower extension functions are not supported. The MapUtils conv: functions are also supported by XSLT 1.0.

      Note: In version 6.0.1 and later, extension functions to retrieve and set variables and to manipulate protocol headers are supported. For more information, see the DataPower information center topic on XQuery extension functions.
    X





      The dp:set-variable function works for a single item or a sequence of one item. As expected, the function fails on an empty sequence or on more than one item in a sequence. However, when the function fails, it does not set the variable, and there are no warnings nor errors.

      Note: In version 7.1 and later, the dp:set-variable function does not fail silently. Instead, when the function fails on an empty sequence or on more than one item in a sequence, it logs an error and proceeds with processing.

    X
    X



    External functions
      Instead of raising an error, a call to an external function returns an empty sequence.
    X





Declarations and dependencies





    The xml:id declaration is not supported.
    X
    X
    X
    X
X
X
    Conflicting default namespace declarations are not supported. When encountered, the output contains no namespaces.
    X
    X
    X
    X
X
X
    When a variable directly depends on itself, the error uses code XPST0008 instead of code XQST0054.
    X
    X
    X
    X
X
X
    When importing a module, colliding function names and colliding variable names are not always detected.
    X
    X
    X
    X
X
X
    Circular imports are not appropriately enforced. In some cases, legal circular imports are rejected. In other cases, illegal circular imports are allowed.
    X
    X
    X
    X
X
X
    For module function namespaces, messages with the XQST0048 code are never raised. This static error should be raised when a variable or function in a library module has a different namespace URI than the target namespace of the module.
    X
    X
    X
    X
X
X
Precision





    Decimal precision: xs:decimal has a lower value range than long subtypes (xs:long and xs:unsignedLong)
    X
    X




    Double and Float precision:
    • Double values can have a larger precision. Instead of 6.5535032E6, the output is 6.5535032000000002E6.
    • Double values can have a slightly incorrect value due to less precision. Instead of 2.7182817, the output is 2.718282.
    • Values can differ slightly. Instead of 9.2233479E11, the output is 9.2233478E11.
    • Values can gain a tiny addition value. Instead of 8.8, the output is 8.800000000000001.
    • The float value 0.0 can print as 0.
    X
    X
    X
    X


    • Float values have double precision.
X
X
X
X
X

Limit of number of clauses
    An upper limit exists on the number of clauses for FLWOR and qualified expressions. FLWOR is an abbreviation for FOR, LET, WHERE, ORDER BY, and RETURN statements. FLWOR is similar to SQL SELECT-FROM-WHERE statements.
    X





Character references
    The serialized output tree contains character references for non ASCII characters.
    X





Document construction





    In some cases, direct element content is treated as an enclosed expression.
    X
    X
    X
    X
X
X
    Documents with empty content can produce unexpected output.
    X
    X




    The type-name property is not supported for constructed trees. The type-name property is not considered in typeswitch and instance of operations.
    X
    X
    X
    X
X
X
    Values that are in a sequence that mix type and subtype are always typed with the base type.
    X
    X
    X
    X
X
X
    In some cases, XQuery 1.1 constructs use the wrong error code. For example, the use of the public and private keywords can result in the following message instead of a message about not being able to import the module.
      [XQST0059] Failed to locate a module for the target namespace
    X
    X




Out-of-Memory conditions





    While compiling a document, the appliance can reach a memory threshold.
    X





    While running a query, the appliance can reach a memory threshold.
    X
    X




Parameters





    When the XQuery lists a parameter as extern, its value must be of the xs:string type. When defined in this way, they work like DataPower parameters for XSLT. These parameters work for only explicit non-namespaced parameter names (for example. "{}my-param"). Instead of raising an error for parameters that do not work or cannot be found, some cases return an empty string.
    X





    Unlike XSLT external parameters, XQuery external parameters do not show automatically in the WebGUI.
    X
    X
    X
    X
X
X
Interoperability and compatibility





    The DataPower Interoperability Test Service does not support XQuery or JSON schema validation.
    X
    X
    X
    X
X
X
    The DataPower validation wizard does not support JSON schema validation.
    X
    X
    X
    X
X
X
    The XQuery processor does not support the Debug rule of the DataPower Compile Options Policy even though the Debug rule is configurable.
X
X
X
X
X

    The following XQuery optional features are not supported:
    • Schema import
    • Schema validation
    • Static typing
    X
    X
    X
    X
X
X
Regular expressions





    You must use an escape sequence in substitution text for only special characters: dollar($) and backslash (\)
      • You can use an escape sequence with other characters without adverse effects, which overrides the expected XQuery behavior.
      • A $ not followed by a digit has no special meaning and is in the substitution as itself, a $, which overrides the expected XQuery behavior.
    The expected XQuery behavior is to raise an FORX0004 message for an invalid replacement string.
    X
    X
    X
    X
X
X
    Patterns with back reference (\1, \2, ...) do not cause failure.
    X
    X
    X
    X
X
X
    Patterns that match a zero-length string do not cause failure.
    X
    X
    X
    X
X
X
    IBM defines locale and language support. To specify a character class in a pattern, use the \p{...} syntax. For example, \p{L} or \p{Lu} is valid, but \p{IsBasicLatin} is invalid
    X
    X
    X
    X
X
X
    Matching in a set expression uses simple matching independent of the case insensitive (i) flag.
    X
    X
    X
    X
X
X
Internet message format
    In version 7.1.0 and earlier, Internet message format is implemented with the following regular expression:
    [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]

    In version 7.20 and later, Internet message format is implemented to adhere to RFC 5322, with the following exceptions:

    • The obsolete syntax has not been included.
    • Comments are not supported. Comment folding white space (CFWS) is just Folding white space (FWS).
    •  FWS is simplified to *(WSP / CRLF)
X
X
X
X
X
X

[{"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"6.0.0;6.0.1;7.0.0;7.1;7.2;7.5","Edition":"Edition Independent","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21633648