[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] build a "dynamical" 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|