Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

概要

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="".

...

Detailed list of NXML to XAL Syntax changes as of 4.5.1

...

  • xal.xsd (NOT xal-core.xsd) defines the Core XAL Syntax
  • xal-java.xsd defines the Java extension of XAL
  • xal-html.xsd defines the HTML extension of XAL

...

は、Platform4.5のアプリケーション開発のため新しいXMLシンタックスを導入しました。この新しいシンタックスは XAL(eXtensible Application Language)として知られ、様々なテクノロジー上の Rich User Interface 開発を可能し、Nexaweb Universal Client Framework に対応するよう設計されています。今回は UCF は Ajax, Java、offline テクノロジーに対応しています。
XALの利点

  1. HTMLとCSS標準に準拠したクロステクノロジー シンタックス; 技術者には幅広く知られています
  2. Future ready(将来に備えてあります); 新しい技術もUniversalClient Frameworkで対応できます。
  3. シンプルで、統一性のあるシンタックス; 属性が読みやすく、レイアウトがより直感的です。

変更点概要

  1. 3つのスキーマが作成されました: Core、HTML、Java です。HTML と Java はそれぞれ特定の技術拡張を含みますが、コアは共有シンタックスで示されます。
  2. Root タグが NXML から XAL に変更されました。
  3. XAL シンタックスは namespace を必要としますが、NXMLは必要としませんでした。
  4. 統一性と使い易さのため、属性の名前をより CSS と JavaScript スタイルの名前と合致するよう変更されました。
  5. レイアウトシンタックスの開発と使用を簡素化するため、レイアウトマネジャとパネルが1つのタグに統合されました。これによりストラクチャと XModify sytnax が変更されました。
  6. Measure 属性は測定の1-4リストを対応するよう強化されました。NXML は1か4のみ対応でした。
  7. Measures はpx, pt, %等の HTML で利用可能なオプションを反映するため拡張されました。今回の Java では、px のみ対応していますが将来のバージョンでは HTML Measure の全てもしくは大部分に対応する予定です。 
  8. Macro、MCO、Data Binding、XInclude は変更されていません; それぞれ新しい namespace が作成されています。
  9. XUpdate は XModify に変更されました; シンタックスはそのまま残ります。
  10. Nexaweb Platform は引き続き変更なしでNXML シンタックスに対応しています。

NXMLからの移行
NXML から XAL に移行する時考慮する点は以下です:

  1. NXML ファイルと XAL シンタックスに変更する
  2. Namespace を新 namespace に移行する; デフォルトシンタックスは namespace が必要です;
  3. ファイル名をXUpdate をXModifyに変更する
  4. DOMAPIを使用するアプリケーションコードを新ストラクチャと属性に更新する
  5. XModify シンタックスを新ストラクチャと属性に更新する
  6. 今回は NFC は XAL 対応していない
  7. 表と SVG は変更していない; 引き続きnamespace=""で使用

変更詳細は以下をご覧ください。
 

