3

I just installed the Swiper Plugin on my Domino Designer FP7 and after some tests (maybe) I found a bug.

Unfortunately internal fields like $DesignerVersion and $$ScriptName get lost if you switch between branches!

Here my test scenario:

  1. Create a form (form1.form)
  2. Make an initial commit to a master branch
  3. Create an additional branch, e.g. develop
  4. Do some changes on the form1.form in the develop branch
  5. Commit this changes
  6. Switch back to master branch

After this steps the internal fields (mentioned above) get lost :(

Georg Kastenhofer
  • 1,387
  • 12
  • 32

1 Answers1

8

The attributes and elements that Swiper decides to 'swipe' away is controlled by using an xslt file.

The default xslt file does indeed choose DesignerVersion and $$ScriptName to be swiped.

DesignerVersion is swiped by default, because this will cause a lot of merge conflicts when you upgrade domino designer, or if one of your colleagues decides to install a fixpack that you didn't all of a sudden every file will have a conflict again that needs to be resolved.

Although there may be the argument that import/export behaviour may be different for each version, I would be skeptical to hear that IBM have made any changes to DXL importing / exporting in the last few years.

Regarding $$ScriptName, to be honest I can't remember why I included that to be swiped but it must have been annoying me. It hasn't caused any problem for me, but then again I don't do a lot of classic NSF development so maybe that actually does cause a problem when doing that.

Providing your own custom xslt filter:

If you don't want these 'swiped' then you can provide a customised xslt file Make a copy of the default file org.openntf.swiper/src/org/openntf/swiper/action/DXLClean.xsl

Then comment or remove the entries related to Designer version (there are more than one)

<xsl:template match="//n:form/@replicaid"/>
<xsl:template match="//n:form/@version"/>
<!--<xsl:template match="//n:form/@designerversion"/>-->

<xsl:template match="//n:database/@replicaid"/>
<xsl:template match="//n:database/@version"/>
<!--<xsl:template match="//n:database/@designerversion"/>-->
.... and so on make sure you do all of them

Then comment out / remove the one for $$ScriptName

<!-- Ignore the DesignerVersion Item  and this random FileModDT one -->
<xsl:template match="//n:item[@name='$DesignerVersion']"/>
<!--<xsl:template match="//n:item[@name='$$ScriptName']"/>-->
<xsl:template match="//n:item[@name='$ScriptLib_error']"/>
<xsl:template match="//n:imageresource/n:item[@name='$FileModDT']"/>
<xsl:template match="//n:imageresource/n:item[@name='$EditFilePath']"/>

Save this as a .xsl file somewhere Then in Designer go to File -> Preferences -> Swiper Under 'Custom XSLT Filter' browse to the location of your file and click apply / ok.

These rules will then take affect the next time swiper runs when a file is exported from NSF to the ODP. So you may need to force a save of a file, or deliberately 'swipe' a file to see the new results.

Cameron Gregor
  • 1,460
  • 7
  • 8
  • Nicely written up Cameron. – Eric McCormick Jan 17 '17 at 21:08
  • @Cameron: First of all thanks for your plugin. A last question: Do you think there could be some negative side effects swipe out system fields like `$DesignerVersion` or `$$ScriptName`? – Georg Kastenhofer Jan 23 '17 at 09:35
  • 2
    no problem Georg, here's an article that has some info on the fields. https://www-10.lotus.com/ldd/ddwiki.nsf/m_Home.xsp?documentId=29369AFF8E4874AB852574F30047C2E8#mobileViewer , for $$ScriptName i swiped it because it was a 'generated' field and not source code. it just means you might need to recompile all lotuscript after importing from ODP. one negative is that i think it does incorrectly swipe some javascript from old 'classic' web html notes forms. for designer version i haven't had a problem or had anyone report to me it caused a problem by swiping it. let me know if any more questions – Cameron Gregor Jan 23 '17 at 11:19