Infopath namespace prefix changes every update - InfoPath Dev
in

InfoPath Dev

Infopath namespace prefix changes every update

Last post 04-11-2012 05:53 AM by nadjaV. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-14-2011 09:31 PM

    Infopath namespace prefix changes every update

    I have an infopath form which is published in a sharepoint document library. I have a custom feature which automatically transfer infopath field values to a word document template. This feature needs an XML mapping (hardcoded) with Word Content Control and the Xpath with namespace prefix of the infopath field and this is uploaded in the same document library as well.

     Example of mapping (bold is the namespace prefix):

    <XMLIntoWordMapping pagesXPath="/my:myFields[1]">
      <mapping wordContentControlAlias="EmployeeFirstName" xPath="/ns1:myFields[1]/ns1:EmployeeFirstName[1]" />
      <mapping wordContentControlAlias="EmployeeLastName" xPath="/ns1:myFields[1]/ns1:EmployeeLastName[1]" />

    So with the above mapping, my infopath forms with the xpath below will work:

    /ns1:myFields[1]/ns1:EmployeeFirstName[1]

    /ns1:myFields[1]/ns1:EmployeeLastName[1]

     

    However whenever I have updates on the infopath template itself, it somehow changes the namespace prefix. So for instance, the existing infopath forms will have a ns1 as prefix, the new forms (updated template) will have either have ns2 or ns0 thus it doesn't match my XML mapping and doesn't export to word!

    Example: /ns2:myFields[1]/ns2:EmployeeFirstName[1]

    How do I make the namespace prefix standard so I can only use 1??

    Thanks.

     

     

  • 04-11-2012 05:53 AM In reply to

    • nadjaV
    • Not Ranked
    • Joined on 04-11-2012
    • Posts 1

    Re: Infopath namespace prefix changes every update

    I've got the same problem. Is it possible to tell IP to use ns1 instead of ns4 or ns5? It looks like it generated a new ns for each form I worked with. Any help is appreciated.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.