OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Xsl:when - Can I pass Conditions at runtime?

On 3/1/07, binu.idicula@wipro.com <binu.idicula@wipro.com> wrote:
> <xsl:param name="condition"/>

I usually use default values ;

<xsl:param name="condition" select="'no-condition'" />

>        <xsl:variable name="cond" select="$condition"/>
>        <xsl:variable name="val" select="$value"/>

Don't need these; use your params directly.

>        <xsl:choose>
>           <xsl:when test="$condition = $value">
>           </xsl:when>

This is just testing strings. To test XPath, you need to use an eval
function. Look at exslt functions for this.

You probably also want to ask in any of the XSL(T) groups for more
XSLT specifics.


 Project Wrangler, SOA, Information Alchymist, UX, RESTafarian, Topic Maps
------------------------------------------ http://shelter.nu/blog/ --------

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS