tags:

views:

41

answers:

1

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?

A: 

In XPath 2 you can say :

 tokenize($s,",")[not(contains(.,"/"))]
Chris Wallace