[xsl] xml to xml issue in XSLT2.0

Subject: [xsl] xml to xml issue in XSLT2.0
From: chun ji <cji_work@xxxxxxxxx>
Date: Mon, 19 Nov 2007 10:21:22 -0800 (PST)
Hi all, 
I was trying to convert this xml file into a new one
in XSLT 2.0, but failed. The main issue is I have to
deal with one group-by with two level of elements: tab
and sub. I could not find any way to work around with
it. Help if you can. 

1. The original xml file 
<?xml version="1.0" encoding="UTF-8"?>
<perm_testing>
   <user name="SFO">
      <tab name="YourSource">
         <sub name="Client">
            <checkpoint name="View" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="View" value="yes"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="Create" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="Edit" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="Discussion">
            <checkpoint name="View" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="Discussion">
            <checkpoint name="Create" value="yes"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="Discussion">
            <checkpoint name="Edit" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="Resume/Quote">
            <checkpoint name="View" value="no"/>
         </sub>
      </tab>
   </user>
   <user name="ABC">
      <tab name="YourSource">
         <sub name="Client">
            <checkpoint name="View" value="yes"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="View" value="yes"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="Create" value="no"/>
         </sub>
      </tab>
   </user>
</perm_testing>


2. the expected xml file 
<?xml version="1.0" encoding="UTF-8"?>
<perm_testing>
   <user name="SFO">
      <tab name="YourSource">
         <sub name="Client">
            <checkpoint name="View" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="View" value="yes"/>
            <checkpoint name="Create" value="no"/>
            <checkpoint name="Edit" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="Discussion">
            <checkpoint name="View" value="no"/>
            <checkpoint name="Create" value="yes"/>
            <checkpoint name="Edit" value="no"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="Resume/Quote">
            <checkpoint name="View" value="no"/>
         </sub>
      </tab>
   </user>
   <user name="ABC">
      <tab name="YourSource">
         <sub name="Client">
            <checkpoint name="View" value="yes"/>
         </sub>
      </tab>
      <tab name="Requisition">
         <sub name="General Info">
            <checkpoint name="View" value="yes"/>
            <checkpoint name="Create" value="no"/>
         </sub>
      </tab>
   </user>
</perm_testing>



Thanks, 



Chun 


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Current Thread