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

build a "dynamical" parameter

Subject: build a "dynamical" parameter
From: Michael Hoffmann <m-hoffmann@xxxxxx>
Date: Wed, 1 Nov 2000 09:55:40 -0400 (EST)
xsl translate a parameter
hi all...

i am really stuck at this..
what i have is 
.....
<xsl:variable name ="mystring" select="adress[child::*[translate(., $uc,
$lc) =translate($search_para_one, $uc, $lc)] or child::*[translate(.,
$uc, $lc) =translate($search_para_two, $uc, $lc)]]" />
....
this works perfect (many thanks to jeni again :-)  )

what i need is to replace the "or" with a variable, because i want to be
able  to 
have eihter the string "mystring" with "and" or with "or" in it.

so this means either i have to make sth like

<xsl:if test="$user_cmd=and">
<xsl:variable name ="mystring" select="CATALOG/CD[child::*[translate(.,
$uc, $lc) =translate($search_para_one, $uc, $lc)] and
child::*[translate(., $uc, $lc) =translate($search_para_two, $uc,
$lc)]]" />
......
</xsl:if>

<xsl:if test="$user_cmd=or">
<xsl:variable name ="mystring" select="CATALOG/CD[child::*[translate(.,
$uc, $lc) =translate($search_para_one, $uc, $lc)] or
child::*[translate(., $uc, $lc) =translate($search_para_two, $uc,
$lc)]]" />
......
</xsl:if>
			
so my question is :
can i make sth like
.........
<xsl:variable name ="mystring2" select="CATALOG/CD[child::*[translate(.,
$uc, $lc) =translate($search_para_one, $uc, $lc)] $user_cmd
child::*[translate(., $uc, $lc) =translate($search_para_two, $uc,
$lc)]]" />
.........
(the "user_cmd "is set either to "or" or "and" ) ????
any ideas ??? (i am sure there is a way... but i havnt found it...)

(it dont work this way, bacause i get a 
org.apache.xalan.xslt.XSLProcessorException: pattern =
'CATALOG/CD[child::*[translate(., $uc, $lc) =translate($search_para_one,
$uc, $lc)]     $user_cmd2 child::*[translate(., $uc, $lc)
=translate($search_para_two, $uc, $lc)]]'
Expected ], but found: $
error)

thanks for your help

michael




 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.