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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling text with a carriage return in XSL

Status
Not open for further replies.

mcowen

Programmer
Oct 21, 2001
134
GB
I have a XSL page and I'm trying to populate a Javascript array with XML data. Unfortunately because the data (an address) contains a carriage return this all falls apart and the page doesnt load (there is a javascript error saying object expected). How can I get the element data and remove the carriage return in XSL before then going on to populate the array?

Thanks
Matt
 
Ok, this can be handled by the following

<xsl:value-of select=&quot;normalize-space(ADDRESS)&quot;/>

I can now assign this value to Javascript variables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top