[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: contains() function to search general in xslt
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|