Altova Mailing List Archives


[xsl] Solution Needed for DB output

From: balaganesh mohan <balaganesh76@--------->
To:
Date: 4/18/2009 5:43:00 PM
Dear Team

I get the following collection as the output when querying oracle database
with complex query.

<getMatrixOutputCllection>
<outputVar>
<level_id>1<level_id>
<assignee>jcooper<assignee>
<reg>1000<reg>
<gold>2000<gold>
<sublevel>1<sublevel>
<status>approve<status>
<outputVar>

<outputVar>
<level_id>1<level_id>
<assignee>jcooper<assignee>
<reg>1000<reg>
<gold>2000<gold>
<sublevel>1<sublevel>
<status>reject<status>
<outputVar>

<outputVar>
<level_id>1<level_id>
<assignee>jcooper<assignee>
<reg>1000<reg>
<gold>2000<gold>
<sublevel>2<sublevel>
<status>pending<status>
<outputVar>


<outputVar>
<level_id>1<level_id>
<assignee>jcooper<assignee>
<reg>1000<reg>
<gold>2000<gold>
<sublevel>3<sublevel>
<status>yes<status>
<outputVar>

<outputVar>
<level_id>1<level_id>
<assignee>jcooper<assignee>
<reg>1000<reg>
<gold>2000<gold>
<sublevel>3<sublevel>
<status>no<status>
<outputVar>


<outputVar>
<level_id>2<level_id>
<assignee>jstein<assignee>
<reg>6000<reg>
<gold>4000<gold>
<sublevel>1<sublevel>
<status>go<status>
<outputVar>


<outputVar>
<level_id>2<level_id>
<assignee>jstein<assignee>
<reg>6000<reg>
<gold>4000<gold>
<sublevel>2<sublevel>
<status>proceed<status>
<outputVar>

<outputVar>
<level_id>2<level_id>
<assignee>jstein<assignee>
<reg>6000<reg>
<gold>4000<gold>
<sublevel>2<sublevel>
<status>pending<status>
<outputVar>
<getMatrixOutputCllection>

I need the output should be ordered accordingly the level_id as follows,

<----desired output as follows----->
<level_id>1<level_id>
<assignee>jcooper<assignee>
<reg>1000<reg>
<gold>2000<gold>

<sublevel>1<sublevel>
<status>approve<status>

<sublevel>2<sublevel>
<status>pending<status>

<sublevel>3<sublevel>
<status>yes<status>
<status>no<status>

<level_id>2<level_id>
<assignee>jstein<assignee>
<reg>6000<reg>
<gold>4000<gold>

<sublevel>1<sublevel>
<status>go<status>

<sublevel>2<sublevel>
<status>proceed<status>
<status>pending<status>

<--end--->

NOTE
----
The output will yield more repeat collections according to the table 
values.(i.e)<level_id>1<level_id> may contain more <sublevel> and 
more relative <status> elements.
But the values of <reg>,<gold>and<assignee>will be same for the particular <level_id>.

I am very new to xslt  and i know basics of xslt only.
I tried to achieve the above output via key() function as explained 
in your Mueneuch -2 ( grouping - thread)method. But i get the same 
output as the db output.

I use jdeveloper as designing tool and oracle soa suite 10.1.3.1.0 
as server and xslt version 1.0 ( i dont know whether xslt 2.0 is 
supported in soa server)

So kindly request you to provide solution for the above scenario.


Thanks
M.Balaganesh

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.