xsl-list
[Top] [All Lists]

RE: [xsl] Unable to do compund filter

2010-03-04 02:53:07

There is no "IN" operator in XPath. What made you think there was? Assuming
you're looking for an operator that tests whether the string on the lhs
equals one of the strings on the rhs, then:

If you're using XSLT 2.0, you want

select="G_REP_TRX_DETAIL_INFO[C_TAX_REPORTING_NAME = ($gds,$trng)]"> 

If it's XSLT 1.0, use

select="G_REP_TRX_DETAIL_INFO[C_TAX_REPORTING_NAME = $gds or
C_TAX_REPORTING_NAME = $trng)]">

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

-----Original Message-----
From: anil an.kumar [mailto:anil(_dot_)an(_dot_)kumar(_at_)oracle(_dot_)com] 
Sent: 04 March 2010 06:01
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Unable to do compund filter

i am trying to do compound filter.
i want filter the records based on C_TAX_REPORTING_NAME,

When i applied filter at for each it is giving error
 
 <xsl:for-each 
select="G_REP_TRX_DETAIL_INFO[C_TAX_REPORTING_NAME IN ($gds,$trng)]">
    <Grupa3>
      <P_Ua><xsl:value-of select="C_COUNTRY_CODE1"/></P_Ua>
      <P_Ub><xsl:value-of select="C_VAT_TAX_REG_NUM"/></P_Ub>
      <P_Uc><xsl:value-of select="sum(key('group', 
concat(C_VAT_TAX_REG_NUM,C_CUST_NAME,C_TAX_REPORTING_NAME))/C_
FUNCTIONAL_TOTAL)" 
/></P_Uc>
    </Grupa3>
    </xsl:for-each>
    
    it is giving below error:
    XML-22019: (Error) Expected ']' instead of 'IN '.
    

 =>    Even iam unable to do it in if condtion also,
    
 <xsl:if test="C_TAX_REPORTING_NAME IN ($gds,$trng)">
  .......
  </xsl:if>

it is giving the below error:
 Unknown expression at EOF: C_TAX_REPORTING_NAME IN($gds,$trng).
 
 
 Kindly advice


 Thanks
Anil
 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>