xsl-list
[Top] [All Lists]

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

2007-09-07 07:39:42
On 9/7/07, M. David Peterson <m(_dot_)david(_at_)xmlhacker(_dot_)com> wrote:
On Fri, 07 Sep 2007 02:57:05 -0600, Alain <alainb06(_at_)free(_dot_)fr> wrote:

Big companies are already having XML-sites such as Blizzard :
http://www.worldofwarcraft.com/index.xml

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">


                        printFlash("
<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"/>
")
                
                
</script>
</xsl:template>


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
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--