Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2013, 10:16 AM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

<ISA>
<ISA.01>
<ISA.01.1>00</ISA.01.1>
</ISA.01>
<ISA.02>
<ISA.02.1> </ISA.02.1>
</ISA.02>
<ISA.03>
<ISA.03.1>00</ISA.03.1>
</ISA.03>
<ISA.04>
<ISA.04.1> </ISA.04.1>
</ISA.04>
<ISA.05>
<ISA.05.1>ZZ</ISA.05.1>
</ISA.05>
<ISA.06>
<ISA.06.1>REALMED </ISA.06.1>
</ISA.06>
<ISA.07>
<ISA.07.1>ZZ</ISA.07.1>
</ISA.07>
<ISA.08>
<ISA.08.1>3855 </ISA.08.1>
</ISA.08>
<ISA.09>
<ISA.09.1>131106</ISA.09.1>
</ISA.09>
<ISA.10>
<ISA.10.1>1948</ISA.10.1>
</ISA.10>
<ISA.11>
<ISA.11.1>U</ISA.11.1>
</ISA.11>
<ISA.12>
<ISA.12.1>00401</ISA.12.1>
</ISA.12>
<ISA.13>
<ISA.13.1>000000001</ISA.13.1>
</ISA.13>
<ISA.14>
<ISA.14.1>0</ISA.14.1>
</ISA.14>
<ISA.15>
<ISA.15.1>P</ISA.15.1>
</ISA.15>
<ISA.16>
<ISA.16.1/>
<ISA.16.2/>
</ISA.16>
</ISA>
<GS>
<GS.01>
<GS.01.1>HB</GS.01.1>
</GS.01>
<GS.02>
<GS.02.1>REALMED</GS.02.1>
</GS.02>
<GS.03>
<GS.03.1>3855</GS.03.1>
</GS.03>
<GS.04>
<GS.04.1>20131106</GS.04.1>
</GS.04>
<GS.05>
<GS.05.1>19485599</GS.05.1>
</GS.05>
<GS.06>
<GS.06.1>1</GS.06.1>
</GS.06>
<GS.07>
<GS.07.1>X</GS.07.1>
</GS.07>
<GS.08>
<GS.08.1>004010X092A1</GS.08.1>
</GS.08>
</GS>
<ST>
<ST.01>
<ST.01.1>271</ST.01.1>
</ST.01>
<ST.02>
<ST.02.1>0001</ST.02.1>
</ST.02>
</ST>
<BHT>
<BHT.01>
<BHT.01.1>0022</BHT.01.1>
</BHT.01>
<BHT.02>
<BHT.02.1>11</BHT.02.1>
</BHT.02>
<BHT.03>
<BHT.03.1>1846075</BHT.03.1>
</BHT.03>
<BHT.04>
<BHT.04.1>20131106</BHT.04.1>
</BHT.04>
<BHT.05>
<BHT.05.1>194908</BHT.05.1>
</BHT.05>
</BHT>

<HL>
<HL.01>
<HL.01.1>1</HL.01.1>
</HL.01>
<HL.02/>
<HL.03>
<HL.03.1>20</HL.03.1>
</HL.03>
<HL.04>
<HL.04.1>1</HL.04.1>
</HL.04>
</HL>
<NM1>
<NM1.01>
<NM1.01.1>PR</NM1.01.1>
</NM1.01>
<NM1.02>
<NM1.02.1>2</NM1.02.1>
</NM1.02>
<NM1.03>
<NM1.03.1>UNITEDHEALTHCARE</NM1.03.1>
</NM1.03>
<NM1.04/>
<NM1.05/>
<NM1.06/>
<NM1.07/>
<NM1.08>
<NM1.08.1>PI</NM1.08.1>
</NM1.08>
<NM1.09>
<NM1.09.1>111</NM1.09.1>
</NM1.09>
</NM1>
<PER>
<PER.01>
<PER.01.1>22</PER.01.1>
</PER.01>
</PER>


<HL>
<HL.01>
<HL.01.1>2</HL.01.1>
</HL.01>
<HL.02>
<HL.02.1>1</HL.02.1>
</HL.02>
<HL.03>
<HL.03.1>21</HL.03.1>
</HL.03>
<HL.04>
<HL.04.1>1</HL.04.1>
</HL.04>
</HL>
<NM1>
<NM1.01>
<NM1.01.1>1P</NM1.01.1>
</NM1.01>
<NM1.02>
<NM1.02.1>2</NM1.02.1>
</NM1.02>
<NM1.03>
<NM1.03.1>Srinath technology</NM1.03.1>
</NM1.03>
<NM1.04/>
<NM1.05/>
<NM1.06/>
<NM1.07/>
<NM1.08>
<NM1.08.1>XX</NM1.08.1>
</NM1.08>
<NM1.09>
<NM1.09.1>444</NM1.09.1>
</NM1.09>
</NM1>

<HL>
<HL.01>
<HL.01.1>3</HL.01.1>
</HL.01>
<HL.02>
<HL.02.1>2</HL.02.1>
</HL.02>
<HL.03>
<HL.03.1>22</HL.03.1>
</HL.03>
<HL.04>
<HL.04.1>0</HL.04.1>
</HL.04>
</HL>
<NM1>
<NM1.01>
<NM1.01.1>IL</NM1.01.1>
</NM1.01>
<NM1.02>
<NM1.02.1>1</NM1.02.1>
</NM1.02>
<NM1.03>
<NM1.03.1>EEEEE</NM1.03.1>
</NM1.03>
<NM1.04>
<NM1.04.1>FFFFFFF</NM1.04.1>
</NM1.04>
<NM1.05>
<NM1.05.1>D</NM1.05.1>
</NM1.05>
<NM1.06/>
<NM1.07/>
<NM1.08>
<NM1.08.1>MI</NM1.08.1>
</NM1.08>
<NM1.09>
<NM1.09.1>44444</NM1.09.1>
</NM1.09>
</NM1>
<REF>
<REF.01>
<REF.01.1>6P</REF.01.1>
</REF.01>
<REF.02>
<REF.02.1>44444</REF.02.1>
</REF.02>
</REF>
<REF>
<REF.01>
<REF.01.1>SY</REF.01.1>
</REF.01>
<REF.02>
<REF.02.1>4444</REF.02.1>
</REF.02>
</REF>
<N3>
<N3.01>
<N3.01.1>eeeeee</N3.01.1>
</N3.01>
</N3>
<N4>
<N4.01>
<N4.01.1>CYPRESS</N4.01.1>
</N4.01>
<N4.02>
<N4.02.1>TX</N4.02.1>
</N4.02>
<N4.03>
<N4.03.1>5555</N4.03.1>
</N4.03>
</N4>
<DMG>
<DMG.01>
<DMG.01.1>D8</DMG.01.1>
</DMG.01>
<DMG.02>
<DMG.02.1>19810221</DMG.02.1>
</DMG.02>
<DMG.03>
<DMG.03.1>F</DMG.03.1>
</DMG.03>
</DMG>
<INS>
<INS.01>
<INS.01.1>Y</INS.01.1>
</INS.01>
<INS.02>
<INS.02.1>18</INS.02.1>
</INS.02>
</INS>

<EB>
<EB.01>
<EB.01.1>1</EB.01.1>
</EB.01>
<EB.02/>
<EB.03>
<EB.03.1>30</EB.03.1>
</EB.03>
<EB.04>
<EB.04.1>C1</EB.04.1>
</EB.04>
<EB.05>
<EB.05.1>xxxxx</EB.05.1>
</EB.05>
</EB>
<DTP>
<DTP.01>
<DTP.01.1>4444</DTP.01.1>
</DTP.01>
<DTP.02>
<DTP.02.1>D8</DTP.02.1>
</DTP.02>
<DTP.03>
<DTP.03.1>20130101</DTP.03.1>
</DTP.03>
</DTP>
<MSG>
<MSG.01>
<MSG.01.1>sadfasdfasdfsadfsadf.</MSG.01.1>
</MSG.01>
</MSG>
<LS>
<LS.01>
<LS.01.1>2120</LS.01.1>
</LS.01>
</LS>
<NM1>
<NM1.01>
<NM1.01.1>PR</NM1.01.1>
</NM1.01>
<NM1.02>
<NM1.02.1>2</NM1.02.1>
</NM1.02>
<NM1.03>
<NM1.03.1>4444444regsdfgsdfgsdg</NM1.03.1>
</NM1.03>
<NM1.04/>
<NM1.05/>
<NM1.06/>
<NM1.07/>
<NM1.08>
<NM1.08.1>PI</NM1.08.1>
</NM1.08>
<NM1.09>
<NM1.09.1>87726</NM1.09.1>
</NM1.09>
</NM1>
<N3>
<N3.01>
<N3.01.1>P.O. BOX 30555</N3.01.1>
</N3.01>
</N3>
<N4>
<N4.01>
<N4.01.1>wertwwretwretCITY</N4.01.1>
</N4.01>
<N4.02>
<N4.02.1>UT</N4.02.1>
</N4.02>
<N4.03>
<N4.03.1>rwettwretwret</N4.03.1>
</N4.03>
</N4>
<PER>
<PER.01>
<PER.01.1>IC</PER.01.1>
</PER.01>
</PER>
<LE>
<LE.01>
<LE.01.1>2120</LE.01.1>
</LE.01>
</LE>

<EB>
<EB.01>
<EB.01.1>F</EB.01.1>
</EB.01>
<EB.02>
<EB.02.1>IND</EB.02.1>
</EB.02>
<EB.03>
<EB.03.1>98</EB.03.1>
</EB.03>
<EB.04/>
<EB.05/>
<EB.06/>
<EB.07>
<EB.07.1>0.0</EB.07.1>
</EB.07>
</EB>
<MSG>
<MSG.01>
<MSG.01.1>asdfasdfasd</MSG.01.1>
</MSG.01>
</MSG>
<EB>
<EB.01>
<EB.01.1>X</EB.01.1>
</EB.01>
</EB>
<LS>
<LS.01>
<LS.01.1>2120</LS.01.1>
</LS.01>
</LS>
<NM1>
<NM1.01>
<NM1.01.1>1P</NM1.01.1>
</NM1.01>
<NM1.02>
<NM1.02.1>2</NM1.02.1>
</NM1.02>
<NM1.03>
<NM1.03.1>sadfasdfafasdf</NM1.03.1>
</NM1.03>
<NM1.04/>
<NM1.05/>
<NM1.06/>
<NM1.07/>
<NM1.08>
<NM1.08.1>XX</NM1.08.1>
</NM1.08>
<NM1.09>
<NM1.09.1>44444</NM1.09.1>
</NM1.09>
</NM1>
<LE>
<LE.01>
<LE.01.1>2120</LE.01.1>
</LE.01>
</LE>
<HL>
<HL.01>
<HL.01.1>3</HL.01.1>
</HL.01>
<HL.02>
<HL.02.1>2</HL.02.1>
</HL.02>
<HL.03>
<HL.03.1>22</HL.03.1>
</HL.03>
<HL.04>
<HL.04.1>0</HL.04.1>
</HL.04>
</HL>
<SE>
<SE.01>
<SE.01.1>108</SE.01.1>
</SE.01>
<SE.02>
<SE.02.1>0001</SE.02.1>
</SE.02>
</SE>
<GE>
<GE.01>
<GE.01.1>1</GE.01.1>
</GE.01>
<GE.02>
<GE.02.1>1</GE.02.1>
</GE.02>
</GE>
<IEA>
<IEA.01>
<IEA.01.1>1</IEA.01.1>
</IEA.01>
<IEA.02>
<IEA.02.1>000000001</IEA.02.1>
</IEA.02>
</IEA>

Last edited by srinathe; November 26th, 2013 at 10:20 AM..
 
Old November 26th, 2013, 11:15 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I see no question, just a ridiculously large amount of data.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
  Spam!  
Old November 26th, 2013, 11:55 AM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

XSLT Grouping. Group NODEs from First HL TO Second HL payer , second HL to third HL provder, third HL to 4th HL sucbcriber 4th HL to 5th HL dependant.

After grouping nodes from Frist HL to second HL I have to put the data in my own xml format elements between <source> => <address> few elements and <source>=><name> Elements elitem like below . Is it possible



<EligibilityResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Identifier>217</Identifier>
<Source>
<Aaddress>
<HierarchicalID>Ad1</HierarchicalID>
<Line1>Line1Sri</Line1>
<Line2>Line2Sri</Line2>
<City>CitySri</City>
<State>StateSri</State>
<ZipCode>ZipCodeSri</ZipCode>
</Aaddress>
<Name>
<EntityIdentifierCode>EntityIdentifierCode</EntityIdentifierCode>
<Name>ZipCodeSri</Name>
<FirstName>FirstName</FirstName>
<LastName>LastName</LastName>
<MiddleName>MiddleName</MiddleName>
<Prefix>Prefix</Prefix>
<Suffix>Suffix</Suffix>
<IdentificationCodeQualifier>IdentificationCodeQua lifier</IdentificationCodeQualifier>
<Identification>Identification</Identification>
</Name>
<Phone>
<ContactFunctionCode>ContactFunctionCode</ContactFunctionCode>
<Name>Name</Name>
<CommunicationCodeQualifier>CommunicationCodeQuali fier</CommunicationCodeQualifier>
<Phone>Phone</Phone>
<CommunicationExt>CommunicationExt</CommunicationExt>
<EmailAddress>EmailAddress</EmailAddress>
</Phone>
</Source>
<Payer>
<Aaddress>
<HierarchicalID>Ad1</HierarchicalID>
<Line1>Line1Sri</Line1>
<Line2>Line2Sri</Line2>
<City>CitySri</City>
<State>StateSri</State>
<ZipCode>ZipCodeSri</ZipCode>
</Aaddress>
<Name>
<EntityIdentifierCode>EntityIdentifierCode</EntityIdentifierCode>
<Name>ZipCodeSri</Name>
<FirstName>FirstName</FirstName>
<LastName>LastName</LastName>
<MiddleName>MiddleName</MiddleName>
<Prefix>Prefix</Prefix>
<Suffix>Suffix</Suffix>
<IdentificationCodeQualifier>IdentificationCodeQua lifier</IdentificationCodeQualifier>
<Identification>Identification</Identification>
</Name>
<Phone>
<ContactFunctionCode>ContactFunctionCode</ContactFunctionCode>
<Name>Name</Name>
<CommunicationCodeQualifier>CommunicationCodeQuali fier</CommunicationCodeQualifier>
<Phone>Phone</Phone>
<CommunicationExt>CommunicationExt</CommunicationExt>
<EmailAddress>EmailAddress</EmailAddress>
</Phone>
</Payer>
<Subscriber>
<Aaddress />
<Name />
<Phone />
<BenefitInfos>
<BenefitInfo>
<StartDate>0001-01-01T00:00:00</StartDate>
<ToDate>0001-01-01T00:00:00</ToDate>
<BenefitInformationCode>BenefitInformationCode</BenefitInformationCode>
<CoverageLevelcode>CoverageLevelcode</CoverageLevelcode>
<ServiceTypeCode>ServiceTypeCode</ServiceTypeCode>
<InsuranceTypeCode>InsuranceTypeCode</InsuranceTypeCode>
<PlanCoverageDescription>PlanCoverageDescription </PlanCoverageDescription>
<TimePeriodQualifier>TimePeriodQualifier</TimePeriodQualifier>
<MonetaryAmount>MonetaryAmount</MonetaryAmount>
<PercentageAsDecimal>PercentageAsDecimal</PercentageAsDecimal>
<QuantityQualifier>QuantityQualifier</QuantityQualifier>
<Quantity>Quantity</Quantity>
<PerPlanProvisions>PerPlanProvisions</PerPlanProvisions>
<InPlanNetWork>InPlanNetWork</InPlanNetWork>
<CompositeMedicalProcedure>CompositeMedicalProcedu re</CompositeMedicalProcedure>
<ProductServiceIDQualifier>ProductServiceIDQualifi er</ProductServiceIDQualifier>
<DateTimeProcessings>
<DateTimePeriod>
<DateTimeQualifier>DateTimeQualifier</DateTimeQualifier>
<DateTimePeriodformat>DateTimePeriodformat</DateTimePeriodformat>
<StartDate>2013-11-20T18:36:54.6450203-06:00</StartDate>
<ToDate>2013-11-20T18:36:54.6460204-06:00</ToDate>
</DateTimePeriod>
</DateTimeProcessings>
</BenefitInfo>
<BenefitInfo>
<StartDate>0001-01-01T00:00:00</StartDate>
<ToDate>0001-01-01T00:00:00</ToDate>
<BenefitInformationCode>BenefitInformationCode1</BenefitInformationCode>
<CoverageLevelcode>CoverageLevelcode1</CoverageLevelcode>
<ServiceTypeCode>ServiceTypeCode1</ServiceTypeCode>
<InsuranceTypeCode>InsuranceTypeCode1</InsuranceTypeCode>
<PlanCoverageDescription>PlanCoverageDescription 1</PlanCoverageDescription>
<TimePeriodQualifier>TimePeriodQualifier1</TimePeriodQualifier>
<MonetaryAmount>MonetaryAmount1</MonetaryAmount>
<PercentageAsDecimal>PercentageAsDecimal1</PercentageAsDecimal>
<QuantityQualifier>QuantityQualifier1</QuantityQualifier>
<Quantity>Quantity1</Quantity>
<PerPlanProvisions>PerPlanProvisions1</PerPlanProvisions>
<InPlanNetWork>InPlanNetWork1</InPlanNetWork>
<CompositeMedicalProcedure>CompositeMedicalProcedu re1</CompositeMedicalProcedure>
<ProductServiceIDQualifier>ProductServiceIDQualifi er1</ProductServiceIDQualifier>
<DateTimeProcessings>
<DateTimePeriod>
<DateTimeQualifier>DateTimeQualifier</DateTimeQualifier>
<DateTimePeriodformat>DateTimePeriodformat</DateTimePeriodformat>
<StartDate>2013-11-20T18:36:54.6450203-06:00</StartDate>
<ToDate>2013-11-20T18:36:54.6460204-06:00</ToDate>
</DateTimePeriod>
</DateTimeProcessings>
</BenefitInfo>
</BenefitInfos>
</Subscriber>
<Dependent>
<Aaddress />
<Name />
<Phone />
<BenefitInfos />
</Dependent>
</EligibilityResponse>