4.5.1 での NXML から XAL へのシンタックス変更の詳細一覧

  1. 次の 3 つのスキーマが作成されました。CoreHTML、および Java です。コア スキーマには拡張子ポイントがあり、テクノロジ固有の要素と属性をサポートします。これらのスキーマは、nexawebxmlfull.xsd を置き換えます。
    • xal.xsd (xal-core.xsd ではありません) は、Core XAL シンタックスを定義します。
    • xal-java.xsd は、XAL Java 拡張子を定義します。
    • xal-html.xsd は、XAL HTML 拡張子を定義します。
  2. レイアウト マネージャと <panel> コンポーネントは、レイアウト マネージ ペインに置き換えられました。各レイアウト マネージ ペインは、基本的に NXML レイアウト マネージャ <panel> コンポーネントを組み合わせたものです。 
    • freePane
    • borderPane
    • cardPane
    • gridPane
    • horizontalBoxPane
    • verticalBoxPane
    • horizontalFlowPane
    • verticalFlowPane
  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:
    • rootPane (rootPane can also have multiple window-based children which are rendered at their x,y,height,width relative to the upper left corner of the rootPane)
    • desktopPane (desktopPane can also have multiple window-based children which are rendered at their x,y,height,width relative to the upper left corner of the desktopPane)
    • window
    • dialog
  4. Several attributes names have changed for consistency with HTML
    • enabled becomes disabled
    • margin becomes padding
  5. Attributes changed for general usability
    • increment becomes pageIncrement
  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).fontUnderlined is replaced by textDecoration上記のレイアウト マネージャの変更により、NXML で水平 flowLayout にデフォルト設定されていたコンテナが、soloPane から派生したコンポーネント (<left><right><top><bottom><tab> など) のように動作するようになりました。これにより、最初の子がコンテンツ領域全体に拡張されます。これは、次のコンテナに影響します。 
    • rootPane (rootPane には、rootPane の左上隅に対して相対的な xyheightwidth の値でレンダリングされた複数のウィンドウ ベースの子を含めることもできます)
    • desktopPane (desktopPane には、desktopPane の左上隅に対して相対的な xyheightwidth の値でレンダリングされた複数のウィンドウ ベースの子を含めることもできます)
    • window
    • dialog
  7. HTML との一貫性を考慮し、いくつかの属性名が変更されました。
    • enabled disabled に変更されました。
    • margin padding に変更されました。
  8. 一般的な操作に合わせて属性が変更されました。
    • increment pageIncrement に変更されました。
  9. いくつかのフォント スタイル属性が、構文的に HTML に近く、より用途の広いフォント スタイル属性に置き換えられました。ブール型の属性がなくなりました。これらがサポートする特定の値については、スキーマ ドキュメントを参照してください (Java プラットフォームと Ajax プラットフォームで異なります) 
    • fontUnderlined textDecoration に置き換えられました。
      • Java: "none" | "underline"
      • Ajax: "none" | "underline" | "overline" | "line-through" | "blink"
    • fontBold is replaced by fontWeight に置き換えられました。
      • Java: "bold" | "normal"
      • Ajax: "bold" | "normal" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900"
    • fontItalics is replaced by fontStyle に置き換えられました。
      • Java: "normal" | "italic"
      • Ajax: "normal" | "italic" | "oblique"
    • fontName is replaced by fontFamily に置き換えられました。
      • Java: "monospaced" | "serif" | "sans-serif" | "default" | "dialog" | "dialog-input"
      • Ajax: "monospaced" | "serif" | "sans-serif" | "cursive" | "fantasy"
      • Note: this will soon accept a comma delimited list
    fontSize remains, but now accepts font-measure units
      • メモ: これは、すぐにカンマ区切りのリストを受け取ります。
  10. 引き続き fontSize は使用されますが、フォントの測定単位を受け取るようになりました。
    • in Ajax: (size unit, pt, cm, mm, in, ex, pc, %)
    • in Java: (size units, pt)
  11. All color attributes dropped すべての色属性では "font" , and spell out という語が省略されます。また、HTML との一貫性を考慮し、"background" for closer consistency with HTML.とスペルアウトされます。
    • altBgColor becomes altBackgroundColor に変更されました。
    • altFontColor becomes altColor に変更されました。
    • bgColor becomes backgroundColor に変更されました。
    • highlightBgColor becomes highlightBackgroundColor に変更されました。
    • highlightFontColor becomes highlightColor に変更されました。
    • fontColor becomes color に変更されました。
    • fontColorDisabled becomes colorDisabled に変更されました。
    • selectedFontColor becomes selectedColor
    • titleBgColor becomes titleBackgroundColor
    • titleFontColor becomes titleColor
    All
    • に変更されました
  12. すべての "img" attributes now spell out the word 属性は "image" とスペルアウトされます。
    • img becomes image に変更されました。
    • imgBackground becomes backgroundImage に変更されました。
    • imgClose becomes closeImage に変更されました。
    • imgClosed becomes closedImage に変更されました。
    • imgDisabled becomes disabledImage に変更されました。
    • imgDisabledSelected becomes disabledSelectedImage に変更されました。
    • imgHeight becomes imageHeight に変更されました。
    • imgHint becomes hintImage に変更されました
    • imgIcon becomes iconImage に変更されました。
    • imgLeaf becomes leafImage に変更されました。
    • imgMax becomes maximizeImage に変更されました。
    • imgMin becomes > minimizeImage に変更されました。
    • imgOpen becomes openImage に変更されました。
    • imgOver becomes mouseOverImage に変更されました。
    • imgOverSelected becomes mouseOverSelectedImage に変更されました。
    • imgPressed becomes pressedImage に変更されました
    • imgPressedSelected becomes pressedSelectedImage に変更されました。
    • imgRestore becomes restoreImage に変更されました。
    • imgSelected becomes selectedImage に変更されました。
    • imgWidth becomes imageWidth に変更されました。
  13. DropShadow supported added to the the Java implementation of XAL:対応がXALのJava 実装に追加されました。
    • dropShadow
    • dropShadowOffset
    Size specification attribute values now require a suffix to identify units or coordinates. Java defaults to
  14. サイズを指定する属性値は、単位や座標を特定するために接尾にサフィックスを必要とします。
    Java のデフォルトは "px" です( and only supports "px" のみ対応します).
    HTML and JavaScript don't support a default and must specify one of the HTML supported units: JavaScript はデフォルト対応せず、HTML対応単位の"px","%", "em", or "pt". This affects the follow attributes:のうち1つを特定しなくてはなりません。これは以下の属性に影響します:
    • borderCorner
    • borderWidth
    • dropShadowOffset
    • height
    • padding
    • width
    • x
    • y
  15. Color specification attributes support more names in 色を指定する属性は Java よりも HTML/Javascript than in Java, they also support both RGB and Hex notation.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 でより多くの名前に対応しており、 RGB や16進表記にも対応しています。
  16. 境界タイプ(4つのリスト)は 1 から 4 までスペースで区切られた値(NXML は 1 もしくは 4 つのコンマ区切りの値にのみ対応)に対応するよう拡張されました。これは all | top/bottom, left/right | top, left/right, bottom | top, right, bottom, left. This affects the following attributes:を設定します。これは以下の属性に影響します:
    • borderColor
    • borderCorner
    • borderStyle
    • borderWidth
    • padding
  17. Orientation components now have a horizontal and vertical component instead of a base component with an orientation attribute
    • slider becomes horizontalSlider and verticalSlider
    • scrollBar becomes horizontalScrollBar and verticalScrollBar
    • toolBar becomes horizontalToolBar and verticalToolBar
    • splitPane becomes horizontalSplitPane and verticalSplitPane
  18. Container references changed from
  19. 表示方向のあるコンポーネントは、orientation 属性を持つベースコンポーネントのかわりに、
    horizontal vertical が付くコンポーネントを持つようになりました。
    • slider horizontalSlider, verticalSliderに変更されました。
    • scrollBar horizontalScrollBar, verticalScrollBarに変更されました。
    • toolBar horizontalToolBar, verticalToolBarに変更されました。
    • splitPane horizontalSplitPane, verticalSplitPaneに変更されました。
  20. コンテナレファレンスは[containerName]://[objectName].[method](arg1, ...) to から
    [containerName]:[objectName].[method](arg1, ...) . Examples include:へ変更されました。例:
  21. Chart and SVG are not part of the XAL language specification
  22. The document root node has changed from <nxml>, to <ui>.
  23. 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

