|
Subject: [xsl] Problem in define Node-set from variable number of params From: "Yang" <sfyang@xxxxxxxxxxxxx> Date: Thu, 29 Mar 2001 13:11:43 +0800 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Navigation facility using, Pravin Mahadeshwar | Thread | Re: [xsl] Problem in define Node-se, Jeni Tennison |
| [xsl] Navigation facility using xsl, tejas raval | Date | RE: [xsl] XALAN - obtaining the -XS, Tim Watts |
| Month |