[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xml to xml issue in XSLT2.0

Subject: xml to xml issue in XSLT2.0
From: chun ji <cji_work@xxxxxxxxx>
Date: Mon, 19 Nov 2007 10:21:22 -0800 (PST)
 xml to xml issue in XSLT2.0
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.