[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using contains with more than one string - XSLT2.0
I've done some googling on this but nothing seems quite to match what I want to do. At the top of my style sheet I have this: <xsl:variable name="target" select="'Photo'"/> Then later I do this to find all titles with that string in them: <xsl:for-each select="//dsc//unittitle[contains(normalize-space(.),$target)]"> So far so good, works great. The problem comes when I want to tell the contains function to match on any one of several strings, e.g. Photo or Neg or Film. So far I have tried the following but none of them work: <xsl:variable name="target" select="'Photo|Neg'"/> <xsl:variable name="target" select="'Photo'|'Neg'"/> <xsl:variable name="target" select="'Photo' or 'Neg'"/> <xsl:variable name="target" select="'Photo Neg'"/> If I must, I can stick the or'ed terms directly in the contains function rather than using a variable, but when I tried a few variations on that, they didn't work either. Thanks Michele +++++++++++++++ Michele Combs Lead Archivist Special Collections Research Center Syracuse University Libraries 315-443-2081 mrrothen@xxxxxxx scrc.syr.edu
|
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
|