[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!

Subject: Check a node in my XML contains a particular value!
From: "Simpson, George" <GeorgeS@xxxxxxxxxxxxxxxxx>
Date: Mon, 13 May 2002 14:16:13 +0100
xml contains
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


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.