[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: set union? xslt 2.0
On Thu, 08 Apr 2010 10:25:48 +0100 David Carlisle <davidc@xxxxxxxxx> 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
|
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
|