[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Using contains() with for-each
Subject: [xsl] Using contains() with for-each From: "Grant, Kathryn --- Sr. Technical Writer --- WGO" <Kathryn.Grant@xxxxxxxxxxxxxxxxx> Date: Tue, 26 Jul 2005 15:06:45 -0700 |
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. *******************************************************
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Dynamic import / include?, JBryant | Thread | RE: [xsl] Using contains() with for, Michael Kay |
Re: [xsl] Context node traversal in, Dimitre Novatchev | Date | RE: [xsl] Using contains() with for, Michael Kay |
Month |