Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using Translate() function of XSLT ...

843834Dec 18 2006 — edited Dec 19 2006
Hi guys

I have an xml document that i am converting into an html document using XSLT. I need to replace the XML new lines(&#10) 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: '&#10' 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 :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2007
Added on Dec 18 2006
3 comments
1,224 views