Subject: Re: [xsl] xml,browser and server From: "M. David Peterson" <m.david.x2x2x@xxxxxxxxx> Date: Thu, 7 Apr 2005 02:03:12 -0600 |
Your question has nothing to do XML or XSLT and really isnt even specific to anything else other than the fact that we know that the server is using Java via a servlet to do something in regards to a request from the client. > When client make request, the servlet > redirect only the xml file to client and > (As output client see xsl+xml=> html) This is a good thing. The client will cache the referenced stylesheet the first time it is referenced and use the now compiled stylesheet for subsequent transformations. The only thing left is for your server to send packets of data to the requesting client, how they are built or what they contain having nothing to do with how they get to the client. As such streaming in-memory xml or a static xml file to the client is completely transparent to the client. It makes a request for an XML and upon verifiying it is in fact what the client expects (well formed XML) it handles it as instructed via Processing Instructions contained in the XML or via default processing rules if no recognize PI's exist. With this in mind, what is the real concern? Are you desirous to server up custom XML that is built from a query sent from the client. Do you want to preload static XML in a server-side DOM document and then pass this into the HTTP_RESPONSE stream to avoid the cost of constantly serving up static XML files? I can assure you that what may appear as serving up the same file using the same "receive file requesat, locate file on hard drive, copy file into HTTP_RESPONSE stream, repeat for next is not what is actually happening. Modern day servers will cache often accessed information in ways that it can more quickly access and serve this content over the HTTP_RESPONSE stream. If it recognizes a file has changed via whatever mechanisms it may employ (timedate stamp, hashcode sum algorithm of some sort, etc...) then it will recache this file when it feels appropriate (next request of file or when it has an idle moment, etc...). You can of course optimize these settings but will need to look to your server manual to understand what can be done and how to do it. Of course there are different protocols for different types of transactions (such as a streaming audio file using a proprietary format) that are more efficient for their specific purpose, but in this case you are utilizing HTTP and as such you will find that you are limited somewhat to file compression using zlib(gzip) which will help speed up transfer times or using a complete optimization package like Squid that does much more as it is designed to utlize all sorts of strategies to speed up the transfer from the server and rendering time of the file on the client. Of course there are TONS of technologies that will help you better utilize the HTTP protocol but "streaming" XML via something other than HTTP will require some heavy handed hacking on your part or a couple million bucks to pay someone else to do this for you. If youre working with a couple million extra and need a custom protocol and server written for you, let me know, I'll hook you up ;) In the end you have a pretty efficient system using client-side transformations to transform the returned XML in which was requested. Unless you are dealing with some pretty heavy traffic I doubt much that you can do much better than letting your HTTP server do what it was designed to and as such does quite well: Handle requests for content that resides within its domain structure and send it back via a response stream. Hope this might help clarify things a bit :) Cheers :) <M:D/> On Apr 7, 2005 1:20 AM, shaygan shayganp <shaygan_shaygan@xxxxxxxx> wrote: > Hello, > i know it is not a list for server cases, > but my question is xml and browser depending, > and maybe somebody could help. > i create in a servlet an xml and a xsl file > ,save them to Server. > When client make request, the servlet > redirect only the xml file to client and > (As output client see xsl+xml=> html) > This waste driveer capacity > on server, because it increase more and more > xml files on Server side. > Know i thought to write xml fils > as Stream and write to client browser > (but xsl stylesheet stay as file on server) > is this possible?how? > thanks > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de > > -- <M:D/> :: M. David Peterson :: XML & XML Transformations, C#, .NET, and Functional Languages Specialist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xml,browser and server, shaygan shayganp | Thread | [xsl] [XSLT] xsl:message output enc, Laurent Laporte |
[xsl] xml,browser and server, shaygan shayganp | Date | RE: [xsl] doubt, Michael Kay |
Month |