Subject: Re: [xsl] make recursive call From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Tue, 12 Sep 2006 20:24:31 +0530 |
But I am sorry again, that I still find the problem description ambiguous. Wrong grammar is making it hard for me to understand.
I am keen to help you. But you have to help me with unambiguous requirements. I am sure, other people would help too, if the problem description is clear.
I would also request you to please explain the problem again from scratch. This thread is now few days old, so I am having some trouble recollecting the requirements.
Sorry, I am unable to provide a solution with the present problem description. You need to explain more clearly.
On 9/8/06, mary liu <maryliu99@xxxxxxxxx> wrote: Thanks Mukul! It is very helpful.
Another question is if I have exception data, like the last 2 records. I want to genterate like newxml.xml.
oldxml.xml
<ResultSet> <data_service> <Employeeprofile> <row emp_name="one" org_cd="73700" rpt_to_org_cd="11111" lev="2" /> <row emp_name="four" org_cd="73656" rpt_to_org_cd="73700" lev="3" /> <row emp_name="five" org_cd="75425" rpt_to_org_cd="73700" lev="3" /> <row emp_name="three" org_cd="73723" rpt_to_org_cd="11111" lev="2" /> <row emp_name="two" org_cd="73708" rpt_to_org_cd="11111" lev="2" /> <row emp_name="Six" org_cd="73651" rpt_to_org_cd="73708" lev="3" /> <row emp_name="Seven" org_cd="73632" rpt_to_org_cd="73651" lev="4" /> <row emp_name="Eight" org_cd="73229" rpt_to_org_cd="73651" lev="4" /> <row emp_name="nine" org_cd="74023" rpt_to_org_cd="73651" lev="4" /> <row emp_name="ten" org_cd="73989" rpt_to_org_cd="11111" lev="2" />
<row emp_name="eleven" org_cd="897750" rpt_to_org_cd="UHFH" lev="4" /> <row emp_name="twelve" org_cd="3334" rpt_to_org_cd="4456" lev="2" /> </Employeeprofile> </data_service> </ResultSet>
the newxml.xml
So the newxml.xml should be like this:
<ResultSet> <branch id="one"> <branchText>one</branchText> <leaf> <leafText>four</leafText> </leaf> <leaf> <leafText>five</leafText> </leaf> </branch>
<branch id="three"> <branchText>three</branchText> </branch>
<branch id="two"> <branchText>two</branchText> <branch id="Six"> <branchText>Six</branchText> <leaf> <leafText>Seven</leafText> </leaf> <leaf> <leafText>Eight</leafText> </leaf> <leaf> <leafText>nine</leafText> </leaf> </branch> </branch>
<branch id="ten"> <branchText>ten</branchText> </branch>
<branch id="eleven"> <branchText>eleven</branchText> </branch>
<branch id="twelve"> <branchText>twelve</branchText> </branch> </ResultSet>
why this exception happened? it is because the database returned those records, we don't know how comes, but we still want to keep those exception data in the first level, no matter what are those excetion data levels? the convert xsl you wrote, can't display those data, ( can display lev =2) The exception data have not any relationship with the root. The lev number may be 2 or 3, or maybe 4 or ..., lev=2 we can display, but the others data,Can we make it? Is it possible to write the condition call those data?
Thanks in advance.
Mary
-- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] make recursive call, mary liu | Thread | [xsl] sort question, Markus Gamperl |
RE: [xsl] Namespace and XSL Variabl, Trish | Date | Re: [xsl] @xmlns retrieving value o, Mario Madunic |
Month |