3 Replies Latest reply: Jun 3, 2013 9:58 PM by Dhanraj RSS

    Changing the XPath in Data

    Dhanraj
      Hi

      We have around 2000 variables that are mapped to the below XPATH. There is a change in the XPATH now and new nodes are introduced now.

      !//Request/XmlTransaction/Quote/Product/Form/FormMetaData/NonParseData/FormVariableData

      !//Request/XmlTransaction/Quote/Product*/Location/Section/*Form/FormMetaData/NonParseData/FormVariableData

      Is there any way where I can change all these XPATH's using the Documaker Studio Wizard. We tried exporting the FAP files and did a find and replace in all the files using Notepad and then imported them again but Studio doesn't show them properly.

      Before Export Data Mask

      VARIABLE 1
      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData/QE5837/FIRST_LIMIT_LIABILITY

      VARIABLE 2

      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData/QE5837/DATE_1_O

      VARIABLE 3

      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData/QE5837/EXCESS_LIMIT_LIABILITY

      VARIABLE 4
      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData/QE5837/DATE_2_O


      After Export in Studio

      VARIABLE 1
      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData/QE5837/FIRST

      VARIABLE 2
      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData

      VARIABLE 3
      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData/QE5837/EXCESS

      VARIABLE 4
      !//Request/XmlTransaction/Quote/Product/Location/Section/Form[FormId=QE5837]/FormMetaData/NonParseData/FormVariableData

      We could see that the search mask data gets truncated during the import. We are using Studio 12.1 on Windows Server and our resources are stored in UDB database in Solaris.

      Thanks in advance.
        • 1. Re: Changing the XPath in Data
          Sruthi
          Hi Dhanraj,

          It is not a good idea editting sections in notepad. If you want XPATH change through this mode, in addition to 'replace' action you will need to find the length of the XPATH you are going to replace. This information also you need to update accordingly in the line in which your XPATH is being replaced. Else when you check-in the FAP back to library, Studio will read only upto the length of previous XPATH.

          e.g: Length of below XPATH is 106
          !//Request/XmlTransaction/Quote/Product*/Location/Section/*Form/FormMetaData/NonParseData/FormVariableData

          Hope you are considering XDD concept in such scenarios.

          Thank you,
          Sruthi Jayasimhan
          • 2. Re: Changing the XPath in Data
            User9976634-Oracle
            Although I'm not sure I would recommend using Notepad to search and replace text, I'm not sure that is the problem. I would suspect that you may have fallen prey to word-wrapping in Notepad and that is why the subsequent use of the FAPs was unsuccessful. You would need to use a tool that does not rewrap the lines when loading or replacing the text.

            Next, your situation is one that points out the value of using the Extract dictionary (XDD) file. If all your mappings were defined there, then there would only be one file to change (or maybe a few depending upon need) rather than thousands of FAPs to change.
            • 3. Re: Changing the XPath in Data
              Dhanraj
              Hi Sruthi

              Modifying the length of the XPATH in the Field did the trick.We were unable to leverage the XhnD as these variables are specific to forms and are not shared.

              Thanks a lot.