[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Searching text within a node
Lee,
You can test whether a node set is empty by using the not() operator, as in test="not(Form/Names/LastName)" which would be true if no LastName elements existed. You could connect that with an 'or': <xsl:if test="'Smith'=Form/Names/LastName or not(Form/Names/LastName)"> This passes if 'Smith' is found as a value on a node in the set (Form/Names/LastName), or if that set is empty (no such nodes exist). That may not be exactly what you want, however. You need to specify exactly what you mean by the "non-existence of the node <LastName>". Cheers, Wendell At 04:13 PM 8/6/2009, you wrote: I have one more problem. I also need to test for the non-existence of the node <LastName> using an "or" on the "if" statement.
|
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
|