Proposal for "XML_XUL"

» Metadata » Status
» Description
The XML User Interface Language (XUL) is a markup language for describing user interfaces. With XUL you can create rich, sophisticated cross-platform web applications easily.

XUL is currently supported by Mozilla and can be combined with RDF, CSS and JavaScript. You can find more information and examples on XUL Planet

XML_XUL will allow you to create XUL documents with object oriented PHP. There's an object for each element and the elements can easily be nested.

XML_XUL currently supports nearly all basic XUL elements and provides method to simplify the creation of complex objects like Tabbox, Grid, Listbox, etc.

This allows code like:

$grid = &$doc->createElement('Grid');
$grid->setColumns(3, array( 'flex' => 2 ), array( 'flex' => 1 ), array( 'flex' => 1 ));

/**
* adding one row of text
*/
$supes = array( 'Superman', 'Clark', 'Kent' );
$grid->addRow($supes);


This will produce:

<grid>
<columns>
<column flex="2" />
<column flex="1" />
<column flex="1" />
</columns>
<rows>
<row>
<description>Superman</description>
<description>Clark</description>
<description>Kent</description>
</row>
</rows>
</grid>


The same applies to trees and other objects that require several elements to be nested.

The features of XML_XUL at a quick glance:

  1. supports nearly all elements
  2. each element is a separate class, so new functionality can (and will be) implemented
  3. DOM-like access to the document (appendChild(), getElementById(), getElementsByTagname(), firstChild(), clone())
  4. methods to access and modify attributes
  5. validates attributes according to the XUL specs (can be enabled/disabled)
  6. supports namespaces for XUL elements
  7. supports inclusion of HTML
  8. supports Cascading Style Sheets
  9. docs of elements contain links to the official XUL reference


Future/planned features:

  1. Parsing of existing XUL documents so they can be modified
  2. support for all elements
  3. better support for DTDs
  4. more examples
  5. extended documentation
» Dependencies » Links
  • PEAR
  • XML_Util > 0.5.2
» Timeline » Changelog
  • First Draft: 2004-02-12
  • Proposal: 2004-02-22
  • Call for Votes: 2004-02-29
  • Stephan Schmidt
    [2004-02-29 16:04 UTC]

    The following changes have been made:

    * elementName is public (requested by Alan)
    * added getElementsByTagname()
    * added methods to dump the tree (print_r is too verbose)
    * changed children to childNodes and addChild() to appendChild() to match DOM names