Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
xml x 19
Member Avatar for sbutt

Hi All, I am kind of find it difficult to build my (xslt 1) template: I have this following XML input: <Ticket> <ItineraryItem> <Flight ArrivalDateTime="2012-08-31T09:40:00" DepartureDateTime="2012-08-31T06:00:00" DirectionInd="Outbound"> <DepartureAirport LocationCode="BRN"/> <ArrivalAirport LocationCode="ZTH"/> <OperatingAirline Code="2L" FlightNumber="5320"/> </Flight> </ItineraryItem> <ItineraryItem> <Flight ArrivalDateTime="2012-09-14T11:00:00" DepartureDateTime="2012-09-14T10:15:00" DirectionInd="Inbound"> <DepartureAirport LocationCode="ZTH"/> <ArrivalAirport LocationCode="CFU"/> <OperatingAirline Code="2L" FlightNumber="5321"/> </Flight> </ItineraryItem> …

Member Avatar for Mike Askew
0
382
Member Avatar for sbutt

Hi Folks, I am looking for a solution as to how I can mask some data that is part of a CDATA element. My currently implemented xslt-1 script works fine when my xml element/attribute is not placed inside cdata, for example, in the following xml snippet, I masked <CreditCardNumber> element's …

Member Avatar for sbutt
0
888
Member Avatar for sbutt

Hi folks, i need some help generating some simple xslt script for the following problem: TRH room code TT room code ABCD PABCD aBCD AABCD AbCD BABCD abCD CABCD ABcD DABCD aBcD EABCD AbcD FABCD abcD GABCD ABCd HABCD aBCd IABCD AbCd JABCD abCd KABCD ABcd LABCD aBcd MABCD Abcd …

0
52
Member Avatar for sbutt

Hi Folks, I am using XSLT 1.0, and stuck in a situation where I am having decimal rounding problem. Let me give you an example: My generated XML is: [CODE] <?xml version="1.0" encoding="UTF-8"?> <CostSummary> <CostingItems> <CostingItem CostBasis="7" Description="Per Person" PassengerRPH="1"> <UnitCost Amount="3.333333" CurrencyCode="EUR"/> </CostingItem> <CostingItem CostBasis="7" Description="Per Person" PassengerRPH="2"> <UnitCost …

0
76
Member Avatar for sbutt

Hi Folks, I am trying to implement a script where I want to check if the input value has date string in it or not. For example: [CODE] <ota:Caution ID="Alternative" Type="PackageDetail">Room</ota:Caution> [/CODE] And [CODE] <ota:Caution ID="Alternative" Type="PackageDetail">2011-11-12</ota:Caution> [/CODE] In the first example, the Caution element has value as "Room", which …

Member Avatar for xml_looser
0
140
Member Avatar for sbutt

I am trying to get xsl comments on my XMLSpy XSLT output console, but the comment is not appearing. My xslt script is: [CODE] <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:ota="http://www.opentravel.org/OTA/2003/05" exclude-result-prefixes="ota xsl"> <xsl:output encoding="UTF-8" version="2.0" method="xml"/> <xsl:strip-space elements="*"/> <xsl:variable name="no_of_adult_persons" select="count(//ota:PassengerListItems/ota:PassengerListItem[@Code = '10'])"/> <xsl:variable name="adult_persons_prices"> <xsl:call-template name="adult"> <xsl:with-param …

Member Avatar for alfieclinton
0
212
Member Avatar for sbutt

Hi All, I have a following xml: [code] <?xml version="1.0" encoding="UTF-8"?> <ForwardRequestResponse xmlns:m="http://webservices.kuoni.ch"> <ForwardRequestResult><![CDATA[<?xml version="1.0" encoding="windows-1252"?><Response Version="2.5" From="KUONEKA0" To="CETS" TermId="XXXXXX" Date="18062009" Time="163523" Type="ERROR" Confirm="X" Agent="XXXXXX" Lang="EN" UserCode="X" UserType="X" UserName="X" UserFirstName="X" Mode="X"><Err><ErrorNr>9999</ErrorNr><ErrorText>Fehlerhafter Request</ErrorText><ErrorText>element &lt;Request&gt; attribute: TermId is too long</ErrorText></Err></Response>]]></ForwardRequestResult> </ForwardRequestResponse> [/code] And I want to extract a CDATA out of it …

Member Avatar for vivek4075
0
132
Member Avatar for sbutt

Hi Folks, I have this following xslt script: [CODE]<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ibn="http://ibn.traveltainment.de/2009/001" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:ota="http://www.opentravel.org/OTA/2003/05" xmlns:ota1="http://www.opentravel.org/OTA/2002/11" xmlns:ns3="http://www.opentravel.org/OTA/2002/11" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="SOAP-ENV ota ns3"> <xsl:output method="text" encoding="UTF-8"/> <xsl:variable name="soap" select="name(/SOAP-ENV:Envelope/SOAP-ENV:Body/ota:*)"/> <xsl:variable name="soap2" select="name(/soap:Envelope/soap:Body/ns3:*)"/> <xsl:variable name="base" select="name(/*)"/> <xsl:template match="/"> <xsl:choose> <xsl:when test="count(soap:Envelope/soap:Body) > 0"> <xsl:value-of select="$soap2"/> <xsl:value-of select="$soap"/> </xsl:when> <xsl:when …

0
75
Member Avatar for sbutt

I have this basic transformation script: [CODE]<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ibn="http://ibn.traveltainment.de/2009/001" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:ota="http://www.opentravel.org/OTA/2003/05" xmlns:ota1="http://www.opentravel.org/OTA/2002/11" exclude-result-prefixes="SOAP-ENV ota"> <xsl:output method="text" encoding="UTF-8"/> <xsl:variable name="outermostElementName" select="name(/SOAP-ENV:Envelope/SOAP-ENV:Body/ota:*)"/> <xsl:template match="/"> <xsl:choose> <xsl:when test="count(SOAP-ENV:Envelope/SOAP-ENV:Body) > 0"> <xsl:value-of select="$outermostElementName"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="/*"/> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>[/CODE] in which I'm trying to extract a particular …

0
70
Member Avatar for sbutt

Hi Folks, I have two questions: 1). How to escape CDATA in your xslt script? [code] <xsl:template match="/"> <![CDATA[ <xsl:apply-templates select="node()"/> ]]> </xsl:template> [/code] In the above code, the template inside CDATA does not get executed. What I actually want is the result from this template (<xsl:apply-templates select="node()"/>) to be …

Member Avatar for fpmurphy
0
133
Member Avatar for sbutt

Hi Folks, I'm new to xslt transofrmation so need a little help in transforming the following example. Input: [CODE]<Persons>12</Persons>[/CODE] Output: [CODE]<PassengerRPHs ListOfPassengerRPH="1 2"/>[/CODE] The main thing above is to put a space between digits, 123 -> 1 2 3. It would be perfect if the transformation also handles 9101112 -> …

Member Avatar for fpmurphy
0
105
Member Avatar for sbutt

Hi Folks, I have an xml response, which I want to store into the database (mysql) through XSLT script. For basic data types, I can just prepare a simple insert statement through xslt script which further passed to java for further execution. <xsl:template match="ota:OTA_TT_HotelResRS">insert into booking (createdBy, bookingNumber, created, modified, …

0
64