pp108 : Limitations

Limitations

This topic lists the limitations of XSLT.

Namespace

For performance reasons, namespace processing is disabled by default. You have to use a prefix inside the XPath expression to enable namespace processing.

XSLT Variables

For NOM-XSLT, variable or parameters must be declared before using them. This condition applies to the top level parameters and variables.

XML Declarations

XML declaration (<? xml version=1.0?>) will not be added to the result tree.

White space Handling

  • White space characters are ignored by default, to save parsing time and to ensure that the parsed object is smaller in size. However, you can use <XSL:text /> to enforce white space character into the result tree.
  • Output escaping is enabled by default, that is, special characters like & , >, <, and " will be replaced with &amp; , &gt; , &lt; and &quot;. However, you can use the original characters by enclosing them inside <XSL:text disable-output-escaping= "yes"/>.
    CDATA

    Content of CDATA elements are treated as literal result elements. However, based on user feed back, this will be changed.

    Qname Validation

    The name attribute of many XSLT constructs require a Qname. The validation is kept at minimum to reduce the parsing time.

    Comparison of Strings

    For performance reasons, strings are always compared. A parser will not convert strings to numbers and then compare. This is because there may be ways to determine what is required - a string comparison or a number comparison.

    XSL:variable's Namespace

    There can be multiple prefix declarations for same namespace URI. However, you have to use the same prefix with the variable declaration as well as inside the reference to the variable.

    For example, the following usage will not work with nomxslt.
    <XSL:stylesheet xmlns:XSL="http://www.w3.org/1999/XSL/Transform"
        xmlns:prefix1="http://hello.com" xmlns:prefix2="http://hello.com">
        <XSL:variable name="prefix1:MyVar" select="."/>
        <XSL:template match="/">
            <XSL:value-of select="$prefix2:MyVar"/>
        </XSL:template>
    </XSL:stylesheet>
    


    Importing XSLT Files

    Importing and including other XSLT files will not work if the input XSLT is given as a string (not a file).

XPath text() function

  • Default size for a text node is 5kb. If the size of the data is greater than 5kb, it will be stored in multiple text nodes causing the text() function to retrieve only the first 5kb of data. To increase the size of the text node use the property bus.xml.nom.normalizedata.buffersize

Related concepts

XPath and XSLT

Related reference

XSLT Functions that are not Supported in Process Platform

Related information

Overview of XSLT
Overview of XPath