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:
- supports nearly all elements
- each element is a separate class, so new functionality can (and will be) implemented
- DOM-like access to the document (appendChild(), getElementById(), getElementsByTagname(), firstChild(), clone())
- methods to access and modify attributes
- validates attributes according to the XUL specs (can be enabled/disabled)
- supports namespaces for XUL elements
- supports inclusion of HTML
- supports Cascading Style Sheets
- docs of elements contain links to the official XUL reference
Future/planned features:
- Parsing of existing XUL documents so they can be modified
- support for all elements
- better support for DTDs
- more examples
- extended documentation
|