Filter a CSV list in XSLT
- by Tom W
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?