xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] set union? xslt 2.0


Subject: Re: [xsl] set union? xslt 2.0
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Thu, 8 Apr 2010 11:23:20 +0100

On Thu, 8 Apr 2010 11:08:45 +0100
Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:

> > Still leaves one side with a string...
> 
> Sure, but that's "the right way" to represent that in XML, then you
> can just pass in your delimited parameter and do:
> 
> select="skillarea[targets/target = $targets]"
> 
> where $targets is a top level variable created when you tokenize the
> param into a sequence of items.

Sneaky Andrew!
   tokenized param as="item()*"= element value.
Yes, that works. 
Thanks. 

I've now got Davids idea working. 

<xsl:apply-templates
select="skillarea[tokenize(@targets,'\|')=tokenize($targets,'\|')]"/>

since it's a regex, | needs escaping.

More than one way to skin a cat?

Thanks.




-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor