Altova Mailing List Archives
>xsl-list Archive Home
>Recent entries
>Thread Prev - RE: [xsl] Rendering XML Server Side without using ASP
>Thread Next - RE: [xsl] Rendering XML Server Side without using ASP
RE: [xsl] Rendering XML Server Side without using ASP
To:
Date: 1/30/2002 3:56:00 AM
Chris, Granted, and fair play for demonstrating your point as complete as this. I suspect that in this case the data would originally be held in a database, then converted to xml and sent to the client. So the processing is really performed serverside anyway. If the data is already held in xml, it would seem a waste to search the xml, produce more xml, then send that and the stylesheet to the client. Of course, if you want to offload processing from the server to the client then it is an option, but how much processing difference is there between producing xml output and sending two files and producing html output and sending one (bigger) file? cheers andrew === -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Chris Bayes Sent: Wednesday, January 30, 2002 1:03 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Rendering XML Server Side without using ASP > >> My > >> site used to do > >> this, but I found it too slow to send the XML and various > >> stylesheets to the > >> client each time, so I went for complete serverside. > > > >You must have had some strange xml and stylesheets. It is > not always the > >case but more often than not that if your xml and xsl is designed > >properly there will be less data on the wire if you send xml > and xsl to > >the client for transformation rather than sending the > transformed html. > > > >Ciao Chris > > I cant see how. In my a case a list of businesses, searched > by name 'Joe > Bloggs', will produce some HTML much smaller than the > original xml. I wont > claim to have designed it properly, but this seems obvious. > Maybe I dont > understand what you're saying..? > Well if you ship a whole database as xml to the client to only format say 10 records then you are right but if you only sent the 10 records and the stylesheet i.e. <?xml version="1.0" ?> <r> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> <b n="fred bloggs inc" a1="bloggs building" a2="bloggs road" a3="bloggville" t="1234567890" /> </r> + <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method = "html" encoding="Windows-1252" /> <xsl:template match="/r"> <html> <head></head> <body> <table> <xsl:apply-templates /> </table> </body> </html> </xsl:template> <xsl:template match="b"> <tr><xsl:apply-templates select="@*" /></tr> </xsl:template> <xsl:template match="@*"> <td class="someclass" nowrap="nowrap"><xsl:value-of select="." /></td> </xsl:template> </xsl:stylesheet> =1491 chars <html> <head> <META http-equiv="Content-Type" content="text/html; charset=Windows-1252"> </head> <body> <table> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> <tr><td class="someclass" nowrap>fred bloggs inc</td> <td class="someclass" nowrap>bloggs building</td> <td class="someclass" nowrap>bloggs road</td> <td class="someclass" nowrap>bloggville</td> <td class="someclass" nowrap>1234567890</td> </tr> </table> </body> </html> =2528 chars Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

