[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using contains() with for-each
Hello, I'm working with this XML (simplified): <keyrec> <keyword>APT1</keyword> <desc>Appt: Setup:</desc> <keywd_type>X B</keywd_type> </keyrec> <keyrec> <keyword>APT2</keyword> <desc>Appt: Confirm</desc> <keywd_type>B</keywd_type> </keyrec> <keywd_type> may contain the letters B, R, X, any combination of the three (separated by spaces), or nothing at all. My (working) XSL contains the following: <xsl:for-each select="//keywordtable/keyrec[keywd_type='B']"> Now I need to alter it so it's looking for records that *contain* B rather than equaling B. So I tried this: <xsl:for-each select="//keywordtable/keyrec[contains('B', keywd_type)]"> But this brings up records that contain *only B* or *nothing at all*. What am I doing wrong? Thanks in advance! Kathryn ******************************************************* This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. *******************************************************
|
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
|