Hi I have an XML with UTF-8 data in it and want to display it on a web page. The Labels for the page are stored in a Resource Bundle. Can any one tell me how to retrieve the Labels from the Resource Bundle properties files into XSL for XML Rendering.
Most of the Java based XSLT Processor has java extension, like XALAN or XT, you can read the labels files from XSLT using this extension tags. Not sure whether this is a efficient way...better wait for somemore comments.
There are a couple of things you can do: 1) use a helper class that creates a lokal XML file out of your resource bundle. You would need to run it only at deploy time. Then use document() in xlst to refere to it to pull the values. 2) In your code pull out the values from the resource bundle into a string that looks like xslt. Then transform your "real" xlst into a xlst that is language specific using the "string" from the resource bundle. (All in memory). Finally apply the xslt to your data Hth :-) stw
Gul Khan
Ranch Hand
Joined: Sep 03, 2003
Posts: 173
posted
0
Thanks Stephen and Balaji for your help. I hope that works or I will have to revert to JSPs and complete parsing and object creation for this small task.
Regards,
Gul
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Internationalization using XSL.. Help Plz