2 Replies Latest reply on May 20, 2008 12:28 PM by jb1809

    Getting Incorrect result--XPATH to Get Number of Pages

    jb1809 Level 1
      Hello Developers,

      I'm getting incorrect results when using Livecycle XPath to get  the number of Page node in
      the following xml(Got the xml document by invoking DDX): (in test data getting value 0 instead of 3)

      [1] the xml
      [PID:-1] /process_data/xtextinfo - XML Document:       


      Document starting  Clause - 1 this is clause 1 . clause - 2 this is clause 2 clause - 3 this is clause 3 clause - 4  form 1
      PHFORM1PH this is clause 4
      clause - 5 this is clause 5 clause 7 This is clause 7 document All done   .



      [2] the process variable
      xtextinfo  : xml

      [3] the xpath to set the variable (variable is xnrpages : int ) to the number of Page elements in the xml document

      count( /process_data/xtextinfo/DocText/TextPerPage/Page )

      [4] value in the log

      [PID:-1] /process_data/@xnrpages - java.lang.Integer:       0
      2008-05-20 14:24:27,029 INFO  [com.adobe.idp.dsc.variablelogger.VariableLoggerService]
      2008-05-20 14:24:27,029 INFO  [com.adobe.idp.dsc.variablelogger.VariableLoggerService]

      [5] I am getting a value of 0; I expected to get a value of 3 (three Page element in the XML document).

      Let me know if you see the error I'm making.

      Thanks,
      Jesse