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 April 29th, 2009, 12:39 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I have given all xmls in this thread but they are just not showing here....What to do..
They are actually very long but time is short :(

is there any place to attach files here??

My input xml



<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05" MaxResponses="50" PrimaryLangID="en" RateRangeOnly="true" SummaryOnly="false" Target="avail" TransactionIdentifier="avail" Version="1">
<POS>
<Source ISOCurrency="INR" PseudoCityCode="PCC" TerminalID="1">
<RequestorID ID="RR"/>
</Source>
<Requests>
<Request AffiliateID="1A" />
</Requests>
</POS>
</OTA_HotelAvailRQ>
<ns1:OTA_HotelAvailRS Version="2.001" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<ns1:RoomStays>
<ns1:RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates>

<ns1:RoomRate ArtificialAllocation="0" MealPlanCode="6" NumberOfGuests="1" NumberOfUnits="1" OnRequest="false" RatePlanCode="CP" RoomRPH="1" RoomTypeCode="DLX">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="2"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="2"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="2"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="3210.0" AmountBeforeTax="3210.0" AmountBeforeYatraMarkup="3000.0" BuyingAmount="3000.0" CashBackAmount="1284.0" CashBackType="P-40" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="3210.0" AmountBeforeTax="3210.0" AmountBeforeYatraMarkup="3000.0" BuyingAmount="3000.0" CashBackAmount="1284.0" CashBackType="P-40" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="1070.0" AmountBeforeTax="1070.0" AmountBeforeYatraMarkup="1000.0" BuyingAmount="1000.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="CP" SeasonRPH="2" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1070.0" AmountBeforeTax="1070.0" AmountBeforeYatraMarkup="1000.0" BuyingAmount="1000.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="CP" SeasonRPH="2" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1070.0" AmountBeforeTax="1070.0" AmountBeforeYatraMarkup="1000.0" BuyingAmount="1000.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="CP" SeasonRPH="2" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="0" MealPlanCode="6" NumberOfGuests="2" NumberOfUnits="1" OnRequest="false" RatePlanCode="CP" RoomRPH="2" RoomTypeCode="DLX">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="2"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="2"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="2"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="5136.0" AmountBeforeTax="5136.0" AmountBeforeYatraMarkup="4800.0" BuyingAmount="4800.0" CashBackAmount="2054.4" CashBackType="P-40" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="5136.0" AmountBeforeTax="5136.0" AmountBeforeYatraMarkup="4800.0" BuyingAmount="4800.0" CashBackAmount="2054.4" CashBackType="P-40" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="1712.0" AmountBeforeTax="1712.0" AmountBeforeYatraMarkup="1600.0" BuyingAmount="1600.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="CP" SeasonRPH="2" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1712.0" AmountBeforeTax="1712.0" AmountBeforeYatraMarkup="1600.0" BuyingAmount="1600.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="CP" SeasonRPH="2" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1712.0" AmountBeforeTax="1712.0" AmountBeforeYatraMarkup="1600.0" BuyingAmount="1600.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="CP" SeasonRPH="2" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
</ns1:RoomRates>
</ns1:RoomStay>
<ns1:RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="1" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="1" RoomTypeCode="SUT">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="6420.0" AmountBeforeTax="6420.0" AmountBeforeYatraMarkup="6000.0" BuyingAmount="6000.0" CashBackAmount="642.0" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="6420.0" AmountBeforeTax="6420.0" AmountBeforeYatraMarkup="6000.0" BuyingAmount="6000.0" CashBackAmount="642.0" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="2140.0" AmountBeforeTax="2140.0" AmountBeforeYatraMarkup="2000.0" BuyingAmount="2000.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="2140.0" AmountBeforeTax="2140.0" AmountBeforeYatraMarkup="2000.0" BuyingAmount="2000.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="2140.0" AmountBeforeTax="2140.0" AmountBeforeYatraMarkup="2000.0" BuyingAmount="2000.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="1" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="1" RoomTypeCode="SDLX">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="4622.4" AmountBeforeTax="4622.4" AmountBeforeYatraMarkup="4320.0" BuyingAmount="4320.0" CashBackAmount="462.24" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="4622.4" AmountBeforeTax="4622.4" AmountBeforeYatraMarkup="4320.0" BuyingAmount="4320.0" CashBackAmount="462.24" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="1540.8" AmountBeforeTax="1540.8" AmountBeforeYatraMarkup="1440.0" BuyingAmount="1440.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1540.8" AmountBeforeTax="1540.8" AmountBeforeYatraMarkup="1440.0" BuyingAmount="1440.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1540.8" AmountBeforeTax="1540.8" AmountBeforeYatraMarkup="1440.0" BuyingAmount="1440.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="2" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="2" RoomTypeCode="SUT">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="6420.0" AmountBeforeTax="6420.0" AmountBeforeYatraMarkup="6000.0" BuyingAmount="6000.0" CashBackAmount="642.0" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="6420.0" AmountBeforeTax="6420.0" AmountBeforeYatraMarkup="6000.0" BuyingAmount="6000.0" CashBackAmount="642.0" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="2140.0" AmountBeforeTax="2140.0" AmountBeforeYatraMarkup="2000.0" BuyingAmount="2000.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="2140.0" AmountBeforeTax="2140.0" AmountBeforeYatraMarkup="2000.0" BuyingAmount="2000.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="2140.0" AmountBeforeTax="2140.0" AmountBeforeYatraMarkup="2000.0" BuyingAmount="2000.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="2" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="2" RoomTypeCode="SDLX">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="4"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="4622.4" AmountBeforeTax="4622.4" AmountBeforeYatraMarkup="4320.0" BuyingAmount="4320.0" CashBackAmount="462.24" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="4622.4" AmountBeforeTax="4622.4" AmountBeforeYatraMarkup="4320.0" BuyingAmount="4320.0" CashBackAmount="462.24" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="1540.8" AmountBeforeTax="1540.8" AmountBeforeYatraMarkup="1440.0" BuyingAmount="1440.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1540.8" AmountBeforeTax="1540.8" AmountBeforeYatraMarkup="1440.0" BuyingAmount="1440.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1540.8" AmountBeforeTax="1540.8" AmountBeforeYatraMarkup="1440.0" BuyingAmount="1440.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="4" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
</ns1:RoomRates>
</ns1:RoomStay>
<ns1:RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="1" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="1" RoomTypeCode="RFS">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="9309.0" AmountBeforeTax="9309.0" AmountBeforeYatraMarkup="8700.0" BuyingAmount="8700.0" CashBackAmount="930.9" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="9309.0" AmountBeforeTax="9309.0" AmountBeforeYatraMarkup="8700.0" BuyingAmount="8700.0" CashBackAmount="930.9" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="3103.0" AmountBeforeTax="3103.0" AmountBeforeYatraMarkup="2900.0" BuyingAmount="2900.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="3103.0" AmountBeforeTax="3103.0" AmountBeforeYatraMarkup="2900.0" BuyingAmount="2900.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="3103.0" AmountBeforeTax="3103.0" AmountBeforeYatraMarkup="2900.0" BuyingAmount="2900.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="0" MealPlanCode="14" NumberOfGuests="1" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="1" RoomTypeCode="SDLX">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="3370.5" AmountBeforeTax="3370.5" AmountBeforeYatraMarkup="3150.0" BuyingAmount="3150.0" CashBackAmount="337.05" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="3370.5" AmountBeforeTax="3370.5" AmountBeforeYatraMarkup="3150.0" BuyingAmount="3150.0" CashBackAmount="337.05" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="1123.5" AmountBeforeTax="1123.5" AmountBeforeYatraMarkup="1050.0" BuyingAmount="1050.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1123.5" AmountBeforeTax="1123.5" AmountBeforeYatraMarkup="1050.0" BuyingAmount="1050.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1123.5" AmountBeforeTax="1123.5" AmountBeforeYatraMarkup="1050.0" BuyingAmount="1050.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="2" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="2" RoomTypeCode="RFS">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="10272.0" AmountBeforeTax="10272.0" AmountBeforeYatraMarkup="9600.0" BuyingAmount="9600.0" CashBackAmount="1027.2" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="10272.0" AmountBeforeTax="10272.0" AmountBeforeYatraMarkup="9600.0" BuyingAmount="9600.0" CashBackAmount="1027.2" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="3424.0" AmountBeforeTax="3424.0" AmountBeforeYatraMarkup="3200.0" BuyingAmount="3200.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="3424.0" AmountBeforeTax="3424.0" AmountBeforeYatraMarkup="3200.0" BuyingAmount="3200.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="3424.0" AmountBeforeTax="3424.0" AmountBeforeYatraMarkup="3200.0" BuyingAmount="3200.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
<ns1:RoomRate ArtificialAllocation="1" MealPlanCode="14" NumberOfGuests="2" NumberOfUnits="1" OnRequest="false" RatePlanCode="EP" RoomRPH="2" RoomTypeCode="SDLX">
<ns1:Rates>
<ns1:Rate>
<ns1:Markups>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
<ns1:Markup Amount="7" Code="P" SeasonRPH="6"/>
</ns1:Markups>
<ns1:Base AmountAfterTax="4333.5" AmountBeforeTax="4333.5" AmountBeforeYatraMarkup="4050.0" BuyingAmount="4050.0" CashBackAmount="433.35" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Total AmountAfterTax="4333.5" AmountBeforeTax="4333.5" AmountBeforeYatraMarkup="4050.0" BuyingAmount="4050.0" CashBackAmount="433.35" CashBackType="P-10" CurrencyCode="INR"/>
<ns1:Taxes>
<ns1:Tax Amount="0" ApplyOrder="1" Code="TP" PayableLocally="false" Percent="0" Type="1"/>
</ns1:Taxes>
<ns1:NightlyRates>
<ns1:NightlyRate AmountAfterTax="1444.5" AmountBeforeTax="1444.5" AmountBeforeYatraMarkup="1350.0" BuyingAmount="1350.0" CurrencyCode="INR" NightNumber="1" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1444.5" AmountBeforeTax="1444.5" AmountBeforeYatraMarkup="1350.0" BuyingAmount="1350.0" CurrencyCode="INR" NightNumber="2" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
<ns1:NightlyRate AmountAfterTax="1444.5" AmountBeforeTax="1444.5" AmountBeforeYatraMarkup="1350.0" BuyingAmount="1350.0" CurrencyCode="INR" NightNumber="3" RatePlanCode="EP" SeasonRPH="6" TaxAmount="0.0"/>
</ns1:NightlyRates>
<ns1:AdditionalCharges>
<ns1:AdditionalCharge RoomAmenityCode="162">
<ns1:Amount AmountAfterTax="0.0" AmountBeforeTax="0.0"/>
</ns1:AdditionalCharge>
</ns1:AdditionalCharges>
</ns1:Rate>
</ns1:Rates>
</ns1:RoomRate>
</ns1:RoomRates>
</ns1:RoomStay>
</ns1:RoomStays>
</ns1:OTA_HotelAvailRS>
</soapenv:Body>
</soapenv:Envelope>

Last edited by maryj; April 29th, 2009 at 01:30 AM..
 
Old April 29th, 2009, 03:30 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Response that I am currently getting:


<?xml version="1.0"?>
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05">
<RoomStays>
<RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="CP" ArtificialAllocation="0" MealPlanCode="6" RoomTypeCode="DLX">
</RoomRate>
</ns1:RoomRates>
</RoomStay>

<RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="SUT">
</RoomRate>
<RoomRate NumberOfUnits="4" NumberOfGuests="6" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="SDLX">
</RoomRate>
</ns1:RoomRates>
</RoomStay>

<RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="RFS">
</RoomRate>
</ns1:RoomRates>
</RoomStay>
</RoomStays>
</OTA_HotelAvailRS>
 
Old April 29th, 2009, 03:32 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Response that I want:


<?xml version="1.0"?>
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05">
<RoomStays>
<RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="CP" ArtificialAllocation="0" MealPlanCode="6" RoomTypeCode="DLX">
</RoomRate>
</ns1:RoomRates>
</RoomStay>

<RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="SUT">
</RoomRate>
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="SDLX">
</RoomRate>
</ns1:RoomRates>
</RoomStay>

<RoomStay SupplierSystem="XHOTEL">
<ns1:RoomRates xmlns:ns1="http://www.opentravel.org/OTA/2003/05">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="RFS">
<RoomRate NumberOfUnits="2" NumberOfGuests="3" RoomRPH="1" OnRequest="false" RatePlanCode="EP" ArtificialAllocation="1" MealPlanCode="14" RoomTypeCode="SDLX">
</RoomRate>
</ns1:RoomRates>
</RoomStay>
</RoomStays>
</OTA_HotelAvailRS>


********I have given main nodes in response, all others are already working********
 
Old April 29th, 2009, 06:10 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Martin,

You are seeing this na...

Please let me know if you need any other file also.

Thanks,
Mary
 
Old April 29th, 2009, 06:47 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Thumbs up

It seems that earlier you did not post the original input xml. Now atleast post the original xslt code you use. Let that help anyone to get the needed output.
__________________
Rummy
 
Old April 29th, 2009, 07:21 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Use the code tags (the # icon on the editor toolbar) to post the XSLT.
__________________
Joe
http://joe.fawcett.name/
 
Old April 29th, 2009, 07:34 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

i have tried many a times but it doesn't allow me to submit. Always redirects to a page that says " Thanks for posting. Moderators need to approve"

"
Thank you for posting! Your post will not be visible until a moderator has approved it for posting. You will now be taken back to the forum. If you opted to post a poll, you will now be allowed to do so.
Please DO NOT repost the same message! If you message is not spam, it will be approved soon.

Click here if your browser does not automatically redirect you.


"


Please guide how can I submit the xslt code. I have tried at least 10 times

Last edited by maryj; April 29th, 2009 at 07:39 AM..
 
Old April 29th, 2009, 07:53 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml"/>

<xsl:template match="/">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<OTA_HotelAvailRS>
<xsl:apply-templates select="//ota:OTA_HotelAvailRS/ota:RoomStays" mode="hotelAvail">
<xsl:with-param name="AffiliateID" select="//ota:OTA_HotelAvailRQ/ota:POS/ota:YatraRequests/ota:YatraRequest/@AffiliateID"/>
</xsl:apply-templates>
</OTA_HotelAvailRS>
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>

<xsl:template mode="hotelAvail" match="//ota:OTA_HotelAvailRS/ota:RoomStays">
<xsl:param name="AffiliateID"/>
<RoomStays>
<xsl:for-each select="ota:RoomStay">
<RoomStay SupplierSystem="XHOTEL">
<xsl:choose>
<xsl:when test="$AffiliateID = '1A'">
<xsl:copy-of select="*[local-name() != 'RoomRates']"/>
<xsl:apply-templates mode="roomRates" select="ota:RoomRates"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="*"/>
</xsl:otherwise>
</xsl:choose>
</RoomStay>
</xsl:for-each>
</RoomStays>
</xsl:template>

<xsl:key name="k1" match="ota:RoomRates/ota:RoomRate[not(@RatePlanCode = 'RACK')]" use="concat(@RatePlanCode, '|', @RoomTypeCode)"/>

<xsl:template match="ota:RoomRates" mode="roomRates">
<xsl:copy>
<xsl:for-each select="ota:RoomRate[generate-id() = generate-id(key('k1', concat(@RatePlanCode, '|', @RoomTypeCode))[1])]">
<xsl:variable name="current-group" select="key('k1', concat(@RatePlanCode, '|', @RoomTypeCode))"/>
<RoomRate NumberOfGuests="{sum($current-group/@NumberOfGuests)}" NumberOfUnits="{sum($current-group/@NumberOfUnits)}" RatePlanCode="{@RatePlanCode}" RoomTypeCode="{@RoomTypeCode}" ArtificialAllocation="{@ArtificialAllocation}"
MealPlanCode="{@MealPlanCode}" RoomRPH="{@RoomRPH}">
<xsl:message>units......<xsl:value-of select="sum($current-group/@NumberOfUnits)"/></xsl:message>
<xsl:attribute name="OnRequest">
<xsl:choose>
<xsl:when test="$current-group[@OnRequest='true']">true</xsl:when>
<xsl:otherwise>false</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<Rates>
<Rate>
<xsl:copy-of select="ota:Rates/ota:Rate/ota:Markups"/>
<Total AmountAfterTax="{sum($current-group/ota:Rates/ota:Rate/ota:Total/@AmountAfterTax)}" AmountBeforeTax="{sum($current-group/ota:Rates/ota:Rate/ota:Total/@AmountBeforeTax)}"
AmountBeforeYatraMarkup="{sum($current-group/ota:Rates/ota:Rate/ota:Total/@AmountBeforeYatraMarkup)}" BuyingAmount="{sum($current-group/ota:Rates/ota:Rate/ota:Total/@BuyingAmount)}"
CashBackAmount="{format-number(sum($current-group/ota:Rates/ota:Rate/ota:Total/@CashBackAmount),'####.##')}" CurrencyCode="{ota:Rates/ota:Rate/ota:Total/@CurrencyCode}"
CashBackType="{ota:Rates/ota:Rate/ota:Total/@CashBackType}">
</Total>

<Base AmountAfterTax="{sum($current-group/ota:Rates/ota:Rate/ota:Base/@AmountAfterTax)}" AmountBeforeTax="{sum($current-group/ota:Rates/ota:Rate/ota:Base/@AmountBeforeTax)}"
AmountBeforeYatraMarkup="{sum($current-group/ota:Rates/ota:Rate/ota:Base/@AmountBeforeYatraMarkup)}" BuyingAmount="{sum($current-group/ota:Rates/ota:Rate/ota:Base/@BuyingAmount)}"
CashBackAmount="{format-number(sum($current-group/ota:Rates/ota:Rate/ota:Base/@CashBackAmount),'##.##')}" CurrencyCode="{ota:Rates/ota:Rate/ota:Base/@CurrencyCode}"
CashBackType="{ota:Rates/ota:Rate/ota:Base/@CashBackType}">
</Base>

<NightlyRates>
<xsl:for-each select="ota:Rates/ota:Rate/ota:NightlyRates/ota:NightlyRate">
<xsl:variable name="pos" select="position()"/>
<NightlyRate AmountAfterTax="{sum($current-group/ota:Rates/ota:Rate/ota:NightlyRates/ota:NightlyRate[position() = $pos]/@AmountAfterTax)}"
AmountBeforeTax="{sum($current-group/ota:Rates/ota:Rate/ota:NightlyRates/ota:NightlyRate[position() = $pos]/@AmountBeforeTax)}"
AmountBeforeYatraMarkup="{sum($current-group/ota:Rates/ota:Rate/ota:NightlyRates/ota:NightlyRate[position() = $pos]/@AmountBeforeYatraMarkup)}"
BuyingAmount="{sum($current-group/ota:Rates/ota:Rate/ota:NightlyRates/ota:NightlyRate[position() = $pos]/@BuyingAmount)}"
TaxAmount="{sum($current-group/ota:Rates/ota:Rate/ota:NightlyRates/ota:NightlyRate[position() = $pos]/@TaxAmount)}" CurrencyCode="{@CurrencyCode}" NightNumber="{@NightNumber}" RatePlanCode="{@RatePlanCode}"
SeasonRPH="{@SeasonRPH}">
</NightlyRate>
</xsl:for-each>
</NightlyRates>
<xsl:copy-of select="ota:Rates/ota:Rate/ota:AdditionalCharges"/>
<Taxes>
<xsl:choose>
<xsl:when test="ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@RatePlanCode='RACK'">
<Tax Amount="{sum($current-group/ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@Amount)}" Code="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@Code}" RatePlanCode="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@RatePlanCode}"/>
</xsl:when>
<xsl:otherwise>
<Tax Amount="{sum($current-group/ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@Amount)}" ApplyOrder="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@ApplyOrder}" Code="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@Code}"
PayableLocally="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@PayableLocally}" Percent="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@Percent}" Type="{ota:Rates/ota:Rate/ota:Taxes/ota:Tax/@Type}"/>
</xsl:otherwise>
</xsl:choose>
</Taxes>
</Rate>
</Rates>
</RoomRate>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

Last edited by maryj; April 29th, 2009 at 08:03 AM..
 
Old April 29th, 2009, 07:57 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If the code is too long to post, then it is probably too long to read. Try to cut it down: produce a small but complete program that demonstrates your problem. Apart from anything else, this will help you to understand the problem better yourself. At present, you're getting nowhere.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old April 29th, 2009, 08:05 AM
Authorized User
 
Join Date: Apr 2009
Posts: 25
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Sorry Michael.

I know I have annoyed you a lot in this post. Please try to bear me and all this code this time.

You won't find any such crap from my side next time

I have given the whole code.

Time is running out from my hands. Please help.

Mary





Similar Threads
Thread Thread Starter Forum Replies Last Post
looping in XSL itsmaheshp XSLT 3 February 24th, 2009 10:47 AM
The reference node is not a child of this node.XSL XMLUser XSLT 2 February 25th, 2008 05:22 AM
Plz help: looping variable in xsl priyatowin XSLT 1 September 11th, 2006 05:38 AM
Looping Time pupadu Classic ASP Basics 1 March 17th, 2005 07:26 PM





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