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

RE: XSL Transformation!!

Subject: RE: XSL Transformation!!
From: cknell@xxxxxxxxxx
Date: Fri, 24 Dec 2004 15:09:13 -0500
venkat
So you want to transform some nodes while passing the others through to the new document unchanged?
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Kalkunda, Venkat <Kalkunda.Venkat@xxxxxxxxxxxxx>
Sent:     Fri, 24 Dec 2004 12:43:00 -0600
To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:   XSL Transformation!!

I am working on a J2EE project. that needs some XSL transformation and I am stuck with an issue that how much ever I try am not able to resolve. Anybody with any suggestions or solutions will be greatly appreciated. 

<Risk RepeatDet="SeqNumber='1'">
                 <SeqNumber>1</SeqNumber>
                 <ExistingProductType CtlType="5" QID="1597">Disability Income</ExistingProductType>
                 <ExistingPolNumber CtlType="7" QID="1597">456464765</ExistingPolNumber>                  
                 <ExistingInsuranceAmt CtlType="7" QID="1597">8000</ExistingInsuranceAmt>
                 <ExistingInsuranceName CtlType="7" QID="1597">ING</ExistingInsuranceName>
                 <ExistingInsurancePending CtlType="10" QID="1597">Yes</ExistingInsurancePending>
                 <ExistingInsuranceEP CtlType="5" QID="1597">60 day</ExistingInsuranceEP>
                 <ExistingInsuranceInd CtlType="10" QID="1597">No</ExistingInsuranceInd>
                 <ExistingInsuranceBP CtlType="5" QID="1597">To Age 65</ExistingInsuranceBP>
                 <ReplacementType CtlType="10" QID="1597">Yes</ReplacementType>
               </Risk>
               <Risk RepeatDet="SeqNumber='2'">
                 <SeqNumber>2</SeqNumber>
                 <ExistingInsuranceInd CtlType="10" QID="1597">Yes</ExistingInsuranceInd>
                 <ExistingInsuranceAmt CtlType="7" QID="1597">9000</ExistingInsuranceAmt>
                 <ExistingInsurancePending CtlType="10" QID="1597">No</ExistingInsurancePending>
                 <ExistingInsuranceBP CtlType="5" QID="1597">To Age 67</ExistingInsuranceBP>
                 <ExistingInsuranceEP CtlType="5" QID="1597">90 day</ExistingInsuranceEP>
                 <ExistingPolNumber CtlType="7" QID="1597">48979</ExistingPolNumber>
                 <ExistingProductType CtlType="5" QID="1597">Overhead Expense</ExistingProductType>
                 <ExistingInsurancePaidBy CtlType="1" QID="1597">E</ExistingInsurancePaidBy>
                 <ExistingInsuranceName CtlType="7" QID="1597">Blue Cross Blue Shield</ExistingInsuranceName>
                 <ReplacementType CtlType="10" QID="1597">No</ReplacementType>
               </Risk>
               <Risk RepeatDet="SeqNumber='3'">
                 <SeqNumber>3</SeqNumber>
                 <ExistingInsuranceInd CtlType="10" QID="1597">No</ExistingInsuranceInd>
                 <ExistingInsuranceAmt CtlType="7" QID="1597">54354</ExistingInsuranceAmt>
                 <ExistingInsurancePending CtlType="10" QID="1597">No</ExistingInsurancePending>
                 <ExistingInsuranceBP CtlType="5" QID="1597">To Age 67</ExistingInsuranceBP>
                 <ExistingInsuranceEP CtlType="5" QID="1597">60 day</ExistingInsuranceEP>
                 <ExistingPolNumber CtlType="7" QID="1597">54545</ExistingPolNumber>
                 <ExistingProductType CtlType="5" QID="1597">Overhead Expense</ExistingProductType>
                 <ExistingInsurancePaidBy CtlType="1" QID="1597">E</ExistingInsurancePaidBy>
                 <ExistingInsuranceName CtlType="7" QID="1597">United Health Care</ExistingInsuranceName>
                 <ReplacementType CtlType="10" QID="1597">No</ReplacementType>
               </Risk>

I have a segment of the XML which i need to transform. From each <Risk> that contains the attribute <RepeatDet>
I need to pull out the other elements within the <Risk> node and transform to a format as below

<field name=ExistingInsuranceName1>
	<value>ING</value>
</field>

In this way, I have to transform all the elements within the <Risk> Node, as long as <Risk> nodes with attribute <RepeatDet> is present. There are other <Risk> nodes in the complete XML file but with out the attribute<RepeatDet>. Can somebody please help me, as to how to do this. I have used the <xsl:for-each> but it is creating different elements for all the <Risk> nodes but its putting the same values each time.

Thank You
Kalkunda Venkat
515 362 0241
x-20241




-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to Connect@xxxxxxxxxxxxx and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act ("E-Sign")
unless a specific statement to the contrary is included in this message.

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.