Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

splitting up items separated by semicolon

Status
Not open for further replies.

machine08

Technical User
Dec 16, 2007
22
0
0
US
Hi All,

I'm trying to do some work with XSLT and Sharepoint. I currently get some output that is separated by a semicolon all in on row(i.e.: one;two;three;four)

I would like to change this via xslt to:
one
two
three
four

I'm very new to XSL. Could someone give me an example of how to accomplish this?

Thank you!
 
After doing some more research into this I think this might be possible to do via

<xsl:value-of select="substring-before(@Area, ';')" />


This grabs the first item in the string. The question I now have is how would I loop through the node to do this kind of string manipulation to the row and spit each value into a new row.

Thank you!
 
Hello k5tm,

Thank you for the link you sent me. It has made me start thinking of how to go about doing this. I have a lot of studyng to do with XSLT. I found another example that is exactly what I'm looking for:


Could someone help me understand when the a call to the template ProcessEachRow is made what $DelimeteredList is supposed to be. I plugged this code into my dataview but I get the following message:

"A reference to the variable or parameter 'DelimeteredList' cannot be resolved."

Thank you all for your help!
 
It is a reference to a <xsl:variable name="DelieteredList"> definition that occurs before the call-template in the portion of the XSLT that is omitted.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top