XP "For" loop support in xim...

  • Yasir Siddiqi

    Yasir Siddiqi - 2011-02-02

    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,

  • jimmy zhang

    jimmy zhang - 2011-02-02

    is "for" part of xpath 1.0 syntax?


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks