IBM Support

XQuery 1.0 implementation-specific behaviors on the DataPower appliance

Question & Answer


Question

The XQuery version 1.0 specifications state that the implementation of certain items must be specified by the implementor. How does the DataPower appliance implement these implementation-defined items?

Cause

The following XQuery specifications require the implementation-defined items to be documented:


Answer

The following tables list the implementation-defined behaviors on the DataPower appliance. For details on each feature, see the specification.




Table 1: XQuery 1.0: An XML Query Language, Appendix D Implementation-Defined Items

FeatureDescriptionDocumented behavior
1Unicode versionThe supported version of UnicodeUnicode, version 6.0
2Statically-known collationsThe set of collation URLs that the implementation recognizes.Statically-known collations: DB2 short-form starts with "name=UCA500R1_". See the Unicode Collation Algorithm based collations topic. 

"L=" and "S=" options are also supported for human readable collation format. For example, the following collations are supported:

3Implicit time zoneThe time zone value that is used when a time zone is not specifiedThe implicit time zone uses the local time zone
4WarningsWhen are warnings raised, and how are warnings handledWarnings are raised as normal DataPower appliance warnings
5ErrorsHow are errors reportedErrors are reported as normal DataPower errors
6XML and XML Names specificationsWhich versions of the XML and XML Names specifications are supportedXML Version: XML 1.0 and XML Names
7Static context and dynamic context
Which components of the static context or dynamic context does the implementation overwrite or augmentFor dynamic context, the context item is defined by the processing policy input context, as interpreted by the xformng input type.

