Subject: RE: [xsl] Using output URI resolver within a servlet From: "Anita Lund" <anita.lund@xxxxxxx> Date: Mon, 12 Apr 2004 18:04:47 +0200 |
I guess the honest answer would be - because that was the best solution I could come up with ;) Well, I also tried to use the XSLT to create the parent frame and to split the original XML into XML/iframe. The XSLT was then used again to generated the contents of each iframe. However, this required saving the XML/iframe files locally on the client, and did not improve the overall performance. So yes, please give me a hint on how to do the same thing in pure XSLT and I will be forever grateful! Many thanks, Anita -----Original Message----- From: M. David Peterson [mailto:m.david@xxxxxxxxxx] Sent: Monday, April 12, 2004 4:42 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Using output URI resolver within a servlet Hi Anita, May I ask why you are using Javascript as part of a solution to break up your frames into IFrames? I can think of several methods right now that are 100% XSLT and would dynamically generate width and height as well as put them into the proper array of columns and rows so that they all fit nice and snug in the parent frame. I obviously don't know your complete situation but if you were able to take javascript out of the equation you might find yourself with a much simpler problem to solve on the server... Let me know if I can be of assistance in getting your XSLT to dynamically generate your IFrames. Best regards, <M:D/> -----Original Message----- From: Anita Lund [mailto:anita.lund@xxxxxxx] Sent: Monday, April 12, 2004 8:28 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Using output URI resolver within a servlet Thanks very much for your reply. I agree that running XSLT/frame is the most straight-forward way to go, but that depends on submitting one HTTP request/frame, as you point out in your message. However, my problem is that my HTTP request returns an XML stream which contains 1-N different components that the XSLT needs to splitt into as many iframes. I have this working using MSXML + JavaScript in the browser, but was hoping that I could move the transformation to the server side by using Saxon and xsl:result-document. Had also some wild dreams about being able to forward the secondary documents to the corresponding iframes (i.e. using an Emitter class) in order to bypass the need to store the files on disk, which I guess is a bit far-fetched in the context of servlets and HTTP requests... So am I trying to do the impossible, or just the unwise? Many thanks again, Anita Lund -----Original Message----- From: Michael Kay [mailto:mhk@xxxxxxxxx] Sent: Monday, April 12, 2004 2:55 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Using output URI resolver within a servlet I'm not sure if this is the right way to go about this problem. The browser will submit one HTTP request for each frame. I would normally be inclined to run one XSLT transformation in response to each request from the browser, generating the contents of that frame. The alternative, of generating all the frames during one transformation, and then presumably keeping the generated document somewhere (memory? disk?) until the browser requests it, seems intrinsically more difficult to manage. Apart from anything else, it's hard to know when to delete the documents to free up resources. Michael Kay > -----Original Message----- > From: Anita Lund [mailto:anita.lund@xxxxxxx] > Sent: 12 April 2004 11:40 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Using output URI resolver within a servlet > > Hi, > > I am trying to change the SaxonServlet so that it can handle > a stylesheet > creating multiple output documents using xsl:result-document. > I am using > Saxon7-9-1 running on Windows2000, using tomcat 4.1 as > servlet container. > > My goal is to return the main output directly to the browser via > ServletOutputStream. > The main output includes several iframes, which refer to HTML > files written > as secondary output documents during the XSL transformation. > > Currently, all output from the transformation (including > xsl:result-document) is returned to the browser and no files > are generated > on the server. > > As far as I understand the problem has something to do with the URI > resolver/systemId of the output stream. > > I have tried to set the systemId on the result object, and am > currently > trying to get the servlet to work using the > UserOutputResolver from the Trax > examples, without much luck ;) > > The href in xsl:result-document contains an absolute URI on the form: > file:///localhost:8080/{$path}/{$filename}.html > > Has anyone tried this before with success? > > Many thanks for your help in advance! > Anita Lund
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using output URI resolver, M. David Peterson | Thread | RE: [xsl] Using output URI resolver, Michael Kay |
[xsl] Concat values, James Paul | Date | [xsl] Comment nodes in XSLT files., Greg Alvord |
Month |