Last edited by srinathe; November 26th, 2013 at 12:01 PM..
 
Old November 26th, 2013, 12:34 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You still haven't asked a question.

Try reducing the problem to a small input file and the required output, explaining how they relate. Also, grouping problems are tackled very differently in XSLT 1.0 and 2.0 so you need to say which you are using.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old November 26th, 2013, 02:55 PM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default Posted sample data and the output required, is it possible throug XSLT

I have data which will come in nodes like below
<X12Transaction>(Root)
<ISA>
<GS>
<ST>
<BHT>
<HL>
<NM1>
<PER>
<HL>
<NM1>


<HL>
REF>
<N3>
<N4>
<EB>
<EB>
<DTP>
<LS>
NM1
<NM3>

<LE>

<HL>
REF>
<N3>
<N4>
<EB>
<EB>
<DTP>

</X12Transaction>(Root)


I have to build my company standard xml

From the data above between first two <HL>s extract this

<source>
<address>
<Line1> Value extract from <NM3> <NM3.01> <NM3.01.1> value <NM3> <NM3.01> <NM3.01.1> </Line1>
<Line2> Value extract from <NM4> <NM4.01> <NM4.01.1> value <NM4> <NM4.01> <NM4.01.1> </Line2>
<City> CitySri</City>
<State> State </State>
<ZipCode> ZipCodeSri </ZipCode>
</address>

