This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jun 14, 2017, 3:06 AM
3 Posts

DXL Import Format

  • Category: Notes Client
  • Platform: Windows
  • Release: 9.0
  • Role: Developer
  • Tags: DXL
  • Replies: 5

I have created a richtext with table and rows using xml. The button is triggered by users and it was working fine in R6.5. However, after Notes client has been upgraded to R8.5.3/R9 and regenerate the content using the button, the format of the richtext has been messed up. The document cannot be opened and "Table is Malformed" occurred.

After study the code and export the DXL data of the document, i fine out that most of my <pardef> element were gone.

Below are part of my xml code:

<document xmlns="http://www.lotus.com/dxl" version="6.5" form="content">
 <item name="body">
  <richtext>
   <pardef id="1" leftmargin="0.7500in"/>
   <pardef id="2" leftmargin="0.05in"/>
   <pardef id="3" leftmargin="0.7500in">
    <code event="hidewhen">
     <formula>!@Contains(@UserNamesList; "CN=V/O=XXX")</formula>
    </code>
   </pardef>
   <section expanded="false">
    <sectiontitle pardef="1" borderstyle="gradient" color="#C0E1FF">
     <font style="bold" name="Arial" pitch="variable" truetype="true" familyid="20"/>
     <text>Information</text>
    </sectiontitle>
    <table widthtype="fitmargins" cellbordercolor="#ffffff">
     <tablecolumn width="33.33%"/>
     <tablecolumn width="33.33%"/>
     <tablecolumn width="33.33%"/>
     <tablerow>
      <tablecell borderwidth="0px">
       <par def="2">
        <actionhotspot hotspotstyle="none" regionid="1">
         <code event="click">
          <formula>@Command([FileOpenDatabase];"Server":"Abc.nsf")</formula>
         </code>
         <run> XYZ</run>
        </actionhotspot>
       </par>
       <par>
        <region regionid="1" end="true">Application Z</region>
       </par>
      </tablecell>
      <tablecell borderwidth="0px">
       <par def="2">
        <actionhotspot hotspotstyle="none" regionid="1">
         <code event="click">
          <formula>@Command([FileOpenDatabase];"Server":"dfe.nsf")</formula>
         </code>
         <run> ABC</run>
        </actionhotspot>
       </par>
       <par>
        <region regionid="1" end="true">Application X</region>
       </par>
      </tablecell>
      <tablecell borderwidth="0px"/>
      <tablecell borderwidth="0px"/>
     </tablerow>
    </table>
   </section>
  </richtext>
 </item>
</document>

 

The XML is working fine in R6.5 with DXL below (part of XML code in tablecell):
<tablecell borderwidth='0px'>
       <pardef id='23' leftmargin='0.0500in'/>
       <par def='23'>
        <actionhotspot hotspotstyle='none' regionid='2'>
         <code event='click'>
          <formula>@Command([FileOpenDatabase];"Server":"Abc.nsf")</formula>
         </code>
        </actionhotspot>
       </par>
       <pardef id='24' leftmargin='0.0500in'/>
       <par def='24'>
        <region regionid='2' end='true'>Application Z</region>
       </par>
      </tablecell>

 

Compare to the same DXL that generated in R8.5.3/R9, there are numerous of <pardef> were missing and cause the table is malformed:
<tablecell borderwidth='0px'>
       <par def='2'>
        <actionhotspot hotspotstyle='none' regionid='2'>
         <code event='click'>
          <formula>@Command([FileOpenDatabase];"Server":"Abc.nsf")</formula>
         </code>
        </actionhotspot>
       </par>
       <par def='2'>
        <region regionid='2' end='true'>Application Z</region>
       </par>
      </tablecell>


What is the main reason causing this DXL been different in later version of Notes client?

 

Please help~~!!

Thanks,

Edeline

Jun 15, 2017, 1:36 PM
323 Posts
Does the pardef exist elsewhere in the DXL?

It sounds like the paragraph definitions may have been defined elsewhere in the DXL.

