[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Beginner picking up xml/xsl project

Subject: RE: Beginner picking up xml/xsl project
From: "Scott Purcell" <spurcell@xxxxxxxxxxxxx>
Date: Fri, 14 Jun 2002 13:11:36 -0500
akila scott
Yes,
I was hoping you could show me the technique that allowed the transformation to occur. Only if this is not asking too much.




-----Original Message-----
From: AXRAMAKR@xxxxxx [mailto:AXRAMAKR@xxxxxx]
Sent: Friday, June 14, 2002 12:37 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Cc: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx;
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Beginner picking up xml/xsl project



Are you asking me/Antonio?

Akila


                                                                                                                    
                      "Scott Purcell"                                                                               
                      <spurcell@xxxxxxxxxxxxx>          To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>                 
                      Sent by:                          cc:                                                         
                      owner-xsl-list@xxxxxxxxxxx        Subject:  RE:  Beginner picking up xml/xsl project     
                      rrytech.com                                                                                   
                                                                                                                    
                                                                                                                    
                      06/14/02 12:23 PM                                                                             
                      Please respond to xsl-list                                                                    
                                                                                                                    
                                                                                                                    




That sounds very good. Would I be asking too much if you were to post some
of the code for me to try and understand better?

Sincerely
Scott



-----Original Message-----
From: AXRAMAKR@xxxxxx [mailto:AXRAMAKR@xxxxxx]
Sent: Friday, June 14, 2002 12:00 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Cc: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx;
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Beginner picking up xml/xsl project



Scott,
This is what I did:
Wrote a servlet that handles requests and forwards it to a request handler.
The request handler is responsible fr interacting with the business layers
and getting a business object that represents the output results.
The request handler then uses the help of java classes called xml helpers
that convert this response object to xml and then apply style sheet. The
result is a string that contains the html and this is returned to the
request handler that returns it to the servlet and the servlet renders the
page.

Thanks,

Akila




                      Antonio Fiol

                      <fiol@xxxxxxxxxx>                 To:
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
                      Sent by:                          cc:

                      owner-xsl-list@xxxxxxxxxxx        Subject:  Re: 
Beginner picking up xml/xsl project
                      rrytech.com



                      06/14/02 09:55 AM

                      Please respond to xsl-list







I have done that.

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).

Yours,


Antonio Fiol Bonnín



Scott Purcell wrote:

>Hello,
>I have been given a task and I am looking for some helpful starting steps.

>
>I have picked up a web-based project that has some content being created
by reading a xml file into a stringbuffer, setting the content-type to
text/xml and printing the stringbuffer to the printWriter out.
>
>Inside the xml file there is a link to a stylesheet of type xsl (using a
lot of XPath transformation stuff).
>
>So the browser is doing all the work in presenting the display. The
problem is this only works for IE Browsers. I do not like this approach,
because the source is just xml, so it makes tracking of errors an issue.
>
>Is there a way to have the server read the xml file which should include
the xsl file and then throw that html to the browser?
>
>I am new to xml/xsl. App is written as a servlet in Java.
>
>Please advise of any directions.
>Thanks,
>Scott
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>.
>
>
>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.