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
Joined: Sep 03, 2003
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.