329 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Blogs | Search | myPL | About 
 
Sorry, no records were found!
Latest 7 Posts
Green Light for a Red Pill
Sun, Oct 14th 2012 97
Dear IBM... Thank You and Sorry
Thu, Oct 11th 2012 126
The Power Of Notes - Part 18 Java
Thu, Oct 11th 2012 105
To Document or Not To Document - That was Rarely the Question.
Tue, Oct 9th 2012 82
The Free Lunch Is Over
Sun, Sep 23rd 2012 87
My Farts Smell Better Than Yours
Thu, Sep 20th 2012 88
Lotusphere 2012: Going Mobile
Wed, Feb 15th 2012 88
Top 10


The Power Of Notes - Part 15: DXL
Peter Presnell    

 Those of you who have started development using IBM XPages will know of the power that come from having both a Visual and Source Code perspective of their XPages and Custom Controls.  The Visual editor is familiar to those of us with a Note Classic background.  Its a (somewhat) WYSWYG approach to designing an application.  The source code editor is made for those of us that prefer to see an application laid out as code.  We are free to switch from one perspective to another as circumstances (or desperation) demands.  As an XPage novice I found myself inclined to work in the familiar visual editor.  Over time I used the visual editor less and less for XPages and now rely almost exclusively on the source code view.  Perhaps the biggest use I make of the visual editor is to quickly navigate around a large form (oops XPage).
 
 In many ways DXL (Domino XML) represents the "Source Code" view of Notes classic applications.  It is truly one of the hidden gems in Notes development.  One of the reasons it has not been more widely adopted is that IBM never finished the job.  Improvements continue to be made but as of Notes 8.5.2 there were still features of a Notes application that are still not able to be expressed via DXL.
 
The following is a random collection of some of the key capabilities of DXL along with some of the more obscure and not so well known capabilities it possesses:-
  • Since Notes 6 a set of DXL Utilities have been available in the Designer Client (under Tools) providing a quick way to View, Export, and Transform a selected design element.  This utility provides a way to view Notes Classic design elements as DXL.  To understand the complex structure of the DXL requires learning new concepts unique to DXL.  For example the rich text content of  Form, Subform, or Page includes the following DXL elements:
    1. A form can be broken into two FormRegions that represent the "Header" and "Body" components of a form.  Not used very often, Notes allows a developer to define an area at the top of the Form referred to as the "Header".
    2. Each Paragraph of text is referred to as "Par"
    3. Paragraphs with common styling/formatting are assigned to a "ParDef".  The actual styling/formatting is then defined once inside a separate Paredf element.
    4. When text inside a paragraph is assigned distinct styling. this is done through the creation of a "Run" tag.  Runs can be nested inside other runs based upon how you use the editor to assign styling to the text.
    5. When an element such as a hotspot is associated with a group of text that spans multiple paragraphs, but not necessarily all the text in each paragraph, this is represented as a "Region".  Each paragraph is assigned to a RegionID, the hotspot (or other element) is assigned to the region.  The beginning of the region is marked inside the first paragraph and the end of the region marked inside the last paragraph.
  • There is a section on DXL in the on-lone help for Domino Designner.
  • You can also find the DXL structures for each version of Notes in the xmlschemas folder where you have Notes installed.  This contains largely the same documentation found online but it can be a lot easier to navigate.  Note: The standard Eclipse editor (not DDE) has a better DTD/XSD viewer to navigate around the schema.
  • The new Eclipse editor now provides a DXL editor (under Tools) allowing developers to not only view the contents of design elements as DXL but to actually make changes to the code and save those.  Amongst the many useful things the DXL editor can be used are:-
  1. Making large scale changes to attributes such as font, color etc. using a Text find/replace instead of manually locating the elements in the visual editor and replacing them one at a time.
  2. Quickly locating all the LotusScript code in a design element.  e.g. searching for a call to a particular Function.
  3. Tracking down (and removing) all those hotspots that no longer surround any text
  4. Locating (and fixing) Hide-When formula
  • As mentioned in the introduction, DXL still remains incomplete.  The following are some of the features found in design element that are either represented as binary data (CData) or completely missing from the DXL code.
    1. Composite Application, Components and Wiring Properties
    2. Sametime Status
    3. Spacing for Checkbooxes and Radio Buttons
    4. Thumbnail sizes for RichtextLite fields
    5. Layout Regions
    6. Navigators (Workaround available)
    7. Most of the Notes Standard only properties such as Java Views, Split Actions, Outline Entry separators
    8. Margin below view header
    9. Currency Symbol for Number Fields
    10. Unusual Unicode characters such as ∙ or ∩
  • A large number of DOM (Notes) classes exist that facilitate access to the DXL for both data and design elements.  This includes the necessary components to export the code as DL, navigate/modify the DXL elements, and then import the new DXL code.  These can be invoked from both LotusScript and Java and form the basis by which a great many Notes utilities have been developed.  This includes Evolution Transformer, my current project at GBS in which we rely heavily on the use of DXL to transform Notes Classic applications into XPage applications.
  • Being XML it is possible to use XSLT as a way to transform DXL. XSLT can be used as a way of imposing coding standards to an application or even as a way of applying a stanard UI style/skin to a portfolio of applications.
  • Care must always be taken when importing any DXL transformed using XSLT as gaps in DXL support can result in some features being lost.
  • DXL provides a way to generate code factories to build all (or a part) of any application.  It forms a major part of how GBS's Evoloution Transformer transforms Notes Classic applications to XPages.  It was also used by Nathan Freeman and Tim Tripconny to develop Innova (demoed at #Ls10).
  • To get around the issue that DXL does not support Navigators, create a new page and then import that Navigator onto the page.  This creates an Image map from the navigator which can now be exported into DXL.
The Power Of Lotus Notes




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition