RE: [xsl] xpath: use translate() convert vbCrLf to <br>

Subject: RE: [xsl] xpath: use translate() convert vbCrLf to <br>
From: "Josh Canfield" <Josh.Canfield@xxxxxxxxxxxx>
Date: Tue, 23 Mar 2004 13:51:16 -0800
Try this link:
http://www.dpawson.co.uk/xsl/sect2/replace.html#d7115e13

translate() is not a pattern matching function, it takes a list of characters and replaces those characters from the list of supplied characters.

http://www.w3.org/TR/xpath#function-translate

<snippet>
The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate("bar","abc","ABC") returns the string BAr.
</snippet>

Josh

-----Original Message-----
From: R. Erick Emde [mailto:emder@xxxxxxxxxxxxxxxxxx]
Sent: Tuesday, March 23, 2004 11:51 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] xpath: use translate() convert vbCrLf to <br>


Hi there,
I'm exporting data from Access to XML. Most everything is ok, but I have
a memo field that has carriage returns (vbCrLf) in it. The carriage
returns show up in the exported XML. I need to replace them with
'&lt;br>'. I'm trying to use xpath translate(), but I can't figure out
the pattern for it to match on.
Any ideas?
TIA,
Erick

Current Thread