RE: [xsl] Non-referenced Node being processed

Subject: RE: [xsl] Non-referenced Node being processed
From: balajeec@xxxxxxxxxx
Date: Tue, 4 Feb 2003 10:52:02 +0530
Hi Santosh,
add the follwing before your match\

	<xsl:template match="/">

The reaon for appearance of "1" is that if you don't specify 
<xsl:template match="/">...
the following built-in templates are used
	<xsl:template match="*|/">
	<xsl:template match="text()|@*">
		<xsl:value-of select="."/>
	<xsl:template match="*|/" mode="?">
		<xsl:apply-templates mode="?"/>
	<xsl:template match="text()|@*" mode="?">
		<xsl:value-of select="."/>
	<xsl:template match="processing-instruction()|comment()"/>
	<xsl:template match="processing-instruction()|comment()" mode="?"/>

the element
	<xsl:template match="text()|@*">
		<xsl:value-of select="."/>

leads to the printing of "1" the value of element "<TOUR_COUNT>" in your XML


Balajee Chandrasekaran

Software Engineer
Majesco Software Inc.
Phone: 91-22-5695 2222 Extn No 7911
Choose a job you love, and you will never have to 
work a day in your life
Confucius, BC 551-479, Chinese Ethical Teacher

-----Original Message-----
From: Santosh S N, Noida [mailto:santoshsn@xxxxxxxxxxxxxxxxx]
Sent: Tuesday, February 04, 2003 10:33 AM
To: Xsl-List (E-mail)
Subject: [xsl] Non-referenced Node being processed

When I process the XML with the XSL given below I get an output of 
<?xml version="1.0" encoding="UTF-16"?>

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

<!--XSL File-->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    <xsl:value-of select="TRIP/NUM_TICKETS"/>
    <xsl:value-of select="ORIGIN/DEP_CITY_CODE"/>

<!--XML File-->
<?xml version="1.0" encoding="UTF-8"?>

Santosh S N 

 XSL-List info and archive:

Investing in relationships
In the US, we're called MAJESCO

Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers.

 XSL-List info and archive:

Current Thread