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

RE: Rendering XML Server Side without using ASP

Subject: RE: Rendering XML Server Side without using ASP
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Wed, 30 Jan 2002 13:02:44 -0000
td class nowrap
> >> 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

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.