Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

XP "For" loop support in xim...

2011-02-02
2013-05-15
  • Yasir Siddiqi
    Yasir Siddiqi
    2011-02-02

    Hi,
    How can i use 'for loop' in XPath. I am using ximpleware_2.9_java KPIs.
    Here is my XPath query.
    for $sp in distinct-values(//CLR_TYPE) return (concat($sp,'=',count(/start/NexusDataRecord[SMS_CDR/CLRInfo/CLR])))

    I am getting following exception when i execute the code. Please check.

    for $sp in distinct-values(//CLR_TYPE) return (concat($sp,'=',count(/start/NexusDataRecord[SMS_CDR/CLRInfo/CLR])))
    Syntax error after or around the end of ==> for
    Feb 2, 2011 5:09:15 PM com.nexustelecompk.dex.XPathReader startProcessing
    SEVERE: null
    com.ximpleware.XPathParseException: XPath Syntax error: #27
            at com.ximpleware.xpath.parser.unrecovered_syntax_error(parser.java:491)
            at java_cup.runtime.lr_parser.parse(lr_parser.java:601)
            at com.ximpleware.AutoPilot.selectXPath(AutoPilot.java:692)
            at com.nexustelecompk.dex.XPathReader.startProcessing(XPathReader.java:96)
            at com.nexustelecompk.dex.XPathReader.main(XPathReader.java:66)

    Thanks & regards,
    Yasir

     
  • jimmy zhang
    jimmy zhang
    2011-02-02

    is "for" part of xpath 1.0 syntax?