[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Check a node in my XML contains a particular value!
Hi all, At present I am using <xsl:when test="starts-with(wcc/wcc-category-oid, 'CSE')"> and my research comes back with the usage of <xsl:when test="contains(wcc/wcc-category-oid, 'CSE')">, but this only checks that both string values are identical (I think, correct me if I am wrong). What I would like to do is check that the string value in my XML node contains a value :- My working XML <?xml version="1.0"?> <report-root> <wcc has-lessons="true"> <wcc-category-oid>CSE is what this is</wcc-category-oid> </wcc> </report-root> XSL <xsl:when test="starts-with(wcc/wcc-category-oid, 'CSE')"> What I want <?xml version="1.0"?> <report-root> <wcc has-lessons="true"> <wcc-category-oid>This is a CSE</wcc-category-oid> </wcc> </report-root> XSL <?> How do I check to see if the value CSE is within the node? Many thanks to all for any help. Kind regards, George XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|