|
Subject: [xsl] How do you specify multiple attributes when using for-each? From: Kathryn.Grant@xxxxxxxxxxxxxxxxx Date: Fri, 26 Jul 2002 16:52:12 -0700 |
Hi all,
Here's a snippet from a simple xml file, which contains records for the US,
Canada, and Mexico:
<statecodes>
<coderec country="us">
<descr>ALABAMA</descr>
<code>AL</code>
<tndm_code>AL</tndm_code>
<nbr>01</nbr>
</coderec>
<coderec country="us">
<descr>ALASKA</descr>
<code>AK</code>
<tndm_code>AK</tndm_code>
<nbr>02</nbr>
</coderec><coderec country="canada">
<descr>SASKATCHEWAN</descr>
<code>SK</code>
<tndm_code>SW</tndm_code>
<nbr>59</nbr>
</coderec>
<coderec country="mex">
<descr>TLAXCALA</descr>
<code>TL</code>
<tndm_code>TL</tndm_code>
<nbr>NA</nbr>
</coderec>
</statecodes>
I have an XSL style sheet that selects only US records with the following
for-each statement.
<xsl:for-each select="//statecodes/coderec[@country='us']">
Now I need to create a new transformation that selects both US and Canadian
records. I have been looking for several hours for the way to specify
multiple attributes, but have been unsuccessful. I tried
<xsl:for-each select="//statecodes/coderec[@country='us' | 'canada']">
thinking that a Boolean "or" might work--but it didn't. Any help would be
appreciated!
Kathryn
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] How can I bend generate-i, Charles Knell | Thread | Re: [xsl] How do you specify multip, Joerg Heinicke |
| Re: [xsl] How to test a substring i, Gyan Jadal | Date | Re: [xsl] How do you specify multip, G. Ken Holman |
| Month |