I'm using a "choice" site column with the multiple-check option enabled so that users can tag a list item with several choices from the column.
This column then powers a design feature in a content query webpart - where the column choice is appended to create an image filename.
- Choice1
- Choice2
- Choice3
- Choice4
becomes
<img src="http://mysite/content-Choice1.jpg />
The problem I've got is that the XSL parser is fed a string which has semicolons (;) and hashes (#) separating the choice values. If all 4 options were ticked, the string fed into the XSLT parser would be:
;#Choice1;#Choice2;#Choice3;#Choice4
How can I work through the string and separate each choice into its own XSL variable?
I've tried various substring-before functions, but I can't get anything working.
xsltquestions should have input source, desired output and relationship. This question is for an specific XSLT framework. As general XSLT question the answer is there is no way forHow can I work through the string and separate each choice into it's own XSL variable?. You could built a temporaly result tree (with extensions functions for XSLT 1.0) holding a elements for each "Choice" string. See questions about tokenizing in XSLT. - user357812