|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Check if a field matches "any" of a set of other entries
How can I check if a value matches any of a set of other values? Here is an example XML: <document>
<references>
<ref>a</ref>
<ref>b</ref>
<ref>c</ref>
</references>
<data>
<entry>x</entry>
<entry>b</entry>
<entry>a</entry>
<entry>z</entry>
</data>
</document>I want to print each entry in bold if it exists in the list of references, otherwise I want to print it in italics. Here is my pseudo-xml code: <xsl:for-each select="/document/data/entry"> if entry/text() equals any of the values in <references> set flag=true; </xsl:for-each> <xsl:if test(flag is true)> print the value in bold otherwise print the value in italics </xsl:if> Can I do that in XSL? Gerard Berthet 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
|

Cart








