Closed jwrangel closed 7 years ago
Thank you very much for the detailed issue report and for pinpointing the problem.
I think I know a solution to this... let me try a couple of things and get back to you
Hi Cameron,
I am glad to help you improve that very, very useful tool! Let me know, if I can help/test/do something for you.
I also have another issue with importing from ODP but I can't see if it comes from swiper or if it is a Designer bug: If a view in ODP countains a 'queryviewformat' element, it won't get imported (silent, so the element is just missing).
<queryviewformat limitmaxrows="true" maxrows="1"/>
Do you know, what this setting is related to? Even Google knows almost nothing about it...
Cheers, Jan
Hi Jan, Thanks for your kind comments I am glad that it is useful to you and thanks for helping me improve it.
Could you please try this out for me, and if it works for you I will prepare a new release that incorporates this fix permanently.
Swiper works by performing an XSLT transformation on the DXL as it is exported. To do this It uses an XSL file that is contained within the Swiper plugin, but you can also supply a custom file if you want to filter a little differently.
Can you take the file that is attached to this comment, unzip it (I had to zip it because github would not let me attach .xsl) and save the DXLCleanV2.xsl file somewhere that your IBM Designer will be able to access. Then in Designer goto File -> Preferences -> Swiper and in the 'Custom XSLT Filter' you can browse to the file where you saved it.
This should then tell Swiper use your new file as the 'Instructions' on how to format the DXL. Obviously files will need to be exported again for the whitespace to be preserved
The xsl file is exactly the same as the previous file but with the following addition:
<!-- Preserve whitespace for javascript elements -->
<xsl:preserve-space elements="javascript" />
This tells the transformation NOT to strip whitespace for the javascript element. If this works for you then you can continue to use this file until I release the next version, and then also tell any other team members working on the same project to also use the same xsl file.
In regards to
If you can test it without Swiper e.g. make sure it exports without Swiper on, and then try to import and it also does not work, then it may be a problem with the 'DXL Roundtrip' which has been said to be imperfect. For example, I think agents that are configured to run 'all day' lose their scheduling after export and then import, so it could be a similar problem. However it would be good to rule out that Swiper is the cause, as it may be possible too.
Most of the information I know about DXL format I read in the 'The Domino DTD' help article available within designer and then also a helpful article on the domino wiki be Andre Guirard and then also my own trial and error :)
The new 'Sync Listener' capability of Designer 9.0.1 FP8, could actually be used to solve some dxl round trip problem, for example there is a 'Post Import' listener now available, so that if Swiper wanted to after import, it could check the DXL in the ODP and then programmatically set some properties on the Design Element if they were not imported properly.
It works for me after I added the namespace to the javascript element:
<!-- Preserve whitespace for javascript elements -->
<xsl:preserve-space elements="n:javascript" />
Now the markup for the field looks like this:
<field type="text" kind="editable" name="ShortDescription">
<code event="onChange" for="client">
<javascript>
</javascript>
</code>
</field>
aha good point I didn't think about namespace.
I will update the xsl and release a new version next week! thanks for your assistance
OK, let's close this issue as solved. The fix works fine! And I got a good starting point to do my own filtering :-):
The <queryviewformat limitmaxrows="true" maxrows="1"/>
comes from DB2 Views. I have no idea, why that element is saved to the ODP but now I got the chance to filter it.
Thank you for that quick fix!
When a form, item, .. contains a javascript property (ie. onChange), whitespace is stripped. This might lead to an empty element in xml, which cannot be imported - the Notes note will not be created or updated from ODP.
To reproduce:
Go to a field :
onChange
(set 'Client' : 'JavaScript'), enter a newline, save.Open the ODP form - the markup for the field is:
An import from ODP will fail (silent sometimes) due to an empty javascript-element.
Tested with swiper 2.0.1 and Notes Release 9.0.1FP8 SHF216