Not sure what's happening. I guess the basic experiment I'd make would be a simple export agent and a simple import agent, and see if the doc export/imports. If it doesn't, that could indicate a problem.

Jun 16, 2017, 2:50 AM
3 Posts
<pardef> auto generated in 6.5, but not in 9.0

In my XML code, I did not specifically create <pardef>.

When I have exported the DXL of the document that generate in R6.5, every tablecell has <pardef> in it and the richtext work fine with the table.

<?xml version="1.0"?>
<document xmlns='http://www.lotus.com/dxl' version='6.5' maintenanceversion='4.0' replicaid='4825711E0030D646' form='content'>
 <noteinfo noteid='1b36' unid='F2C39492DF71B6B34825813E003904E9' sequence='1'>
  <created>
   <datetime>20170613T182248,09+08</datetime>
  </created>
  <modified>
   <datetime>20170613T182248,14+08</datetime>
  </modified>
  <revised>
   <datetime>20170613T182248,13+08</datetime>
  </revised>
  <lastaccessed>
   <datetime>20170613T182248,14+08</datetime>
  </lastaccessed>
  <addedtofile>
   <datetime>20170613T182248,14+08</datetime>
  </addedtofile>
 </noteinfo>
 <updatedby>
  <name>CN=Ww/O=XXX</name>
 </updatedby>
 <item name='body'>
  <richtext>
   <pardef id='1'/>
   <par def='1'/>
   <pardef id='3' leftmargin='0.7500in'/>
   <section>
    <sectiontitle pardef='3' borderstyle='gradient' color='#c0e1ff'>
     <font style='bold' name='Arial' pitch='variable' truetype='true' familyid='20'/>
     <text>Information</text>
    </sectiontitle>
    <table widthtype='fitmargins' cellbordercolor='white'>
     <tablecolumn width='25%'/>
     <tablecolumn width='25%'/>
     <tablecolumn width='25%'/>
     <tablecolumn width='25%'/>
     <tablerow>
      <tablecell borderwidth='0px'>
       <pardef id='23' leftmargin='0.0500in'/>
       <par def='23'>
        <actionhotspot hotspotstyle='none' regionid='2'>
         <code event='click'>
          <formula>@Command([FileOpenDatabase];"Server":"Abc.nsf")</formula>
         </code>
        </actionhotspot>
       </par>
       <pardef id='24' leftmargin='0.0500in'/>
       <par def='24'>
        <region regionid='2' end='true'>Application Z</region>
       </par>
      </tablecell>
      <tablecell borderwidth='0px'>
       <pardef id='25' leftmargin='0.0500in'/>
       <par def='25'>
        <actionhotspot hotspotstyle='none' regionid='3'>
         <code event='click'>
          <formula>@Command([FileOpenDatabase];"Server":"dfe.nsf")</formula>
         </code>
        </actionhotspot>
       </par>
       <pardef id='26' leftmargin='0.0500in'/>
       <par def='26'>
        <region regionid='3' end='true'>Application X</region>
       </par>
      </tablecell>
      <tablecell borderwidth='0px'>
       <pardef id='22' leftmargin='0.0104in'/>
       <par def='22'/>
      </tablecell>
      <tablecell borderwidth='0px'>
       <pardef id='27' leftmargin='0.0104in'/>
       <par def='27'/>
      </tablecell>
     </tablerow>
    </table>
    <par def='1'/>
   </section>
  </richtext>
 </item>
</document>

However, these <pardef> do not exist in the exported DXL that generated in R9.0 and after tested, these missing <pardef> has caused the table in malformed error.

Should I create the pardef element in my XML code for the import action in R9.0?
 

Thanks, Edeline

Jun 17, 2017, 11:13 AM
21 Posts
First element in a rich text item cannot be a table

I know from my experience of working with DXL that a table element cannot be the first element in a rich text field.  It should always be preceded with a paragraph so if a paragraph is missing you should manually add it in your code before the table element begins.

 

Jun 19, 2017, 2:13 AM
3 Posts
It works!

Alex, Thanks for the tricks! I have added a <par/> before table element begin an it solved my problem!

 


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal