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

Help with Transformation

Subject: Help with Transformation
From: Avaneesh Ramprasad <avaneesh@xxxxxxxxxxxxxx>
Date: Mon, 29 Oct 2007 12:03:11 -0700 (PDT)
 Help with Transformation
Iam fairly new to xsl and iam stuck, i would greatly appreciate if someone
could help me out here, below are the input and output xml documents

Input
xml
<Customer>
   <CustomerAccount>
      <ResponseHeader>
<CorrelationId>1234</CorrelationId>
   </ResponseHeader>
<ResponseStatus>
         <Status>Success</Status>
      </ResponseStatus>
<CustomerSet>
         <CustomerName>Pizza Hut</CustomerName>
<Product>Product 1</Product>
         <PurchaseMonth>October
2007</PurchaseMonth>
	<AddressSet>
	  <Address>1 main st</Address>
<Address>2 river st</Address>
          <Address>3rd st</Address>
</AddressSet>
         <ZipSet>
            <Zip>199360</Zip>
<Zip>94596</Zip>
            <Zip>07974</Zip>
         </ZipSet>
</CustomerSet>
      <CustomerSet>
<CustomerName>Dominos</CustomerName>
         <Product>Product 2</Product>
<PurchaseMonth>October 2007</PurchaseMonth>
        <AddressSet>
<Address>21 Elm Road</Address>
	  <Address>55 Green St</Address>
</AddressSet>
         <ZipSet>
            <Zip>2583</Zip>
<Zip>48818</Zip>
         </ZipSet>
   </CustomerSet>
   </CustomerAccount>
<Customer>

Below should be my output after transformation
<ListOfCustomers>
<MyCustomer>
      <Id>1234</Id>
      <AccountName>Pizza Hut</AccountName>
<BillMonth>October 2007</BillMonth>
      <Product>Product 1</Product>
<Address>1 main st</Address>
      <Zip>199360</Zip>
   </MyCustomer>
<MyCustomer>
      <Id>1234</Id>
      <AccountName>Pizza Hut</AccountName>
<BillMonth>October 2007</BillMonth>
      <Product>Product 1</Product>
<Address>2 river st</Address>
      <Zip>94596</Zip>
   </MyCustomer>
<MyCustomer>
      <Id>1234</Id>
      <AccountName>Pizza Hut</AccountName>
<BillMonth>October 2007</BillMonth>
      <Product>Product 1</Product>
<Address>3rd st</Address>
      <Zip>07974</Zip>
   </MyCustomer>
<MyCustomer>
      <Id>1234</Id>
      <AccountName>Dominos</AccountName>
<BillMonth>October 2007</BillMonth>
      <Product>Product 2</Product>
<Address>21 Elm Road</Address>
      <Zip>2583</Zip>
   </MyCustomer>
<MyCustomer>
      <Id>1234</Id>
      <AccountName>Dominos</AccountName>
<BillMonth>October 2007</BillMonth>
      <Product>Product 2</Product>
<Address>55 Green St</Address>  
      <Zip>48818</Zip>
   </MyCustomer>
</ListOfCustomers>

Thank you for all your help in advance.

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-2013 All Rights Reserved.