Hi there,we exported a (complex) form (originally done in R5) using the DXL Exporter tool in Designer. When we tried to reimport it in code we got an error message:
Left margin cannot be greater than right margi
DXL importer operation failed
The message seems to be truncated (margi instead of margin). Anybody can provide a hint what happend?
stw
Subject: Found a solution and opened another can of worms
When examining the DXL closely I found an attribute in the table definition called r4spacing=“true”. When this property is set, the relative table width are ignored and the values from refwidth are used. And exactly this property causes the havok.Removing it will allow the import to complete.
However…
Since now the layout rules are different all the paragraph definitions are used and will blow your design. (Good time to get the intern to fix it).
Could be a nice way to cleanup…
stw
Subject: A couple of embarassing situations
The last character of messages are indeed getting chopped off in the error logs. There was a fix done in one place that uncovered a latent bug in another place, and unfortunately, it went undiscovered and shipped that way for a release. It is fixed in 6.55.
The implications of r4spacing=‘true’ are explained in the DTD:
r4spacing: When true, specifies that the table uses R4 spacing rules.
When r4spacing=‘true’, the margins of all s contained within the table
are ABSOLUTE values (i.e. relative to the left edge of the entire document).
Normally, the margins of all s contained within tables are RELATIVE
values which are offsets from the left edge of the table cell.
r4spacing affects s as well - see the refwidth attribute.
r4spacing is ignored for fixedright or fixedcenter tables, which did not exist in
R4.
It was I that defined that behavior. My bad. I honestly have never been able to totally reconstruct the thought process that led me to doing it that way, and I was sure it was right at the time, but now it’s pretty clear that I misunderstood. We have actually deprecated r4spacing in 7.0 and replaced it by a user4spacing attribute that really only affects the “Use R4 spacing in table” checkbox in the GUI, without any extra fiddling with margins, etc. We have tried to make r4spacing=‘true’ still work as best as we can in the Importer for legacy data, but when 7.0 is out you will be better to re-export the data to get the new behavior.
Subject: RE: A couple of embarassing situations
Hi Dick,I feel your pain and I forgive you for that design decission. On the bright side: your design gave me the opportunity to deepen my knowledge of XSLT which increased my skills.
I simply removed the r4spacing and the refwidth using XSLT and fixed the spacing. So the design is cleaned up now.
But of course, there’s something on my wishlist you could do! Why not write an developerworks article describing in detail DXL constructs. Does a always end with a new line? Is a needed before a table? I’m sure with a little understanding notes forms could be cleaned up a lot using XSLT.
PM/IM me to discuss details.
stw