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

Re: contains() function to search general in xslt

Subject: Re: contains() function to search general in xslt
From: Arulraj <p_arulraj@xxxxxxxxx>
Date: Mon, 5 Dec 2005 11:46:02 +0000 (GMT)
xsl not contains
Hi,

I have the following XML fragment as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Layout>
	<param name="Refreshable" value="false"/>
	<Box name="header1">
		<control name="header1contrls"/>
	</Box>
	<Box name="Application" position="absolute">
		<control name="Applicationcontrls"/>
	</Box>
</Layout>

I am using the XSLT to find the child elements of
Layout using contains like the following.

<xsl:template match="/">
	<xsl:for-each select="Layout">
		<xsl:if
test="contains(child::Box/@name,'Application')">
			<xsl:text>Box with Application is avaialble
</xsl:text>
		</xsl:if>
		<xsl:if test="not(contains(child::Box/@name,
'Application'))">
			<xsl:text>Box with Application is not avaialble
</xsl:text>
		</xsl:if>

	</xsl:for-each>
</xsl:template>

Using the above code, 
I got the output Box with Application is not
available.. Can tell me the reason? why it is not
checking the Box with a name 'Application'..

Regards,
Raj


		
__________________________________________________________ 
Enjoy this Diwali with Y! India Click here http://in.promos.yahoo.com/fabmall/index.html

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.