Overview

Nexaweb has introduced a new XML syntax for developing applications with Platform 4.5.  This new syntax, known as XAL for eXtensible Application Language, is designed to support Nexaweb's Universal Client Framework, enabling the development of rich user interface in a variety of underlying technologies.  At this time UCF supports Ajax, Java and offline technologies.

Benefits of XAL

  1. Cross technology syntax that conforms to HTML and CSS standards; familiar to a wide number of developers.
  2. Future ready; supports new technologies that will be included under the Universal Client Framework.
  3. Simpler and more consistent syntax; attributes are easier to read, layout is more intuitive.

Overview of changes

  1. Three schema's have been created: Core, HTML and Java.  Core represents the shared syntax while HTML and Java contain technology specific extensions to each.
  2. The root tag has changed from NXML to XAL.
  3. XAL syntax requires a namespace, NXML did not.
  4. Names of attributes have been changed to more closely match CSS and JavaScript style names for consistency and ease of use.
  5. Layout managers and Panels have been combined into one tag, simplifying development and usage of the layout syntax.  This does change the structure and XModify sytnax.
  6. Measure attributes have been enhanced to support 1 to 4 lists of measures, NXML supported only 1 or 4.
  7. Measures have been enhanced to reflect the different options available in HTML such as px, pt, %, etc.  Java supports only px at this time, but future versions will support all or most of the HTML measures.
  8. Macro, MCO, Data Binding and XInclude have not changed; new namespaces were created for each.
  9. XUpdate has changed to XModify; the syntax remains the same.

The Nexaweb Platform continues to support NXML syntax without change.

Migrating from NXML

The following is a list of considerations when migrating from NXML to XAL:

  1. Change NXML files to the XAL sytnax.
  2. Migrate namespaces to new namespaces; default syntax now requires a namespace.
  3. Rename XUpdate to XModify.
  4. Update application code that uses the DOM API to the new structure and attributes.
  5. Update XModify syntax to the new structure and attributes.
  6. NFC does not support XAL at this time.
  7. Charting and SVG has not been changed; continue to use with namespace="".

An exhaustive list of changes is below.

Detailed list of NXML to XAL Syntax changes as of 4.5.1

  1. Three schema have been created: Core, HTML, Java. The core schema has extension points for technology specific element and attribute support. These schema replace nexawebxmlfull.xsd.
  2. Layout managers and the <panel> component have been replaced with layout managed panes. Each is essentially the equivalent combination of an NXML layout manager and <panel> component.
  3. In conjunction with the Layout manager changes above, containers which in NXML defaulted to a horizontal flowLayout now behave like soloPane derived components (e.g. <left>, <right>, <top>, <bottom>, <tab>). This means the first child will be expanded to the entire content area. This affects the following containers:
  4. Several attributes names have changed for consistency with HTML
  5. Attributes changed for general usability
  6. Several font styling attributes are replaced with more general-purpose font styling attributes syntactically closer to HTML. These are no longer boolean attributes, refer to the schema documentation for the specific values they support (these vary between Java and Ajax platforms).
  7. fontSize remains, but now accepts font-measure units
  8. All color attributes dropped "font", and spell out "background" for closer consistency with HTML.
  9. All "img" attributes now spell out the word "image"
  10. DropShadow supported added to the the Java implementation of XAL:
  11. Size specification attribute values now require a suffix to identify units or coordinates. Java defaults to "px" (and only supports "px"). HTML and JavaScript don't support a default and must specify one of the HTML supported units: "px", "%", "em", or "pt". This affects the follow attributes:
  12. Color specification attributes support more names in HTML/Javascript than in Java, they also support both RGB and Hex notation.
  13. Bounding types (list of four things) have been expanded to accept 1 TO 4 space delimited values (NXML only supports 1 OR 4 comma delimited values). This specifies all | top/bottom, left/right | top, left/right, bottom | top, right, bottom, left. This affects the following attributes:
  14. Orientation components now have a horizontal and vertical component instead of a base component with an orientation attribute
  15. Container references changed from [containerName]://[objectName].[method](arg1, ...) to [containerName]:[objectName].[method](arg1, ...). Examples include:
  16. Chart and SVG are not part of the XAL language specification
  17. The document root node has changed from <nxml>, to <ui>.
  18. Menubar syntax has changed in order to improve styling. In the example below, "menu" refers to the item in the menu bar, and "popupMenu" refers to the actual popup itself. This should be easier to style both in a stylesheet and in the app. Changing the style for "popupMenu" will change it for both right-click menus and popups from a menuBar. "menuItem" can now have "popupMenu" as a child, which generates a subMenu.

     Example

<menuBar>
  <menu>
    <popupMenu>
      <menuItem/>
      <menuItem/>
      <menuItem>
       <popupMenu>
        ...
       </popupMenu>
      </menuItem>
    </popupMenu>
  </menu>
</menuBar>
  1. MCO no longer requires the <declarations> tag for most uses. NXML ONLY supported <declarations>, but XAL allows <mco> tags to occur free-floating.
  2. NFC does not support XAL

Additional syntax changes introduced in 4.5.2

table, tree, treeTable elements:

elements which can appear in a layout panel (layout management attributes):

gridPane, flowPane, borderPane elements:

boxPane and flowPane elements:

horizontalSlider and verticalSlider elements:

all event attributes have been updated to reflect these changes

scroll position attributes:

scroll pane position change event attributes updated to reflect this change

text alignment attributes:

label attributes:

Other notes: