X

An Oracle blog about BI Publisher

  • July 11, 2007

So many ROWS but which one to pick

Good question from Carl on the forum today



http://forums.oracle.com/forums/thread.jspa?threadID=529700&tstart=0



The answer is simple when you look at it but earlier versions of the template builder for word drop you into a world of trouble that its difficult to work out when you first start out with templates and XSL. Carl has a standalone report that has 3 queries, he's not using data templates but the simple concatenation option so he gets XML like:



<ROOT>
<XML1>
<ROW> ... </ROW>
...
</XML1>
<XML2>
<ROW> ... </ROW>
...
</XML2>
<XML3>
<ROW> ... </ROW>
...
</XML3>
</ROOT>


Using the template builder he built a table that would render the ROW info in query 2 and group it by a sub element.



<?for-each-group:ROW;./ASSIGNED_ON_1?>



All looks OK, right?



He got some unexpected results thou ...



ROWS.JPG:



Wheres that extra table come from? Those of you with some XPATH knowledge will have worked out that just using ROW is too ambiguous for the XSLT engine and thats why you get that extra table. It considers all instances of ROW.
If you are using the template builder then yoiu would hope it would know that you wanted that second data set and not the first. Until recently that was a bug, gap, enhancement request ... call it what you will. Im happy to say that the latest version has a checkbox for your grouping criteria to use an 'Absolute Path' - DATA/New_Responsibilites/ROW



ROWS2.JPG:



or not thus removing any ambiguity and the builder behaving as you might expect or hope.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.