Re: Beginner picking up xml/xsl project
What I did:
I first created a servlet (inherits HttpServlet) which writes XML code instead of HTML code. Works with IE6.
I then thought that was no good, and tried SAXON (you can do the same with XALAN, it works the same) as a simple Java app which takes two filenames (XML and XSL files).
Seeing that it was nice, I created what I call an XMLServlet: a class that inherits HttpServlet and implements doGet and doPost, leaving a new set of doGet and doPost with different parameters as abstract.
public abstract void doGet(HttpServletRequest req, XmlServletResponse res);
As you see, very similar. I created XmlServletResponse to my needs (mainly I should be able to do res.getWriter() ).
And I simply changed my first servlet to inherit XMLServlet instead of HttpServlet and to get an XmlServletResponse as parameter instead of a HttpServletResponse.
I liked the idea, and modified XmlServletResponse to leave the output untouched for IE6 and transform it otherwise (getting less server load the more IE6 clients I get).
That allows me to: - Debug the XML output by accessing it with an IE6. - Debug the transform by accessing it with anything else.
I explained the idea. If you would like to use my code, I would have to ask permission to disclose it. Do not hesitate to contact me (better directly as when I have too many messages I sometimes delete them without reading).
Antonio Fiol Bonnín
Scott Purcell wrote:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format