Subscribe via Feed

UPDATED: Transforming Domino Forms into XPages via XSLT

Paul Calhoun, Feb 7, 2010 4:02:57 AM

First I want to thank everyone who came to the XML and Web Services Jumpstart as well as the speedgeeking at Lotusphere 10.  I got a lot of great feedback.  Thanks !!!

One such feedback was about my process of transforming Domino Form Designs into XPages via XSLT.  When I developed the tool I took what I believed to be a logical approach and added all of the different field types to a Domino Form Design and then processed it with the XSLT stylesheet I created.

Everything came across, all of the fields were processed I was very proud.  Then someone at lotusphere asked me "Paul this process works great when the fields are defined on the form itself, but most of my forms have sub-forms and shared fields that don't seem to be transformed via your process.  How come?"

Then I had a real "well duh !!!" moment.  A Domino form that contains a sub-form or shared field does not include the field definitions for those elements, simply a reference to the sub-form or shared field.

Suddenly I was not so proud as I don't think I have ever developed a Domino form that did not contain a sub-form or shared field. 

So I have set out rectify this issue by adding the processing of sub-forms and shared fields to the transformation process.

If you are not familiar with the process see this article for detailed instructions.

So what is different about the new process is that when selecting design elements to be transformed, you can choose multiple elements.  Whatever you select will be included in the DXL to be transformed.

In the Domino Designer client open the application that contains the elements to be transformed.

Choose Tools | DXL Utilities | Transformer...

 

 

In the dialog box that opens select the primary form to be transformed

Next select any sub-forms to be included in the transformation

Last select any shared fields to be included in the transformation.  

Lastly choose the stylesheet from the list of available stylesheets to perform the transformation and click the OK button.

 

 

The fields from the selected sub-forms and selected shared fields will be at the bottom of the transformed XPage. 

I'm working on a way to get them "in-line" but wanted to get this solution out there as soon as possible.

The new XSLT stylesheet is called "DominoDBDXLToXPageWithSubForm.xsl" and is available from my web sitein the downloads link.

Once again thanks for all of the feedback and I will continue to try and improve this process.

 



3 responses to UPDATED: Transforming Domino Forms into XPages via XSLT

Sushant S. Bangalorkar, August 5, 2010 7:39 AM

I have in my application , a bunch of computed subforms depending on a field value set in the form? How may I replicate the same on an Xpage having datasource as the form ?


Paul T. Calhoun, February 7, 2010 10:43 PM

Stephan,
The DXL is never saved / stored as this process is using the DXL Utilities built into the domino designer client. I believe I'll be able to walk the DOM inline, just didn't have time before I wanted to get this out in the public space.


Stephan H. Wissel, February 7, 2010 2:33 PM

Actually getting subforms and shared fields in place is doable, but you might need a few extra steps. In xslt you can refer to an external file using the document() function. So when you come across a shared field ref or a subform you construct the document pointing to that element and process the document.
You probably need to have all DXL exported to make that work (DXLMagic to the rescue, it even splits the stuff nicely for you -- working hard to make it a DDE plug-in).
If you have all DXL exported you only need to run the transformation against the form. It will pickup the subforms/fields as needed.