Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

XSLT and html new lines...

Hi guys
I have a standard xml document. A few tags in the document include quite a lot of text. for e.g

<ExampleTag>
1 first line
2 second line
3 third line
</ExampleTag>

Now when I convert this using xml spy(with an xslt transform template) into an html document, the html output looks like:

1 first line 2 second line 3 third line

As you can see the formatting is lost. How do I tackle this??

Should I check for ' ' character and then replace it with </br> html style? and if so then how??

Also as the document is very large I just want to make the check for just one specific tag and not the whole XML document.

cheers
[737 byte] By [alinaqvi90] at [2007-11-11 10:02:03]
# 1 Re: XSLT and html new lines...
adding to my original post I have found a xslt function:

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>'

any suggestions for the syntax guys??
alinaqvi90 at 2007-11-11 23:28:22 >