Forums Register Login

XML and XSLT with JSP

+Pie Number of slices to send: Send
Why would anyone want to integrate XML and XSLT with JSP ?
Any applications would be useful to know.
+Pie Number of slices to send: Send
There is a style of web application design which uses JSP to generate XML (or at least XHTML) which is then styled to suit the client or user preferences. This styling can either be done on the server (using a filter, for example), or on the client by providing a stylesheet to the browser.
+Pie Number of slices to send: Send
 

Originally posted by Frank Carver:
to suit the client or user preferences.


Would it be useful for generating content in different languages depending on the country ?
Or is there a better way to do this ?
regards
+Pie Number of slices to send: Send
 

Originally posted by HS Thomas:

Would it be useful for generating content in different languages depending on the country ?
Or is there a better way to do this ?
regards


You'd better use ResourceBundles for that.
You might use a combination, taking the JSP to generate XML (though I prefer servlets for that) and reading the XSL to be used from a ResourceBundle (which can exist for each supported language).
You'd need to write the XSL sheets for each separate language though which is not good as XSL sheets contain logic and therefore you seriously increase the risk of things getting out of sync.
Better would be to have the generated XML contain the language specific data (retrieved from ResourceBundles or a database) and have a single XSL sheet parse it all (or maybe have 2, one for LtR and one for RtL languages as required).
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 803 times.
Similar Threads
XSLT vs JSP
XSLT in MVC model
XSLT as a JSP's murderer
xsl looping
XSLT in MVC model?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:49:03.