On Thu, 08 Apr 2010 10:25:48 +0100
David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:
<xsl;template
select="skillarea[tokenize(@targets,'|')=tokenize($param,'|')]"/>
if you're worried about repeatedly tokenizing the attributes probably
you can optimise this with a key or some such, or perhaps saxon will
optimise for you behind the scenes or perhaps it's fast enough anyway.
No problem with speed.
<grin/> Guess you mean
<xsl:template
match="skillarea[tokenize(@targets,'|')=tokenize($param,'|')]"/>
This is the 'odd' meaning of = in xslt 2?
If any item on LHS is present in RHS then = returns true.
Issue:
What happens with tokenize when the separator is missing?
empty set?
Resolve using if contains(@target,'|') then tokenize.... else ...
Getting rather messy since either could be a list.
I think this idea would work without a separator?
param = "term1 term 2"
@target="term1 oddone"
Would the equality work then? Currently strings, is this a case
where a sequence is needed?
--
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--