...

  1. SVG XAL 言語仕様に含まれません。
  2. ドキュメントのルートノードは<nxml>から<ui>へ変更されました。
  3. Menubar シンタックス はスタイルを改善するため変更されました。以下の例では、”menu”はmenu barの項目を参照し、”popupMenu”は実際のポップアップを参照します。このため、stylesheetとapp内のスタイルがより簡単になり ます。”popupMenu”のスタイル変更は右クリックメニューと、menuBarからのpopupを変更します。”menuItem”は”popup Menu”を子として保有し、subMenuを作成することができます。

     

           <menuBar>
             <menu>
               <popupMenu>
                 <menuItem/>
                 <menuItem/>
                 <menuItem>
                  <popupMenu>
                   ...
                  </popupMenu>
                 </menuItem>
               </popupMenu>
             </menu>
           </menuBar>

...

  1. All MCOs are constructed.
  2. All MCOs then have their properties set.
  3. All MCOs then fire the onLoad event.

...

The following example demonstrates making MCO1 have a reference to MCO3. 99% of the time this sort of ordering stuff doesn't matter at all, but when it does, <declarations> are a necessity.

...


  1. CO は大部分の使用で、 <declarations> タグを必要としなくなりました。 NXML は <declarations> のみ対応していますが、XAL は <mco> タグで浮遊性 free-floating の発生を可能にします。
    • <declarations> は未だに有効な使用ケースがあります:オペレーションの順序が個々のMCO タグとは少し異なるグループとして、MCO を定義することができます。<declarations> に MCO が3つある場合、以下のようになります:
      1. すべての MCO が構築される
      2. すべての MCO のプロパティが設定される
      3. すべての MCO は onLoad eventが呼び出される
    • つまり、MCO1のonLoad eventにMCO3があることが分かります。なぜなら、すでにロードされているからです。
    • 以下の例は MCO1 に MCO3 を参照させているデモになります。99% のケースで、この種の順序付けはあまり問題になりませんが、このケースになった場合、 <declarations> は必要になります。
      <mco:declarations ...>  
        <mco:mco id="MCO1" ...>
          <mco:property name="McoPointer">#MCO3</property>
        </mco:mco>
        <mco:mco id="MCO2" .../>
        <mco:mco id="MCO3" .../>
      </mco:declarations>
      
  2. NFC does not support XAL に対応していません。

...

4.5.

...

2に導入されている追加シンタックスが変更されました。

table, tree, treeTable elements:

  • openImage is now expandedImage に変更されました。
  • closedImage is now collapsedImage に変更されました。
  • horizontalLines is now horizontalLineColor に変更されました。
  • verticalLines is now verticalLineColor に変更されました。
  • treeLines is now treeLineColor に変更されました。
  • resizeColumns is now resizeableColumns に変更されました。
  • swapColumns is now swappableColumns 

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

  • hGrabSpace is now gridHorizontalGrabSpace
  • vGrabSpace is now gridVerticalGrabSpace
  • vAlign is now gridVerticalAlignment
  • hAlign is now gridHorizontalAlignment
  • columnSpan is now gridColumnSpan
  • rowSpan is now gridRowSpan
  • flex is now boxFlex
  • name (when used in a cardPane) is now cardName は swappableColumns に変更されました。

Layout panelで表示可能なelement (レイアウト管理属性):

  • hGrabSpace は gridHorizontalGrabSpace に変更されました。
  • vGrabSpace は gridVerticalGrabSpace に変更されました。
  • vAlign は gridVerticalAlignment に変更されました。
  • hAlign は gridHorizontalAlignment に変更されました。
  • columnSpan は gridColumnSpan に変更されました。
  • rowSpan は gridRowSpan に変更されました。
  • flex は boxFlex に変更されました。
  • name (cardPane で使用される場合) は cardName に変更されました。

gridPane, flowPane, borderPane elements:

  • gapVertical is now verticalGap に変更されました。
  • gapHorizontal is now horizontalGap は horizontalGap に変更されました。

boxPane and flowPane elements:

  • align is now alignment に変更されました。

horizontalSlider and verticalSlider elements:

  • posMin is now minPosition に変更されました。
  • posMax is now maxPosition に変更されました。
  • pos is now position

all event attributes have been updated to reflect these changes

scroll position attributes:

  • scrollPosVertical is now verticalScrollPosition
  • scrollPosHorizontal is now horizontalScrollPosition

scroll pane position change event attributes updated to reflect this change

text alignment attributes:

  • alignHorizontal is now horizontalAlignment
  • alignVertical is now verticalAlignment

label attributes:

  • textPlacementHorizontal is now horizontalTextToImagePlacement
  • textPlacementVertical is now verticalTextToImagePlacement

Other notes:

  • colorDisabled is now disabledColor and is now only in the Java extensions
  • ignoreEvents has been moved from the Xal core to the Java extensionsに変更されました。

全てのevent属性はこれらの変更点を反映しアップデートされています。

スクロールポジション属性:

  • scrollPosVertical は verticalScrollPosition に変更されました。
  • scrollPosHorizontal は horizontalScrollPosition に変更されました。

スクロールウインドウポジションはこの変更を反映し event 属性を変更しています。

テキストアラインメント属性:

  • alignHorizontal は horizontalAlignment に変更されました。
  • alignVertical は verticalAlignment に変更されました。

ラベル属性:

  • textPlacementHorizontal は horizontalTextToImagePlacement に変更されました。
  • textPlacementVertical は verticalTextToImagePlacement に変更されました。

その他注意:

  • colorDisabled は disabledColor に変更され、Java extensions でのみ有効となりました。
  • ignoreEvents は Xal core から Java extensions に移動されました。