using Translate() function of XSLT ...
843834Dec 18 2006 — edited Dec 19 2006Hi guys
I have an xml document that i am converting into an html document using XSLT. I need to replace the XML new lines(
) with html new lines (<br>) while the xslt transform takes place on my xml document.
For this I have found the translate function of XSLT but I need to use it on a specific tag and not all the tags in the xml document.
<ExampleTag>
1 first line
2 second line
3 third line
</ExampleTag>
translate(string, replaced_text, replacement_text)
so I need to get my tags value in the variable string which is:
1 first line
2 second line
3 third line
and replaced_text: '
' and replacement_text: '<br>'
but the problem is XSLT syntax is so bad that i just cant devote enough time to learn it. Any suggestions for the syntax guys?? an example would be extremely useful.
cheers :)