WebSphere Integration Developer: a correction on Filter inputs in XML Transformations

When developing XML Transform in WebSphere Integration Developer (WID), you provide conditions on either “Condition” or “Filter Inputs” tabs of the transform properties. Condition tab usage is straightforward: you enter an XPath expression that is evaluated at runtime to a true or false. Filter Inputs, however, plays a trick on you. Help text above the tab indicates that you should enter a condition and the transform would apply to the input elements for which the condition evaluates to true.

But if you enter a condition that evaluates to boolean, a runtime error results, claiming this:

Can not convert #BOOLEAN to a NodeList!

This is your clue that help prompt and documentation are incorrect and you need to enter an XPath that evaluates to the list of nodes for which you want the transform to apply, and not the condition. Quick inspection of the generated XSLT conforms this finding: the value you enter into “Filter Inputs” is inserted directly into the select attribute of xsl:for-each element, e.g. if you enter Filter Inputs expression "$Status[Lev:Level='Error' or Lev:Level='Warn']", XSLT will contain this:

<xsl:for-each select="$Status[Lev:Level='Error' or Lev:Level='Warn']">
<xsl:copy-of select="."/>
</xsl:for-each>

Advertisements

2 Responses to WebSphere Integration Developer: a correction on Filter inputs in XML Transformations

  1. Arend says:

    Hi Ivan, great post!

    I made the same mistake (or should I say WID made the same mistake on me) and I could not figure it out, until I read your post. Good work! Maybe I will make a similar post on my blog and reference this one.

    Regards,
    Arend

  2. Soorya Prakash S says:

    Great .. it did help me

%d bloggers like this: