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

dynamically change modes based on parameters? have def

Subject: dynamically change modes based on parameters? have default modes? how? short code examples please :)
From: "SANWAL, ABHISHEK (HP-Houston)" <abhishek.sanwal@xxxxxx>
Date: Thu, 11 Sep 2003 15:04:23 -0500
def of change
Yes. But I am having a bad time trying to use and push parameters
through other templates. Of course, I know now the way to "play" with
XSL.

But there is one important question.

There are multiple layouts I have inside these nested templates and I
need to conditionally apply certain kind of layouts using some
parameters. Now I am not sure if I can dynamically change the MODE that
applies for the next "nested" call to a template ( like this. )

<xsl:apply-templates select="./SectionBody"
mode={$SectionBodyModeParam}/>
<xsl:apply-templates select="./Paragraph" mode={$ParagraphModeParam}/>

Is this possible? If so then what is the correct syntax and way that I
can use params here.

{ OFF-TOPIC CURIOSITY
Is it possible to make an apply-tempaltes call to different kinds of
children except one ( I have that expression working), but push
different modes for each.

Is it possible to assign "default" modes that get called when that
template match only has a template without any mode defined?
}

If this is not (even if it is)... would it be better to call a 
single template (with no modes, but has internally different layouts it
that can be applied)  like so... 

<xsl:apply-templates select="./SectionBody"/>
<xsl:apply-templates select="./Paragraph" mode={$ParagraphModeParam}/>

...and have the templates use internal logic <ifs and chooses> to decide
between applying the template layout based on the parameters it was
passed ?

I am trying to create this paradigm of functions with
"variables/parameters of normal programming languages" with different
scopes of operation (global/local.. and specify accurately the scope of
the parameters) in the above, I think. Not completely successful yet,
but would like to see it happen.

:)

Thanks. Please do advise on the above

Abhishek Sanwal
HP - Houston Campus
abhishek.sanwal@xxxxxx

 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.