Hotel
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="fontSize">x-small</xsl:param> <xsl:output method="html" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <html> <head> <title>Travelport Universal API Response</title> <style type="text/css"> BODY,table {font-size: <xsl:value-of select="$fontSize"></xsl:value-of>;} table.main {margin-bottom: 12px;border-bottom-style:solid;border-bottom-color:#0075b0;} table.main thead {background-color: #0075b0; color:white;} table.main caption {background-color: #0075b0; color:white;font-size: larger; font-weight:bold;} table.main td {padding: 1px;} tr.hotel td {border-top-style: solid; border-top-color: #72c7e7;} h1 {background-color: #7ab800; color:white;} td.price {text-align:right;color:red;} td.center {text-align:center;} </style> </head> <body> <h1>Hotel Availability</h1> <div > <table class="main"> <caption> </caption> <thead > <tr> <th>Name</th> <th>Chain</th> <th>Min</th> <th>Max</th> <th>Address</th> <th>From search point</th> <th>Participation</th> </tr> </thead> <tbody> <xsl:apply-templates select="//*[local-name()='HotelSearchResult']" /> </tbody> </table> </div> </body> </html> </xsl:template> <xsl:template match="//*[local-name()='HotelSearchResult']"> <xsl:variable name="RateInfo" select="*[local-name()='RateInfo']" /> <xsl:variable name="minimumPrice"> <xsl:value-of select="$RateInfo/@ApproximateMinimumAmount"/> </xsl:variable> <xsl:variable name="maximumPrice"> <xsl:value-of select="$RateInfo/@ApproximateMaximumAmount"/> </xsl:variable> <xsl:variable name="hotelProperty" select="*[local-name()='HotelProperty']" /> <xsl:variable name="directionNode" select="$hotelProperty/*[local-name()='Distance']"></xsl:variable> <tr class="hotel"> <td> <xsl:value-of select="$hotelProperty/@Name"/> </td> <td class="center"> <xsl:value-of select="$hotelProperty/@HotelChain"/> </td> <td class="price"> <xsl:choose> <xsl:when test="$minimumPrice=''"> N/A </xsl:when> <xsl:otherwise> <xsl:value-of select="$minimumPrice"/> </xsl:otherwise> </xsl:choose> </td> <td class="price"> <xsl:choose> <xsl:when test="$maximumPrice=''"> N/A </xsl:when> <xsl:otherwise> <xsl:value-of select="$maximumPrice"/> </xsl:otherwise> </xsl:choose> </td> <td> <xsl:value-of select="$hotelProperty/*[local-name()='PropertyAddress']/*[local-name()='Address']"/> </td> <td> <xsl:value-of select="$directionNode/@Value"/> <xsl:if test="$directionNode/@Units='MI'"> miles </xsl:if> <xsl:if test="$directionNode/@Units='KM'"> kilometers </xsl:if> <xsl:if test="$directionNode/@Direction='N'">north</xsl:if> <xsl:if test="$directionNode/@Direction='NE'">north east</xsl:if> <xsl:if test="$directionNode/@Direction='E'">east</xsl:if> <xsl:if test="$directionNode/@Direction='SE'">south east</xsl:if> <xsl:if test="$directionNode/@Direction='S'">south</xsl:if> <xsl:if test="$directionNode/@Direction='SW'">south west</xsl:if> <xsl:if test="$directionNode/@Direction='W'">west</xsl:if> <xsl:if test="$directionNode/@Direction='NW'">north west</xsl:if> </td> <td> <xsl:value-of select="$hotelProperty/@ParticipationLevel"/> </td> </tr> </xsl:template> </xsl:stylesheet> |
XML
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
<!--?xml:stylesheet type="text/xsl" href="HotelSearchAvailabilityRsp.xslt"?--> <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <hotel:HotelSearchAvailabilityRsp TraceId="20200318141422" TransactionId="EC891E6C0A0E562B78EFF66AEA977407" ResponseTime="4286" xmlns:hotel="http://www.travelport.com/schema/hotel_v50_0" xmlns:common_v50_0="http://www.travelport.com/schema/common_v50_0"> <hotel:ReferencePoint Country="KR">SEOUL</hotel:ReferencePoint> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="FP" VendorLocationID="4245" Key="qWnEYDrYlDKA82CM4HAAAA=="/> <hotel:HotelProperty HotelChain="FP" HotelCode="4245" Name="FOUR POINTS SEOUL NAMSAN" VendorLocationKey="qWnEYDrYlDKA82CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>3785 DONGJADONG YOUNGSAN GU</hotel:Address> <hotel:Address>SEOUL 04323</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82 2 60707999"/> <common_v50_0:PhoneNumber Type="Business" Number="82 2 60707000"/> <common_v50_0:Distance Units="MI" Value="1" Direction="SW"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW127600" ApproximateMaximumAmount="KRW265000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="AZ" VendorLocationID="12123" Key="qWnEYDrYlDKA92CM4HAAAA=="/> <hotel:HotelProperty HotelChain="AZ" HotelCode="12123" Name="SOMERSET PALACE SEOUL" VendorLocationKey="qWnEYDrYlDKA92CM4HAAAA==" ParticipationLevel="4" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>7 YULGOK RO 2 GIL</hotel:Address> <hotel:Address>SEOUL 03143</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-2-67308001"/> <common_v50_0:PhoneNumber Type="Business" Number="82-2-67308888"/> <common_v50_0:Distance Units="MI" Value="1" Direction="N"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW130000" ApproximateMaximumAmount="KRW240000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="LW" VendorLocationID="1808" Key="qWnEYDrYlDKA/2CM4HAAAA=="/> <hotel:HotelProperty HotelChain="LW" HotelCode="1808" Name="THE SHILLA SEOUL" VendorLocationKey="qWnEYDrYlDKA/2CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>249 DONGHORO JUNGGU</hotel:Address> <hotel:Address>SEOUL 04605</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-2-22335073"/> <common_v50_0:PhoneNumber Type="Business" Number="82-2-22333131"/> <common_v50_0:Distance Units="MI" Value="2" Direction="E"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW280000" ApproximateMaximumAmount="KRW1810000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="RT" VendorLocationID="MYSEL" Key="qWnEYDrYlDKAA3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="RT" HotelCode="MYSEL" Name="IBIS SEOUL MYEONG DONG" VendorLocationKey="qWnEYDrYlDKAA3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>78 NAMDAEMUN RO</hotel:Address> <hotel:Address>SEOUL KR 04534</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82263618050"/> <common_v50_0:PhoneNumber Type="Business" Number="82263618888"/> <common_v50_0:Distance Units="MI" Value="0" Direction="NE"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW119000" ApproximateMaximumAmount="KRW240000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="UI" VendorLocationID="55212" Key="qWnEYDrYlDKAB3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="UI" HotelCode="55212" Name="LOTTE CITY HOTEL MAPO" VendorLocationKey="qWnEYDrYlDKAB3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>109 MAPODAERO</hotel:Address> <hotel:Address>SEOUL 121805</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-260-091004"/> <common_v50_0:PhoneNumber Type="Business" Number="82-260-091000"/> <common_v50_0:Distance Units="MI" Value="2" Direction="SW"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW114750" ApproximateMaximumAmount="KRW165000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="FI" VendorLocationID="11778" Key="qWnEYDrYlDKAC3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="FI" HotelCode="11778" Name="FRASER PLACE CENTRAL" VendorLocationKey="qWnEYDrYlDKAC3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>78 TONGILRO</hotel:Address> <hotel:Address>SEOUL 04517</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-2-22208208"/> <common_v50_0:PhoneNumber Type="Business" Number="82-2-22208000"/> <common_v50_0:Distance Units="MI" Value="0" Direction="W"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW140000" ApproximateMaximumAmount="KRW265000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="FI" VendorLocationID="ICNFP" Key="qWnEYDrYlDKAD3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="FI" HotelCode="ICNFP" Name="FRASER PLACE NAMDAEMUN SEOUL" VendorLocationKey="qWnEYDrYlDKAD3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>58 SEJONG DAERO</hotel:Address> <hotel:Address>SEOUL 04526</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-2-22208340"/> <common_v50_0:PhoneNumber Type="Business" Number="82-2-20980800"/> <common_v50_0:Distance Units="MI" Value="0" Direction="SW"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW123000" ApproximateMaximumAmount="KRW163000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="AL" VendorLocationID="4554" Key="qWnEYDrYlDKAE3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="AL" HotelCode="4554" Name="ALOFT SEOUL MYEONGDONG" VendorLocationKey="qWnEYDrYlDKAE3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>56 NAMDAEMUNRO JUNG GU</hotel:Address> <hotel:Address>SEOUL KR 04535</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82220841009"/> <common_v50_0:PhoneNumber Type="Business" Number="82220841000"/> <common_v50_0:Distance Units="MI" Value="0" Direction="SE"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW153000" ApproximateMaximumAmount="KRW3210000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="PH" VendorLocationID="SELSH" Key="qWnEYDrYlDKAF3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="PH" HotelCode="SELSH" Name="SHILLA STAY SEODAEMUN CON" VendorLocationKey="qWnEYDrYlDKAF3CM4HAAAA==" ParticipationLevel="4" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>76 CHOONGJUNGRO SEODAEMUN</hotel:Address> <hotel:Address>SEOUL 03738</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-2-22303800"/> <common_v50_0:PhoneNumber Type="Business" Number="82-2-63889000"/> <common_v50_0:Distance Units="MI" Value="1" Direction="W"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW102600" ApproximateMaximumAmount="KRW195000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="YX" VendorLocationID="SELOR" Key="qWnEYDrYlDKAG3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="YX" HotelCode="SELOR" Name="ORAKAI DAEHAKRO HOTEL" VendorLocationKey="qWnEYDrYlDKAG3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>180 YULGOKRO JONGNOGU</hotel:Address> <hotel:Address>SEOUL 03127</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82-2-63537701"/> <common_v50_0:PhoneNumber Type="Business" Number="82-2-63537700"/> <common_v50_0:Distance Units="MI" Value="2" Direction="NE"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW100000" ApproximateMaximumAmount="KRW240000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> <hotel:HotelSearchResult> <common_v50_0:VendorLocation ProviderCode="1P" VendorCode="HQ" VendorLocationID="29824" Key="qWnEYDrYlDKAH3CM4HAAAA=="/> <hotel:HotelProperty HotelChain="HQ" HotelCode="29824" Name="METRO HOTEL IN MYEONGDONG" VendorLocationKey="qWnEYDrYlDKAH3CM4HAAAA==" Availability="Available"> <hotel:PropertyAddress> <hotel:Address>MYEONGDONG 9GAGIL 14</hotel:Address> <hotel:Address>SEOUL KR 100 845</hotel:Address> </hotel:PropertyAddress> <common_v50_0:PhoneNumber Type="Fax" Number="82 27574411"/> <common_v50_0:PhoneNumber Type="Business" Number="82 27571112"/> <common_v50_0:Distance Units="MI" Value="0" Direction="NE"/> </hotel:HotelProperty> <hotel:RateInfo ApproximateMinimumAmount="KRW100000" ApproximateMaximumAmount="KRW100000"/> <hotel:HotelType SourceLink="true"/> </hotel:HotelSearchResult> </hotel:HotelSearchAvailabilityRsp> </SOAP:Body> </SOAP:Envelope> |
Html