Variable values that are listed as external in the XQuery must be of type xs:string and work like DataPower parameters for XSLT. There is a limitation that they only work for explicitly non-namespaced parameter names (for example, "{}my-param" and not for others, including those that show up without a namespace name in the WebGUI. For ones that do not work at all, they often return the empty string and not an error when they are not found. Even external parameters that are not defined at all often return the empty string and not an error.

There are additional built-in functions. The MapUtils conv: functions that are available in XSLT.
8Optional axes or Full-Axis Feature supportWhich optional axes are supported if the Full-Axis Feature is not supported.The Full-Axis feature is supported
9Handling of empty sequences that are returned by an ordering keyBy default, when an ordering key in an order by clause returns an empty sequence, is it handled as empty least or empty greatestThe default order for empty sequences is empty least.
10Extension expressions and pragmasWhat extension expressions and pragmas are recognized No pragmas are supported.
11Option declarationsWhat option declarations are recognizedOption declarations recognized: JSONiq:
    declare option jsoniq-version "0.4.42";

This option declaration activates the JSONiq feature for version 0.4.42 of JSONiq.
12ProtocolsWhat protocols are supported to pass parameters to an external functionNo protocols are supported for external functions because there are no external functions.
13Module importHow are the modules that are imported identifiedFor Multiple Single Module Import, every module import must have exactly one Location Hint, and the module is entirely loaded from that location.
14Static typing featureWhat static typing extensions are supported by the static typing featureThe static typing feature is not supported.
15Serialization featureHow is serialization invokedSerialization is always invoked by default with the default serialization parameters.
16Default values for certain serialization feature parametersWhat are the default values for the following serialization feature parameters:
  • byte-order-mark
  • encoding
  • media-type
  • normalization-form
  • omit-xml-declaration
  • standalone
  • version
The default values for serialization:
  • byte-order-mark: No
  • encoding: utf-8
  • media-type:
    Media-Type is handled as it would be for any DataPower flow
  • normalization-form: None
  • omit-xml-declaration: False
  • standalone: Omit
  • version: 1.0
17Results of an external function call that is unsuccessfulWhat is the result of an external function call that is unsuccessfulIn the case of an unsuccessful call to an unimplemented external function, the function returns the empty sequence or raises an error.
18Data types range limitsWhat are the ranges of values for data types that are listed in section 5.3 Data Model Conformance of the specificationData types are limited consistent with the DataPower XML Schema limitations.

The xs:decimal function and all of its subtypes are limited to 18 digits.
19Syntactic extensionsWhat are the syntax and semantics of XQuery syntactic extensions as in section 5.4 Syntax Extensions of the specificationThe following syntactic extensions are supported:
  • JSONiq extensions
  • MapUtils conversion functions do not need to be declared.





  • Table 2: XQuery 1.0 and XPath 2.0 Data Model, Appendix F.1, Implementation-Defined Items

    FeatureDescriptionDocumented behavior
    1User-defined or implementation-defined typesWhat are the supported user-defined or implementation-defined typesUser-defined types are not allowed.

    Implementation-defined types from the JSONiq specification are supported.
    2Accessing an undefined propertyWhat is the behavior when accessing an undefined propertyAccessing an undefined property raises a standard DataPower error.





    Table 3: XQuery 1.0 and XPath 2.0 Functions and Operators, Appendix E Checklist of Implementation-Defined Features

    FeatureDescriptionDocumented behavior
    1Trace functionWhat is the destination of the trace output. Destination of trace output: 
    • For version 6.0.0: None
    • For version 6.0.1: DataPower log at info level
    2Operators on numeric values, overflow conditionsHow do xs:integer operations handle overflow conditions with limited-precision integer operations. Overflow condition always raise error err:FOAR0002.
    3Operators on numeric values, precision of returned valuesWhat is the precision for xs:decimal values that are returned by numeric operators The number of digits of precision is 18. That is, there are 8 digits before the decimal point and 18 digits after the decimal point.
    4Operators on numeric values, fractional overflow How do numeric operations handle overflow conditionsThe handling of the fractional overflow, whether the result is truncated or rounded, is undefined. The behavior might be different every operation.
    5Unicode versionThe supported version of UnicodeUnicode, version 6.0
    6Normalization Which of the following normalization forms are supported:
    • NFC
    • NFD
    • NFKC
    • NFKD
    • FULLY-NORMALIZED
    The fn:normalize-unicode function supports the following forms:
    • NFC
    • NFD
    • NFKC
    • NFKD
    7Collation decomposition The ability to decompose strings into collation units that are suitable for substring matchingThe collation decomposition suitability for substring matching provides as much as the International Components for Unicode (ICU).
    8Number of digits for year values and fractional second precision How many digits are supported for year values and for fractional second precision. Year values support 3 digits.
    Fractional second precision is 1 millisecond or 3 digits.
    9Casting a string to xs:decimal. What is the result of casting a string to xs:decimal when the resulting value cannot be accurately representedToo many decimal digits raises error FOAR0002.
    10fn:doc configuration options What external configuration options are supported for fn:doc processingThe fn:doc function provides the following external configuration options:
    • URI Schemes: Normal DataPower URI schemes
    • Media Types: Normal DataPower media types handling
    • Schema validation: None
    • User-defined error handling options: None
    • Relaxing stability options: None
    11Relaxing stability options for fn:collection and fn:doc How are stability options for fn:collection and fn:doc weakened Relaxing stability options: None





    Table 4: XSLT 2.0 and XQuery 1.0 Serialization, Appendix D Checklist of Implementation-Defined Features

    FeatureDescriptionDocumented behavior
    1Sequence normalization for output methodsFor the defined output methods, does sequence normalization take placeWhen output is XML, sequence normalization always takes place.

    When the output is JSON, sequence normalization never takes place.
    2Custom serialization parametersWhat custom serialization parameters are supportedA custom serialization parameter provides the ability to set output:method to be JSON as in the following declaration: 

    declare option output:method "json"; 
    3Additional serialization parameters How additional serialization parameters effect the output of the serializerNo additional serialization parameters are supported.
    4Encoding phase of serialization What is the option to skip the encoding phase of serializationAn option to skip the encoding phase is not supported.
    5CDATA resultsWhat CDATA mechanism is supported No CDATA result mechanism is supported.
    6Custom normalization-form form parameter value What custom normalization-form form parameters are supported No custom normalization-form form parameters are supported.

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

    Document Information

    Modified date:
    15 June 2018

    UID

    swg21633591