[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL: query part of string to return element
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
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
|