<Name>
<EntityIdentifierCode> Value extract from <NM1> <NM1.01> <NM1.01.1> value <NM1> <NM1.01> <NM1.01.1> /EntityIdentifierCode>
<Name> Value extract from <NM2> <NM2.01> <NM2.01.1> value <NM2> <NM2.01> <NM2.01.1> </Name>
<FirstName> Value extract from FirstName </FirstName>
<LastName> Value extract from LastName </LastName>
<MiddleName> Value extract from MiddleName </MiddleName>
<Prefix> Value extract from Prefix </Prefix>
<Suffix> Value extract fromSuffix </Suffix>
<IdentificationCodeQualifier> Value extract IdentificationCodeQualifier </IdentificationCodeQualifier>
<Identification>Identification </Identification>
</Name>
<phone>


</phone>
<source>


From the data above between second and third <HL>s extract this


<Payer>
<address>
<Line1> Value extract from <NM3> <NM3.01> <NM3.01.1> value <NM3> <NM3.01> <NM3.01.1> </Line1>
<Line2> Value extract from <NM4> <NM4.01> <NM4.01.1> value <NM4> <NM4.01> <NM4.01.1> </Line2>
<City> CitySri</City>
<State> State </State>
<ZipCode> ZipCodeSri </ZipCode>
</address>

<Name>
<EntityIdentifierCode> Value extract from <NM1> <NM1.01> <NM1.01.1> value <NM1> <NM1.01> <NM1.01.1> /EntityIdentifierCode>
<Name> Value extract from <NM2> <NM2.01> <NM2.01.1> value <NM2> <NM2.01> <NM2.01.1> </Name>
<FirstName> Value extract from FirstName </FirstName>
<LastName> Value extract from LastName </LastName>
<MiddleName> Value extract from MiddleName </MiddleName>
<Prefix> Value extract from Prefix </Prefix>
<Suffix> Value extract fromSuffix </Suffix>
<IdentificationCodeQualifier> Value extract IdentificationCodeQualifier </IdentificationCodeQualifier>
<Identification>Identification </Identification>
</Name>
<phone>
..
...


</phone>
</Payer>



From the data above between Third and Fourth <HL>s extract this


<subscriber>
<address>
<Line1> Value extract from <NM3> <NM3.01> <NM3.01.1> value <NM3> <NM3.01> <NM3.01.1> </Line1>
<Line2> Value extract from <NM4> <NM4.01> <NM4.01.1> value <NM4> <NM4.01> <NM4.01.1> </Line2>
<City> CitySri</City>
<State> State </State>
<ZipCode> ZipCodeSri </ZipCode>
</address>

<Name>
<EntityIdentifierCode> Value extract from <NM1> <NM1.01> <NM1.01.1> value <NM1> <NM1.01> <NM1.01.1> /EntityIdentifierCode>
<Name> Value extract from <NM2> <NM2.01> <NM2.01.1> value <NM2> <NM2.01> <NM2.01.1> </Name>
<FirstName> Value extract from FirstName </FirstName>
<LastName> Value extract from LastName </LastName>
<MiddleName> Value extract from MiddleName </MiddleName>
<Prefix> Value extract from Prefix </Prefix>
<Suffix> Value extract fromSuffix </Suffix>
<IdentificationCodeQualifier> Value extract IdentificationCodeQualifier </IdentificationCodeQualifier>
<Identification>Identification </Identification>
</Name>
<phone>


..
...


</phone>
If EB nodes are there between 3 and 4 HL nodes then copy the values from EB node and and put all the EB between <BenifitInfos>

<BenifitInfos>

