By Tim Dexter-Oracle on Apr 11, 2013
How can I store the result of <?xdofx:to_check_number(TOTAL_INV_AMOUNT,'USD','CASE_UPPER','DECIMAL_STYLE_WORDS')?> inside a variable.
Checking this out, BIP chokes on the assigning to the variable with a nice error:
Namespace prefix 'xdofx' used but not declared
Turning to BIP RTF template guru in residence Hok-Min, he suggested avoiding the xdofx: wrapper altogether in this case and calling the function more directly. The underlying function in java is:
public static String toCheckNumber(String locStr, String amount, String preOrCurCode, String caseStyle, String decimalStyle)
Applying that to Satyender's needs we end up with:
We still need the xdoxslt prefix but we can now assign the value to a variable. There is a caveat from Hok Min.
Note that the amount has to be in string format. If it is not a string, it has to be converted to a string, e.g. string($CALCULATED_SALARY). If you use XML element name directly (like in this case SALARY), then it is already a string, so no need to do conversion.
I know this raises the question of why do we need the xdofx: prefix at all? Im discussing that with Hok Min as I write and will get back to you.