Subject: RE: [xsl] Rendering XML Server Side without using ASP From: "Chris Bayes" <chris@xxxxxxxxxxx> Date: Wed, 30 Jan 2002 13:02:44 -0000 |
> >> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Rendering XML Server Side, Andrew Welch | Thread | RE: [xsl] Rendering XML Server Side, Andrew Welch |
Re: [xsl] Date-sorting, cutlass | Date | RE: [xsl] Tracking Interelationship, Michael Kay |
Month |