<BenitInfo>
<StartDate>Value extract from <EB.01><EB.01.1> 1 </EB.01.1></EB.01></StartDate>
<ToDate> Value extract from <EB.02><EB.02.1> 1 </EB.02.1></EB.02> </ToDate>
<BenefitInformationCode> Value extract from <EB.03><EB.03.1> 1 </EB.03.1></EB.03> </BenefitInformationCode>
<CoverageLevelcode> Value extract from <EB.03><EB.04.1> 1 </EB.04.1></EB.04> </CoverageLevelcode>
<ServiceTypeCode> .... </ServiceTypeCode>
<InsuranceTypeCode> </InsuranceTypeCode>
<PlanCoverageDescription> ..... </PlanCoverageDescription>
<TimePeriodQualifier> ...... r</TimePeriodQualifier>
<MonetaryAmount> ..... </MonetaryAmount>
<PercentageAsDecimal> ..... </PercentageAsDecimal>
<QuantityQualifier> ..... </QuantityQualifier>
<Quantity> .... </Quantity>
<PerPlanProvisions> ... </PerPlanProvisions>
<InPlanNetWork> </InPlanNetWork>
<CompositeMedicalProcedure>... </CompositeMedicalProcedure>
<ProductServiceIDQualifier> ... </ProductServiceIDQualifier>


If EB node followed by DTP node is the between 3 and 4 HL nodes then

<DateTimeProcessings>
<DateTimePeriod>
<DateTimeQualifier><DTP.01> Value extract from <DTP.01.1> 1 </DTP.01.1></DTP.01></DateTimeQualifier>
<DateTimePeriodformat> Value extract from <DTP.02.1> 1 </DTP.02.1></DTP.01></DateTimePeriodformat>
<StartDate> .... </StartDate>
<ToDate> .........</ToDate>
</DateTimePeriod>
</DateTimeProcessings>
</BenefitInfo>



</BenitInfo>

</BenifitInfos>


</subscriber


Actually the source XML lot of other nodes which I didnt mention, I want to extract the from above input nodes
 
Old November 27th, 2013, 10:19 AM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mhkay View Post
You still haven't asked a question.

Try reducing the problem to a small input file and the required output, explaining how they relate. Also, grouping problems are tackled very differently in XSLT 1.0 and 2.0 so you need to say which you are using.


I posted sample input data and output format which I required, is it possible in XSLT
 
Old November 27th, 2013, 01:39 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

This conversation really isn't going very well. I ask you whether you want an XSLT 1.0 or 2.0 solution, and you ignore me.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old November 27th, 2013, 01:56 PM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Sorry for that,

frankly speaking I am new to XSLT, which version I should use I am not sure, but I am calling from visual studio 2012. I am ok with ver 2 also.

My main query is it possible to do this with XSLT.
 
Old November 27th, 2013, 02:09 PM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mhkay View Post
This conversation really isn't going very well. I ask you whether you want an XSLT 1.0 or 2.0 solution, and you ignore me.
I am in do or die situation. This is my first task in XSLT I dont have any idea how to proceed, could you please guide me on this. I am trying from one week but no able proceed further.
 
Old November 27th, 2013, 06:43 PM
Registered User
 
Join Date: Nov 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mhkay View Post
This conversation really isn't going very well. I ask you whether you want an XSLT 1.0 or 2.0 solution, and you ignore me.
Sorry,

Now I am understading little bit, when I tried for-each-group visual studio is not supporting it. I require in XSLT 1.0





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to organize(group) nodes under a closed element - XSLT Milkncookiez XSLT 0 May 20th, 2013 06:56 AM
bunches of nodes, how to group them to different group using the business rules JohnKiller XSLT 9 March 7th, 2012 02:42 PM
Grouping nodes by names bonekrusher XSLT 3 July 14th, 2010 09:01 AM
grouping by nodes questions bonekrusher XSLT 4 July 13th, 2010 10:58 AM
Grouping Nodes shoei78 XSLT 3 May 28th, 2004 10:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.