[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Non-referenced Node being processed

Subject: Non-referenced Node being processed
From: "Santosh S N, Noida" <santoshsn@xxxxxxxxxxxxxxxxx>
Date: Tue, 4 Feb 2003 10:32:32 +0530
noida c dat


When I process the XML with the XSL given below I get an output of 
<?xml version="1.0" encoding="UTF-16"?>
1
<REQUEST>
    <MAX_RESP_COUNT>041</MAX_RESP_COUNT>
    <TICKET>3</TICKET>
    <DEP_CITY_CODE>JFK</DEP_CITY_CODE>
</REQUEST>


Can somebody please tell me why do I get the extra "1" Immediately before
the REQUEST node. and how do I get rid of it?
(This arises from the node TOUR_COUNT in the original XML.) 
I get the same result with both XML Spy and Microsoft .NET's XSL Transform
Class.

 
<!--XSL File-->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="AVAILABILITYFARE_REQUEST/TOURDETAILS/TOUR">
  <REQUEST>
   <MAX_RESP_COUNT>041</MAX_RESP_COUNT>
   <TICKET>
    <xsl:value-of select="TRIP/NUM_TICKETS"/>
   </TICKET>
   <DEP_CITY_CODE>
    <xsl:value-of select="ORIGIN/DEP_CITY_CODE"/>
   </DEP_CITY_CODE>
 </REQUEST>
 </xsl:template>
</xsl:stylesheet>

<!--XML File-->
<?xml version="1.0" encoding="UTF-8"?>
<AVAILABILITYFARE_REQUEST>
 <TOURDETAILS>
  <TOUR_COUNT>1</TOUR_COUNT>
  <TOUR>
   <ORIGIN>
    <DEP_AIRPORT_COUNT/>
    <DEP_CITY_CODE>JFK</DEP_CITY_CODE>
    <DEP_TIME>0800</DEP_TIME>
    <DEP_DAY>01</DEP_DAY>
    <DEP_MONTH>JAN</DEP_MONTH>
    <DEP_YEAR>2003</DEP_YEAR>
   </ORIGIN>
   <TRIP>
    <NUM_TICKETS>3</NUM_TICKETS>
    <PASSENGER>
     </PASSENGER>
    </TRIP>
   </TOUR>
 </TOURDETAILS>
</AVAILABILITYFARE_REQUEST>


~Cheers!
Santosh S N 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.