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

RE: Client-side XSLT

Subject: RE: Client-side XSLT
From: Tom T <tomxsllist@xxxxxxxxxxx>
Date: Mon, 26 Sep 2011 09:55:02 +0100
RE:  Client-side XSLT
But could you not put an ixsl:onclick mode on a template elsewhere in the
stylesheet:
<xsl:template match="a[@href]" mode="ixsl:onclick">
Then inside that template disable the default behaviour of the href:
<xsl:variable name="event" select="ixsl:event()"/><xsl:sequence
select="ixsl:call($event, 'preventDefault')"/>
Then finally replace / append your destination image to the source using a
result-document command:
<xsl:result-document href="#IDFORIMAGEGOESHERE" method="ixsl:append-content">
This way you're not generating multiple pages containing the image from
scratch, rather, you're embedding the content you want to get to within an
existing 'template' html page, when it is requested.

----------------------------------------
> Date: Sun, 25 Sep 2011 23:38:56 +0100
> From: mike@xxxxxxxxxxxx
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Client-side XSLT
>
> On 25/09/2011 01:04, Mark wrote:
> > I have a stylesheet that generates XHMTL like:
> > <a href="../aip/635.htm">
> > <img src="../cr/small/635.jpg" alt="stamp image"/>
> > </a>
> >
> > Right now, clicking on the 635.jpg images opens the 635.htm page.
> >
> > The difficulty is that in the final project, the aip/n.htm files would
> > number more than 3000 if each were constructed individually. Those
> > pages are quite simple and contain only an image and a few lines of
> > text. What I am looking for is a way to launch an XSLT style sheet
> > that would build the page within the browser on demand.
> >
> > My idea is that clicking on the small/635.jpg image on my XHTML page
> > would launch a stylesheet to build the 636.htm page. I need some hints
> > on how to get started, where to look, or to know that this is not a
> > good idea.
> >
> You need to write some Javascript that responds to the onclick event and
> launches an XSLT transformation. You can't do this using the
> <?xml-stylesheet?> approach.
>
> Michael Kay
> Saxonica

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.