Re: [xsl] In Search of People Who Know About and/or Use the, Document Function

Subject: Re: [xsl] In Search of People Who Know About and/or Use the, Document Function
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 7 Sep 2007 15:39:14 +0100
On 9/7/07, M. David Peterson <m.david@xxxxxxxxxxxxx> wrote:
> On Fri, 07 Sep 2007 02:57:05 -0600, Alain <alainb06@xxxxxxx> wrote:
> > Big companies are already having XML-sites such as Blizzard :
> >
> I had heard rumors about this a while back.  *GREAT* to see them truly
> embracing the power of client-side XML processing!

It's got some real XSLT 1.0 gems in there:

<xsl:template name="flash">
<xsl:param name="id"/>
<xsl:param name="width"/>
<xsl:param name="height"/>
<xsl:param name="src"/>
<xsl:param name="quality"/>
<xsl:param name="base"/>
<xsl:param name="flashvars"/>
<xsl:param name="bgcolor"/>
<xsl:param name="menu"/>
<xsl:param name="wmode"/>
<xsl:param name="noflash" select="current()"/>
<div id="{$id}"/>
	<script language="javascript">

<xsl:value-of select="$id"/>
", "
<xsl:value-of select="$src"/>
", "
<xsl:value-of select="$wmode"/>
", "
<xsl:value-of select="$menu"/>
", "
<xsl:value-of select="$bgcolor"/>
", "
<xsl:value-of select="$width"/>
", "
<xsl:value-of select="$height"/>
", "
<xsl:value-of select="$quality"/>
", "
<xsl:value-of select="$base"/>
", "
<xsl:value-of select="$flashvars"/>
", "
<xsl:value-of select="$noflash"/>

That aside, constructing the page using client side calls to the
document() is certainly something I hadn't considered - it seems a
very modular almost MVC approach.

- The main page is just a barebones outline of the page
- Each component is populated by transforming a separate XML file eg
xsl:apply-templates select="document('sidebar.xml')"
- The XML for each component can be created on the fly

The massive downside of being at the mercy of whatever browser todays
visitor is using still applies, but it's the answer to your "does
anyone use/need the document() function on the client?" question.

Andrew Welch

Current Thread