Filter a CSV list in XSLT

Posted by Tom W on Stack Overflow See other posts from Stack Overflow or by Tom W
Published on 2010-05-19T08:05:59Z Indexed on 2010/05/19 8:10 UTC
Read the original article Hit count: 155

Filed under:
|

Hello SO;

I'm trying to convert xml elements whose content is a csv list of identifiers, the exact form doesn't matter. I want to exclude every item that contains the character "/". The best I've come up with is

translate(./someElement, ",*/*", "")

but this has at least two problems; I'm pretty sure that xsl doesn't accept wildcards, and "," is an illegal character in xpaths.

Is there a straightforward way to do this sort of thing?

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xpath