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

XSL: query part of string to return element

Subject: XSL: query part of string to return element
From: "Carrie Kaufman" <ckaufman01@xxxxxxxxxxx>
Date: Tue, 24 Sep 2002 11:17:32 -0400
carrie kaufman
Hi. I am using XMLSPY (with Microsoft parser) to edit an existing stylesheet (XSL) that references several XMLs.

Essentially, I have a 'parent' element with sub-elements. I want to query a particular sub-element (which is a text string). As long as the text string BEGINS with a certain word, I would like for the parent element to be selected.

For example, the following code will select the parent element "attrlabl" when its sub-element "attrdef" has a value of "Navy."
<xsl:when test="attrdef[. = Navy]">
<xsl:value-of select="attrlabl"/>


This is similar to what I need - except the sub-element "attrdef" can have any number of words following "Navy." I have tried including wildcard symbols, and a number of other commands that do not seem to agree with the preexisting code.

For right or wrong, I am a novice, I have tried xsl:key, starts-with(),
context() . . . all to no avail.

Is it even possible to do this in XSL?

Thanks,
Carrie

G/I/S, Inc.
ckaufman01@xxxxxxxxxxx


_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com


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.