| 
 
Subject: Re: [xsl] extending xsl with javascript From: april@xxxxxxxxxxx Date: Thu, 8 Nov 2007 13:03:06 -0500 (EST)  | 
Hi,
The branching logic refers to accessing different templates within a stylesheet depending on the usage scenario. For example:
<xsl:choose>
    <xsl:when test=[$pageMode='List']>
      <xsl:call-template name='ListPage'/>
    </xsl:when>
    <xsl:when test=[$pageMode='Edit']>
      <xsl:call-template name='EditPage'/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:call-template name='ErrorPage'/>
    </xsl:otherwise>
</xsl:choose>
I'm sorry if I didn't give a good example of why I want to use JavaScript within XSL, but it was the best example I could think of at the moment.
For the example above, how would you populate the pageMode variable ($pageMode) via JavaScript?
Thanks in advance for your help and sorry for the confusion.
Regards,
April
----- Original Message -----
From: "Steve" <subsume@xxxxxxxxx>
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Sent: Thursday, November 8, 2007 12:46:44 PM (GMT-0500) America/New_York
Subject: Re: [xsl] extending xsl with javascript
Could someone explain 'branching logic'?
-Steve
On Nov 8, 2007 12:45 PM, Colin Adams <colinpauladams@xxxxxxxxxxxxxx> wrote:
> That would be sensible if the OP's question were actually about XSLT,
> but it looks to me like it is actually a dynamic HTML question (and
> therefore off-topic here).
>
>
> On 08/11/2007, cknell@xxxxxxxxxx <cknell@xxxxxxxxxx> wrote:
> > Why not keep things simple and let XSLT do the branching?
> > --
> > Charles Knell
> > cknell@xxxxxxxxxx - email
> >
> >
> >
> > -----Original Message-----
> > From:     april@xxxxxxxxxxx
> > Sent:     Thu, 8 Nov 2007 12:11:14 -0500 (EST)
> > To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  [xsl] extending xsl with javascript
> >
> > Hi,
> >
> > I am interested using JavaScript with my xsl templates to control branching logic but do not have a clue where to start. For example one ability I'd like to create is to be able to access command line parameters to a page:
> >
> > myXML2HTMLpage.xml?mode=List
> >
> >
> > I have come across a couple of web sites but they all make my head spin (it is not pretty!) and I'm not sure if I'm ready to embrace a third party library (especially since hugs are no longer allowed in US schools...?)
> >
> > Can anyone suggest a good, introductory, place to start? hopefully with examples...
> >
> >
> > Thanks in advance for your help!
> >
> > Kind Regards,
> > April
| Current Thread | 
|---|
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] extending xsl with javasc, Steve | Thread | RE: Re: [xsl] extending xsl with ja, cknell | 
| RE: Re: [xsl] extending xsl with ja, cknell | Date | RE: [xsl] Template matching precedi, cknell | 
| Month |