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

Problem in define Node-set from variable number of pa

Subject: Problem in define Node-set from variable number of params
From: "Yang" <sfyang@xxxxxxxxxxxxx>
Date: Thu, 29 Mar 2001 13:11:43 +0800
define variable number
Hi,

I have following problems in using variable params to define a node-set
variable
and need your kind advice.

First I use the the variable "condition" which is from a predefined
**select** attribute
and it works fine  when applying it to named template of productset.

But when I use the variable of "condition2" generated from various params
test, it fails.

Please someone offers helpful explanations and solutions.  Thanks.

The portion of xslt codes shown below for your reference;

<xsl:variable name="condition"
select="key('prodCode',$thisPP)[substring(@SalesOrderNo,10,2)=$month]"/>

<xsl:variable name="condition2"><xsl:attribute name="select">
<xsl:choose>
     <xsl:when test="string($office) and
string($month)">key('prodCode',$thisPP)[substring(@SalesOrderNo,1,4)=$office
][substring(@SalesOrderNo,10,2)=$month]</xsl:when>
<xsl:when
test="string($office)">key('prodCode',$thisPP)[substring(@SalesOrderNo,1,4)=
$office]</xsl:when>
<xsl:when
test="string($month)">key('prodCode',$thisPP)[substring(@SalesOrderNo,10,2)=
$month]</xsl:when>
<xsl:otherwise>key('prodCode',$thisPP)</xsl:otherwise>
</xsl:choose></xsl:attribute>
</xsl:variable>

<xsl:call-template name="productset">
<xsl:with-param name="datas" select="$condition"/>   <!--  this one works
with predefined conditions.-->
<xsl:with-param name="datas" select="$condition2"/>  <!--  this created
condition won't work.-->
</xsl:call-template>


Sun-fu Yang

sfyang@xxxxxxxxxxxxx



 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.