BI Publisher (MOSC)

MOSC Banner

Xpath with variable throws error

edited Oct 27, 2017 11:48AM in BI Publisher (MOSC) 1 commentAnswered

This valid Xpath 2.0 expression does not work in my .rtf template:

<?sum(for $i in (1 to 10) return $i)?>

(Tested to work in Altova XMLSpy). The problem seems to be $i. When running it in the application it shows just an empty field, but the template builder validate button throws this error:

[102717_153043636][][ERROR] [Line 5710.90] Incorrect XPath: sum(for $i in (1 to 10) return $i)

I can achieve the above with sum(1 to 10), but I'm not really looking for summing up a simple sequence, it is just a small example. What I'm really trying to achieve is to calculate a number with MOD10 check digit, and I created this oneliner to build the whole thing, that relies on for loop with variable. This works in XMLSpy:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center