{"id":338,"date":"2019-01-26T19:49:25","date_gmt":"2019-01-26T10:49:25","guid":{"rendered":"https:\/\/uapi.ihavenomoney.co.kr\/?p=338"},"modified":"2019-01-26T20:00:58","modified_gmt":"2019-01-26T11:00:58","slug":"__trashed-2","status":"publish","type":"post","link":"https:\/\/uapi.ihavenomoney.co.kr\/?p=338","title":{"rendered":"TravelTime"},"content":{"rendered":"<p>For a single segment with no connection, the travel time is equal to the flight time (FlightDetails @TravelTime and AirSegment @TravelTime).<br \/>\nThe TravelTime element in LowFareSearchRsp\/AirPricePointList\/AirPricePoint\/AirPricingInfo\/FlightOptionsList\/FlightOption\/Option indicates the travel time, in duration, for the entire journey. The travel time is determined by calculating the difference between the departure time of the first segment and the arrival time of the last segment for that particular entire set of connections. For example:<\/p>\n<pre class=\"lang:xhtml decode:true \" >Journey TravelTime=\"655\"&gt;\r\n   &lt;AirSegmentRef Key=\"1T\"\/&gt;\r\n    &lt;AirSegmentRef Key=\"3T\"\/&gt;\r\n&lt;\/Journey&gt;\r\n&lt;Journey TravelTime=\"685\"&gt;\r\n   &lt;AirSegmentRef Key=\"5T\"\/&gt;\r\n   &lt;AirSegmentRef Key=\"7T\"\/&gt;\r\n&lt;\/Journey&gt;<\/pre>\n<p>uAPI : \uc0d8\ud50c<\/p>\n<pre class=\"lang:xhtml decode:true \" >&lt;air:Option Key=\"NdOjyeBAAA\/BNzybOdAAAA==\" TravelTime=\"P0DT16H30M0S\"&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B0xybOdAAAA==\"\/&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B2xybOdAAAA==\"\/&gt;\r\n                           &lt;air:Connection SegmentIndex=\"0\"\/&gt;\r\n                        &lt;\/air:Option&gt;\r\n                        &lt;air:Option Key=\"NdOjyeBAAA\/BQzybOdAAAA==\" TravelTime=\"P1DT1H25M0S\"&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B0xybOdAAAA==\"\/&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B4xybOdAAAA==\"\/&gt;\r\n                           &lt;air:Connection SegmentIndex=\"0\"\/&gt;\r\n                        &lt;\/air:Option&gt;\r\n                        &lt;air:Option Key=\"NdOjyeBAAA\/BTzybOdAAAA==\" TravelTime=\"P1DT4H40M0S\"&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"Q\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B0xybOdAAAA==\"\/&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"Q\" BookingCount=\"4\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BUyybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/B6xybOdAAAA==\"\/&gt;\r\n                           &lt;air:Connection SegmentIndex=\"0\"\/&gt;\r\n                        &lt;\/air:Option&gt;\r\n                     &lt;\/air:FlightOption&gt;\r\n                     &lt;air:FlightOption LegRef=\"NdOjyeBAAA\/BuyybOdAAAA==\" Destination=\"SEL\" Origin=\"BKK\"&gt;\r\n                        &lt;air:Option Key=\"NdOjyeBAAA\/BWzybOdAAAA==\" TravelTime=\"P1DT5H5M0S\"&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BCyybOdAAAA==\"\/&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BEyybOdAAAA==\"\/&gt;\r\n                           &lt;air:Connection SegmentIndex=\"0\"\/&gt;\r\n                        &lt;\/air:Option&gt;\r\n                        &lt;air:Option Key=\"NdOjyeBAAA\/BZzybOdAAAA==\" TravelTime=\"P1DT5H30M0S\"&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BGyybOdAAAA==\"\/&gt;\r\n                           &lt;air:BookingInfo BookingCode=\"S\" BookingCount=\"9\" CabinClass=\"Economy\" FareInfoRef=\"NdOjyeBAAA\/BDzybOdAAAA==\" SegmentRef=\"NdOjyeBAAA\/BEyybOdAAAA==\"\/&gt;\r\n                           &lt;air:Connection SegmentIndex=\"0\"\/&gt;\r\n                        &lt;\/air:Option&gt;\r\n                     &lt;\/air:FlightOption&gt;\r\n                  &lt;\/air:FlightOptionsList&gt;\r\n<\/pre>\n<p>TravelTime \ud654\uba74 \uad6c\ud604<a href=\"https:\/\/uapi.ihavenomoney.co.kr\/?attachment_id=357\" rel=\"attachment wp-att-357\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/uapi.ihavenomoney.co.kr\/wp-content\/uploads\/2019\/01\/traveltime.jpg\" alt=\"\" width=\"545\" height=\"961\" class=\"alignnone size-full wp-image-357\" srcset=\"https:\/\/uapi.ihavenomoney.co.kr\/wp-content\/uploads\/2019\/01\/traveltime.jpg 545w, https:\/\/uapi.ihavenomoney.co.kr\/wp-content\/uploads\/2019\/01\/traveltime-170x300.jpg 170w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><\/a><\/p>\n<p>Xslt :<\/p>\n<pre class=\"lang:xhtml decode:true \" >&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"&gt;\r\n  &lt;xsl:param name=\"fontSize\"&gt;x-small&lt;\/xsl:param&gt;\r\n  &lt;xsl:output method=\"html\" indent=\"yes\" omit-xml-declaration=\"yes\"\/&gt;\r\n\r\n    &lt;xsl:variable name=\"maximum\"&gt;\r\n      &lt;xsl:value-of select=\"\/\/*[local-name()='AirSegment' and not(preceding-sibling::node()\/@Group &gt; @Group or following-sibling::node()\/@Group &gt; @Group)]\/@Group\" \/&gt;\r\n    &lt;\/xsl:variable&gt;\r\n  &lt;xsl:template match=\"\/\"&gt;\r\n    &lt;html&gt;\r\n      &lt;head&gt;\r\n        &lt;title&gt;Travelport Universal API Low Fare response&lt;\/title&gt;\r\n        &lt;style type=\"text\/css\"&gt;\r\n          BODY,table {font-size: &lt;xsl:value-of select=\"$fontSize\"&gt;&lt;\/xsl:value-of&gt;;}\r\n          table.main {margin-bottom: 12px;border-bottom-style:solid;border-bottom-color:#0075b0; width=\"100%\"}\r\n          table.main thead {background-color: #0075b0; color:white;}\r\n          table.main caption {background-color: #0075b0; color:white;font-size: larger; font-weight:bold;}\r\n          table.main td {padding: 1px;}\r\n          tr.out td {border-top-style: solid; border-top-color: #72c7e7;}\r\n          tr.in td {border-top-style: solid; border-top-color: #7ab800;}\r\n          tr.middle td {border-top-style: solid; border-top-color: #dbceac;}\r\n          td.time {text-align:right;}\r\n          td.center {text-align:center;}\r\n          h1 {background-color: #7ab800; color:white;}\r\n        &lt;\/style&gt;\r\n      &lt;\/head&gt;\r\n      &lt;body&gt;\r\n        &lt;table&gt;\r\n          &lt;tr&gt;\r\n            &lt;td&gt;\r\n              &lt;h1&gt;\r\n                &lt;a name=\"#air\"&gt;Air fares&lt;\/a&gt;\r\n              &lt;\/h1&gt;\r\n              &lt;a href=\"#rail\"&gt;Go to rail fares&lt;\/a&gt;\r\n            &lt;\/td&gt;\r\n          &lt;\/tr&gt;\r\n          &lt;xsl:apply-templates select=\"\/\/*[local-name()='AirPricingSolution']\"\/&gt;\r\n          &lt;xsl:apply-templates select=\"\/\/*[local-name()='AirPricePoint']\"\/&gt;\r\n          &lt;tr&gt;\r\n            &lt;td&gt;\r\n              &lt;h1&gt;\r\n                &lt;a name=\"#rail\"&gt;Rail fares&lt;\/a&gt;\r\n              &lt;\/h1&gt;\r\n              &lt;a href=\"#air\"&gt;Go to air fares&lt;\/a&gt;\r\n            &lt;\/td&gt;\r\n          &lt;\/tr&gt;\r\n        &lt;\/table&gt;\r\n        &lt;xsl:apply-templates select=\"\/\/*[local-name()='RailPricingSolution']\"\/&gt;\r\n      &lt;\/body&gt;\r\n    &lt;\/html&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"\/\/*[local-name()='AirPricingSolution']\"&gt;\r\n    &lt;xsl:variable name=\"Amt\"&gt;\r\n      &lt;xsl:value-of select=\".\/@TotalPrice\"\/&gt;\r\n    &lt;\/xsl:variable&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;\r\n        &lt;table class=\"main\"&gt;\r\n          &lt;caption&gt;\r\n            Total price:\r\n            &lt;xsl:value-of select=\"$Amt\"\/&gt;\r\n          &lt;\/caption&gt;\r\n          &lt;thead &gt;\r\n            &lt;tr&gt;\r\n              &lt;th&gt;Direction&lt;\/th&gt;\r\n              &lt;th&gt;Date&lt;\/th&gt;\r\n              &lt;th&gt;Flight&lt;\/th&gt;\r\n              &lt;th&gt;Depart&lt;\/th&gt;\r\n              &lt;th&gt;Arrive&lt;\/th&gt;\r\n              &lt;th&gt;From&lt;\/th&gt;\r\n              &lt;th&gt;To&lt;\/th&gt;\r\n              &lt;th&gt;Class&lt;\/th&gt;\r\n              &lt;th&gt;Cabin&lt;\/th&gt;\r\n              &lt;th&gt;Source&lt;\/th&gt;\r\n            &lt;\/tr&gt;\r\n          &lt;\/thead&gt;\r\n          &lt;tbody&gt;\r\n            &lt;xsl:apply-templates select=\"*[local-name()='AirSegmentRef']\" \/&gt;\r\n            &lt;xsl:apply-templates select=\"*[local-name()='Journey']\" \/&gt;\r\n          &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"\/\/*[local-name()='AirPricePoint']\"&gt;\r\n    &lt;xsl:variable name=\"Amt\"&gt;\r\n      &lt;xsl:value-of select=\".\/@TotalPrice\"\/&gt;\r\n    &lt;\/xsl:variable&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;\r\n        &lt;table class=\"main\"&gt;\r\n          &lt;caption&gt;\r\n            \r\n            &lt;xsl:value-of select=\".\/@TotalPrice\"\/&gt; (base: &lt;xsl:value-of select=\".\/@BasePrice\"\/&gt; - taxes: &lt;xsl:value-of select=\".\/@Taxes\"\/&gt;)\r\n          &lt;\/caption&gt;\r\n          &lt;thead &gt;\r\n            &lt;tr&gt;\r\n              &lt;th&gt;Direction&lt;\/th&gt;\r\n              &lt;th&gt;Date&lt;\/th&gt;\r\n              &lt;th&gt;Flight&lt;\/th&gt;\r\n              &lt;th&gt;Depart&lt;\/th&gt;\r\n              &lt;th&gt;Arrive&lt;\/th&gt;\r\n              &lt;th&gt;From&lt;\/th&gt;\r\n              &lt;th&gt;To&lt;\/th&gt;\r\n              &lt;th&gt;Class_&lt;\/th&gt;\r\n              &lt;th&gt;Cabin&lt;\/th&gt;\r\n              &lt;th&gt;Source&lt;\/th&gt;\r\n              &lt;th&gt;\uc5ec\ud589\uc2dc\uac04&lt;\/th&gt;\r\n            &lt;\/tr&gt;\r\n          &lt;\/thead&gt;\r\n          &lt;tbody&gt;\r\n            &lt;xsl:for-each select=\"*[local-name()='AirPricingInfo'][position()=1]\"&gt;\r\n              &lt;xsl:apply-templates select=\"*[local-name()='FlightOptionsList']\/*[local-name()='FlightOption']\/*[local-name()='Option']\" \/&gt;\r\n            &lt;\/xsl:for-each&gt;\r\n          &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"*[local-name()='AirSegmentRef']\"&gt;\r\n    &lt;xsl:variable name=\"indexFlight\" select=\".\/@Key\"\/&gt;\r\n    &lt;xsl:variable name=\"position\" select=\"position()-2\" \/&gt;\r\n\r\n    &lt;xsl:variable name=\"connecting\" select=\"..\/*[local-name()='Connection' and @SegmentIndex=$position]\/@SegmentIndex\" \/&gt;\r\n\r\n    &lt;xsl:variable name=\"bookingClass\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCode\"\/&gt;\r\n\t&lt;xsl:variable name=\"bookingCount\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCount\"\/&gt;\r\n    &lt;xsl:variable name=\"cabinClass\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@CabinClass\"\/&gt;\r\n    &lt;xsl:variable name=\"providerCode\" select=\"..\/*[local-name()='AirPricingInfo'][position()=1]\/@ProviderCode\"\/&gt;\r\n\r\n    &lt;xsl:for-each select=\"\/\/*[local-name()='AirSegment' and .\/@Key=$indexFlight]\"&gt;\r\n      &lt;xsl:variable name=\"directionName\"&gt;\r\n        &lt;xsl:if test=\"not($connecting)\" &gt;\r\n          &lt;xsl:if test=\"$maximum&gt;1\"&gt;\r\n            OD Part &lt;xsl:value-of select=\".\/@Group\"\/&gt;\r\n          &lt;\/xsl:if&gt;\r\n          &lt;xsl:if test=\"$maximum=1\"&gt;\r\n            &lt;xsl:choose&gt;\r\n              &lt;xsl:when test=\".\/@Group='0'\"&gt;Outbound&lt;\/xsl:when&gt;\r\n              &lt;xsl:otherwise&gt;Inbound&lt;\/xsl:otherwise&gt;\r\n            &lt;\/xsl:choose&gt;\r\n          &lt;\/xsl:if&gt;\r\n          &lt;xsl:if test=\"$maximum=0\"&gt;Oneway&lt;\/xsl:if&gt;\r\n        &lt;\/xsl:if&gt;\r\n      &lt;\/xsl:variable&gt;\r\n      &lt;tr&gt;\r\n        &lt;xsl:attribute name=\"class\"&gt;\r\n          &lt;xsl:choose&gt;\r\n            &lt;xsl:when test=\".\/@Group='0' and $directionName!=''\"&gt;out&lt;\/xsl:when&gt;\r\n            &lt;xsl:when test=\"($maximum=.\/@Group and $directionName!='')\"&gt;in&lt;\/xsl:when&gt;\r\n            &lt;xsl:when test=\"$directionName=''\"&gt;&lt;\/xsl:when&gt;\r\n            &lt;xsl:otherwise &gt;middle&lt;\/xsl:otherwise &gt;\r\n          &lt;\/xsl:choose&gt;\r\n        &lt;\/xsl:attribute&gt;\r\n        &lt;td &gt;\r\n          &lt;xsl:value-of select=\"$directionName\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\".\/@Carrier\"\/&gt;\r\n          &lt;xsl:value-of select=\".\/@FlightNumber\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td class=\"time\"&gt;\r\n          &lt;xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td class=\"time\"&gt;\r\n          &lt;xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\".\/@Origin\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\".\/@Destination\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td class=\"center\"&gt;\r\n          &lt;xsl:value-of select=\"$bookingClass\"\/&gt;\r\n\t\t  &lt;xsl:value-of select=\"$bookingCount\"\/&gt; *\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:choose &gt;\r\n            &lt;xsl:when test=\"$cabinClass\"&gt;\r\n              &lt;xsl:value-of select=\"$cabinClass\"\/&gt;\r\n            &lt;\/xsl:when&gt;\r\n            &lt;xsl:otherwise&gt;\r\n              &amp;#160;\r\n            &lt;\/xsl:otherwise&gt;\r\n          &lt;\/xsl:choose&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\"$providerCode\"\/&gt;\r\n          &lt;xsl:if test=\".\/@AvailabilitySource\"&gt;\r\n            -\r\n            &lt;xsl:value-of select=\".\/@AvailabilitySource\"\/&gt;\r\n          &lt;\/xsl:if&gt;\r\n        &lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n    &lt;\/xsl:for-each&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"*[local-name()='Journey']\"&gt;\r\n    &lt;xsl:call-template name=\"SegmentsForJourney\" \/&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template name=\"SegmentsForJourney\"&gt;\r\n    &lt;xsl:for-each select=\"*[local-name()='AirSegmentRef']\"&gt;\r\n      &lt;xsl:variable name=\"indexFlight\" select=\".\/@Key\"\/&gt;\r\n      &lt;xsl:variable name=\"position\" select=\"position()-2\" \/&gt;\r\n\r\n      &lt;xsl:variable name=\"connecting\" select=\"..\/..\/*[local-name()='Connection' and @SegmentIndex=$position]\/@SegmentIndex\" \/&gt;\r\n\r\n      &lt;xsl:variable name=\"bookingClass\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCode\"\/&gt;\r\n\t  &lt;xsl:variable name=\"bookingCount\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@BookingCount\"\/&gt;\r\n\t  \r\n      &lt;xsl:variable name=\"cabinClass\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/*[local-name()='BookingInfo' and @SegmentRef=$indexFlight]\/@CabinClass\"\/&gt;\r\n      &lt;xsl:variable name=\"providerCode\" select=\"..\/..\/*[local-name()='AirPricingInfo'][position()=1]\/@ProviderCode\"\/&gt;\r\n\r\n      &lt;xsl:for-each select=\"\/\/*[local-name()='AirSegment' and .\/@Key=$indexFlight]\"&gt;\r\n        &lt;xsl:variable name=\"directionName\"&gt;\r\n          &lt;xsl:if test=\"not($connecting)\" &gt;\r\n            &lt;xsl:if test=\"$maximum&gt;1\"&gt;\r\n              OD Part &lt;xsl:value-of select=\".\/@Group\"\/&gt;\r\n            &lt;\/xsl:if&gt;\r\n            &lt;xsl:if test=\"$maximum=1\"&gt;\r\n              &lt;xsl:choose&gt;\r\n                &lt;xsl:when test=\".\/@Group='0'\"&gt;Outbound&lt;\/xsl:when&gt;\r\n                &lt;xsl:otherwise&gt;Inbound&lt;\/xsl:otherwise&gt;\r\n              &lt;\/xsl:choose&gt;\r\n            &lt;\/xsl:if&gt;\r\n            &lt;xsl:if test=\"$maximum=0\"&gt;Oneway&lt;\/xsl:if&gt;\r\n          &lt;\/xsl:if&gt;\r\n        &lt;\/xsl:variable&gt;\r\n        &lt;tr&gt;\r\n          &lt;xsl:attribute name=\"class\"&gt;\r\n            &lt;xsl:choose&gt;\r\n              &lt;xsl:when test=\".\/@Group='0' and $directionName!=''\"&gt;out&lt;\/xsl:when&gt;\r\n              &lt;xsl:when test=\"($maximum=.\/@Group and $directionName!='')\"&gt;in&lt;\/xsl:when&gt;\r\n              &lt;xsl:when test=\"$directionName=''\"&gt;&lt;\/xsl:when&gt;\r\n              &lt;xsl:otherwise &gt;middle&lt;\/xsl:otherwise &gt;\r\n            &lt;\/xsl:choose&gt;\r\n          &lt;\/xsl:attribute&gt;\r\n          &lt;td &gt;\r\n            &lt;xsl:value-of select=\"$directionName\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\".\/@Carrier\"\/&gt;\r\n            &lt;xsl:value-of select=\".\/@FlightNumber\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td class=\"time\"&gt;\r\n            &lt;xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td class=\"time\"&gt;\r\n            &lt;xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\".\/@Origin\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\".\/@Destination\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td class=\"center\"&gt;\r\n            &lt;xsl:value-of select=\"$bookingClass\"\/&gt;\r\n\t\t\t&lt;xsl:value-of select=\"$bookingCount\"\/&gt; _\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:choose &gt;\r\n              &lt;xsl:when test=\"$cabinClass\"&gt;\r\n                &lt;xsl:value-of select=\"$cabinClass\"\/&gt;\r\n              &lt;\/xsl:when&gt;\r\n              &lt;xsl:otherwise&gt;\r\n                &amp;#160;\r\n              &lt;\/xsl:otherwise&gt;\r\n            &lt;\/xsl:choose&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\"$providerCode\"\/&gt;\r\n            &lt;xsl:if test=\".\/@AvailabilitySource\"&gt;\r\n              -\r\n              &lt;xsl:value-of select=\".\/@AvailabilitySource\"\/&gt;\r\n            &lt;\/xsl:if&gt;\r\n          &lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n      &lt;\/xsl:for-each&gt;\r\n    &lt;\/xsl:for-each&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"*[local-name()='FlightOptionsList']\/*[local-name()='FlightOption']\/*[local-name()='Option']\"&gt;\r\n  \r\n    &lt;xsl:variable name=\"TravelTime\" select=\".\/@TravelTime\" \/&gt;\r\n\t \r\n    &lt;xsl:for-each select=\"*[local-name()='BookingInfo']\"&gt;\r\n      &lt;xsl:variable name=\"indexFlight\" select=\".\/@SegmentRef\"\/&gt;\r\n      &lt;xsl:variable name=\"position\" select=\"position()-2\" \/&gt;\r\n\r\n      &lt;xsl:variable name=\"connecting\" select=\"..\/*[local-name()='Connection' and @SegmentIndex=$position]\/@SegmentIndex\" \/&gt;\r\n\r\n      &lt;xsl:variable name=\"providerCode\" select=\"ancestor::*[local-name() = 'AirPricingInfo']\/@ProviderCode\" \/&gt;\r\n\r\n      &lt;xsl:variable name=\"bookingClass\" select=\".\/@BookingCode\"\/&gt;\r\n\t  &lt;xsl:variable name=\"bookingCount\" select=\".\/@BookingCount\"\/&gt;\r\n      &lt;xsl:variable name=\"cabinClass\" select=\".\/@CabinClass\"\/&gt;\r\n      &lt;xsl:variable name=\"fareInfoRef\" select=\".\/@FareInfoRef\"\/&gt;\r\n\r\n      &lt;xsl:variable name=\"brandId\" select=\"\/*[local-name()='FareInfo' and @Key=$fareInfoRef]\/*[local-name()='Brand']\/@BrandId\" \/&gt;\r\n      &lt;xsl:variable name=\"brandName\" select=\"\/\/*[local-name()='Brand' and @Key=$brandId]\/@Name\"\/&gt;\r\n      \r\n    \r\n\t  \r\n      &lt;xsl:for-each select=\"\/\/*[local-name()='AirSegment' and .\/@Key=$indexFlight]\"&gt;\r\n        &lt;xsl:variable name=\"directionName\"&gt;\r\n          &lt;xsl:if test=\"not($connecting)\" &gt;\r\n            &lt;xsl:if test=\"$maximum&gt;1\"&gt;\r\n              OD Part &lt;xsl:value-of select=\".\/@Group\"\/&gt;\r\n            &lt;\/xsl:if&gt;\r\n            &lt;xsl:if test=\"$maximum=1\"&gt;\r\n              &lt;xsl:choose&gt;\r\n                &lt;xsl:when test=\".\/@Group='0'\"&gt;Outbound&lt;\/xsl:when&gt;\r\n                &lt;xsl:otherwise&gt;Inbound&lt;\/xsl:otherwise&gt;\r\n              &lt;\/xsl:choose&gt;\r\n            &lt;\/xsl:if&gt;\r\n            &lt;xsl:if test=\"$maximum=0\"&gt;Oneway&lt;\/xsl:if&gt;\r\n          &lt;\/xsl:if&gt;\r\n        &lt;\/xsl:variable&gt;\r\n\t\t\r\n\t\t&lt;xsl:variable name=\"TravelTime02\"&gt;\r\n          &lt;xsl:if test=\"not($connecting)\" &gt;\r\n            &lt;xsl:if test=\"$maximum&gt;1\"&gt;\r\n              &lt;xsl:value-of select=\"$TravelTime\"\/&gt;\r\n            &lt;\/xsl:if&gt;\r\n            &lt;xsl:if test=\"$maximum=1\"&gt;\r\n              &lt;xsl:choose&gt;\r\n                &lt;xsl:when test=\".\/@Group='0'\"&gt;&lt;xsl:value-of select=\"$TravelTime\"\/&gt;&lt;\/xsl:when&gt;\r\n                &lt;xsl:otherwise&gt;&lt;xsl:value-of select=\"$TravelTime\"\/&gt;&lt;\/xsl:otherwise&gt;\r\n              &lt;\/xsl:choose&gt;\r\n            &lt;\/xsl:if&gt;\r\n            &lt;xsl:if test=\"$maximum=0\"&gt;&lt;xsl:value-of select=\"$TravelTime\"\/&gt;&lt;\/xsl:if&gt;\r\n          &lt;\/xsl:if&gt;\r\n        &lt;\/xsl:variable&gt;\r\n\t\t\r\n\t\t\r\n\t\t\r\n        &lt;tr&gt;\r\n          \r\n\t\t  &lt;xsl:attribute name=\"class\"&gt;\r\n            &lt;xsl:choose&gt;\r\n              &lt;xsl:when test=\".\/@Group='0' and $directionName!=''\"&gt;out&lt;\/xsl:when&gt;\r\n              &lt;xsl:when test=\"($maximum=.\/@Group and $directionName!='')\"&gt;in&lt;\/xsl:when&gt;\r\n              &lt;xsl:when test=\"$directionName=''\"&gt;&lt;\/xsl:when&gt;\r\n              &lt;xsl:otherwise &gt;middle&lt;\/xsl:otherwise &gt;\r\n            &lt;\/xsl:choose&gt;\r\n          &lt;\/xsl:attribute&gt;\r\n\t\t  \r\n          &lt;td &gt;\r\n            &lt;xsl:value-of select=\"$directionName\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\".\/@Carrier\"\/&gt;\r\n            &lt;xsl:value-of select=\".\/@FlightNumber\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td class=\"time\"&gt;\r\n            &lt;xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td class=\"time\"&gt;\r\n            &lt;xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\".\/@Origin\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\".\/@Destination\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td class=\"center\"&gt;\r\n            &lt;xsl:value-of select=\"$bookingClass\"\/&gt;&lt;xsl:value-of select=\"$bookingCount\"\/&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td &gt;\r\n            &lt;xsl:choose &gt;\r\n              &lt;xsl:when test=\"$cabinClass\"&gt;\r\n                &lt;xsl:value-of select=\"$cabinClass\"\/&gt;\r\n              &lt;\/xsl:when&gt;\r\n              &lt;xsl:otherwise&gt;\r\n                &amp;#160;\r\n              &lt;\/xsl:otherwise&gt;\r\n            &lt;\/xsl:choose&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\"$providerCode\"\/&gt;\r\n            &lt;xsl:if test=\".\/@AvailabilitySource\"&gt;\r\n              -\r\n              &lt;xsl:value-of select=\".\/@AvailabilitySource\"\/&gt;\r\n            &lt;\/xsl:if&gt;\r\n          &lt;\/td&gt;\r\n          &lt;td&gt;\r\n            &lt;xsl:value-of select=\"$brandName\"\/&gt;\r\n\t\t\t&lt;!-- SegmentRef --&gt;\r\n\t\t\t\r\n\t\t\t&lt;xsl:variable name=\"FlightDetailsRef\" select=\".\/*[local-name()='FlightDetailsRef']\/@Key\"\/&gt;\r\n\t\t\t\r\n\t\t\t&lt;xsl:value-of select=\"$TravelTime02\"\/&gt;\r\n\t\t\t\r\n\t\t\t&lt;!--xsl:for-each select=\"\/\/*[local-name()='FlightDetails' and .\/@Key=$FlightDetailsRef]\"&gt;\r\n\t\t\t\r\n\t\t\t  traveltime: &lt;xsl:value-of select=\"@TravelTime\"&gt;&lt;\/xsl:value-of&gt; &lt;BR\/&gt;\r\n\t\t\t  \ucd9c\ubc1c\uc2dc\uac04 : &lt;xsl:value-of select=\"@DepartureTime\"&gt;&lt;\/xsl:value-of&gt; &lt;BR\/&gt;\r\n\t\t\t  \ub3c4\ucc29\uc2dc\uac04 : &lt;xsl:value-of select=\"@ArrivalTime\"&gt;&lt;\/xsl:value-of&gt; &lt;BR\/&gt;\r\n\t\t\t\r\n\t\t\t&lt;\/xsl:for-each--&gt;\r\n\t\t\t\r\n\t\t\t\r\n          &lt;\/td&gt;\r\n\r\n        &lt;\/tr&gt;\r\n      &lt;\/xsl:for-each&gt;\r\n    &lt;\/xsl:for-each&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"\/\/*[local-name()='RailPricingSolution']\"&gt;\r\n    &lt;xsl:variable name=\"Amt\"&gt;\r\n      &lt;xsl:value-of select=\".\/@TotalPrice\"\/&gt;\r\n    &lt;\/xsl:variable&gt;\r\n    &lt;xsl:variable name=\"Supplier\"&gt;\r\n      &lt;xsl:value-of select=\".\/@SupplierCode\"\/&gt;\r\n    &lt;\/xsl:variable&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;\r\n        &lt;table class=\"main\"&gt;\r\n          &lt;caption&gt;\r\n            From &lt;xsl:value-of select=\"$Supplier\"\/&gt; - Total price:\r\n            &lt;xsl:value-of select=\"$Amt\"\/&gt;\r\n          &lt;\/caption&gt;\r\n          &lt;thead &gt;\r\n            &lt;tr&gt;\r\n              &lt;th&gt;Direction&lt;\/th&gt;\r\n              &lt;th&gt;Date&lt;\/th&gt;\r\n              &lt;th&gt;Train&lt;\/th&gt;\r\n              &lt;th&gt;Depart&lt;\/th&gt;\r\n              &lt;th&gt;Arrive&lt;\/th&gt;\r\n              &lt;th&gt;From&lt;\/th&gt;\r\n              &lt;th&gt;To&lt;\/th&gt;\r\n            &lt;\/tr&gt;\r\n          &lt;\/thead&gt;\r\n          &lt;tbody&gt;\r\n            &lt;xsl:apply-templates select=\"*[local-name()='RailJourneyRef']\" \/&gt;\r\n          &lt;\/tbody&gt;\r\n        &lt;\/table&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"*[local-name()='RailJourneyRef']\"&gt;\r\n    &lt;xsl:variable name=\"indexJourney\" select=\".\/@Key\"\/&gt;\r\n    &lt;xsl:for-each select=\"\/\/*[local-name()='RailJourney' and .\/@Key=$indexJourney]\"&gt;\r\n      &lt;xsl:variable name=\"direction\" select=\".\/@JourneyDirection\"\/&gt;\r\n      &lt;xsl:apply-templates select=\"*[local-name()='RailSegmentRef']\"&gt;\r\n        &lt;xsl:with-param name=\"direction\" select=\"$direction\"&gt;&lt;\/xsl:with-param&gt;\r\n      &lt;\/xsl:apply-templates&gt;\r\n    &lt;\/xsl:for-each&gt;\r\n\r\n  &lt;\/xsl:template&gt;\r\n\r\n  &lt;xsl:template match=\"*[local-name()='RailSegmentRef']\"&gt;\r\n    &lt;xsl:param name=\"direction\"\/&gt;\r\n\r\n    &lt;xsl:variable name=\"position\" select=\"position()\" \/&gt;\r\n    &lt;xsl:variable name=\"directionHeader\"&gt;\r\n      &lt;xsl:choose&gt;\r\n        &lt;xsl:when test=\"position()=1\"&gt;\r\n          &lt;xsl:value-of select=\"$direction\"\/&gt;\r\n        &lt;\/xsl:when&gt;\r\n        &lt;xsl:otherwise&gt;\r\n\r\n        &lt;\/xsl:otherwise&gt;\r\n      &lt;\/xsl:choose&gt;\r\n    &lt;\/xsl:variable&gt;\r\n\r\n    &lt;xsl:variable name=\"indexSegment\" select=\".\/@Key\"\/&gt;\r\n    &lt;xsl:for-each select=\"\/\/*[local-name()='RailSegment' and .\/@Key=$indexSegment]\"&gt;\r\n      &lt;tr&gt;\r\n        &lt;xsl:attribute name=\"class\"&gt;\r\n          &lt;xsl:choose&gt;\r\n            &lt;xsl:when test=\"$directionHeader='Outward'\"&gt;out&lt;\/xsl:when&gt;\r\n            &lt;xsl:when test=\"$directionHeader='Return'\"&gt;in&lt;\/xsl:when&gt;\r\n            &lt;xsl:otherwise &gt;&lt;\/xsl:otherwise &gt;\r\n          &lt;\/xsl:choose&gt;\r\n        &lt;\/xsl:attribute&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\"$directionHeader\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\"substring(.\/@DepartureTime,1,10)\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\".\/@TrainNumber\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td class=\"time\"&gt;\r\n          &lt;xsl:value-of select=\"substring(.\/@DepartureTime,12,5)\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td class=\"time\"&gt;\r\n          &lt;xsl:value-of select=\"substring(.\/@ArrivalTime,12,5)\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\".\/@OriginStationName\"\/&gt;\r\n        &lt;\/td&gt;\r\n        &lt;td&gt;\r\n          &lt;xsl:value-of select=\".\/@DestinationStationName\"\/&gt;\r\n        &lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n    &lt;\/xsl:for-each&gt;\r\n  &lt;\/xsl:template&gt;\r\n&lt;\/xsl:stylesheet&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>For a single segment with no connection, the travel time is equal to the flight time (FlightDetails @TravelTime and AirSegment @TravelTime). The TravelTime element in <a class=\"mh-excerpt-more\" href=\"https:\/\/uapi.ihavenomoney.co.kr\/?p=338\" title=\"TravelTime\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-338","post","type-post","status-publish","format-standard","hentry","category-low-fare-search"],"_links":{"self":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338"}],"version-history":[{"count":2,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}