UIEvolutin Inc.
UJML Language Reference
XML Tags

XML tags are words and symbols used to create UJML elements.

Note: This is a quick introduction to XML tag markup. You should also search the Internet for more information and/or read some of the many excellent books on the subject. 

XML is a meta-language for developing your own information dialects. It was designed by the same people who designed HTML (the World Wide Web Consortium or W3C) and is very similar to HTML. In fact, modern versions of HTML are really XML. XML is a 'markup' language where you mark text with specially formatted 'tags', giving that text structure and meaning. 

XML tags are also known as 'elements'. These tags consist of a left angle bracket '<', a right angle bracket '>', and some text in between the brackets. For example, '<box>' is a UJML tag for a visual element that draws a rectangle on the device screen. 

XML tags usually come in pairs, with more tags or other text in between the pairs. For example, '<box> <width>10</width> <height>20</height> </box>' describes a rectangle that is 10 pixels wide and 20 pixels high. Note that the second tag in a pair starts with an angle bracket and a forward slash '</' instead of just an angle bracket '<'; this indicates that the second tag is an 'end tag'. Tags without the forward slash are 'start tags'. An 'element' is really the start tag, the end tag and everything in between them. 

Sometimes tags include extra information inside the tag, called 'attributes'. These are name value pairs separated by spaces consisting of a name, an equal sign '=' and a value inside of quotes (you can use single or double quotes). For example, '<event name="onSelect"> <script>foo();</script> </event>'. 

Sometimes an element consists of a single tag with no contents. In this case, the tag ends with a slash and an angle bracket '/>'. For example, '<var name="mPosX" type="int"/>' describes a UJML variable.

Comments

A comment tag in XML starts with an angle bracket, a 'bang' and two dashes '<!--' and ends with two dashes and an angle bracket '-->'. Everything between those characters is part of the comment and is ignored by UJML. For example, '<!-- This is a comment. -->'.

Document Type Declarations and XML Schemas

You define a special purpose dialect of XML using a Document Type Declaration (DTD) or an XML Schema. UJML is defined using a special DTD file with versions of the DTD for each version of UJML. This DTD may be found in the UJML installation directory for the version of UJML you are using. It defines the valid UJML tags and entities. See UJML Tags, Entities.

Tools, transformations and template languages

Because UJML is a special dialect of XML, you can create UJML with any tools designed for outputting XML. This goes beyond specialized XML editors to include transformation and templating languages like XSLT, JSP, and ASP.

Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
What do you think about this topic? Send feedback!