docs.roxen.comView this page in a printer friendly mode
DocsRoxen2.1Web Site Creator ManualRXML
Copyright © 2001, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

Parsing

RXML

RXML, RoXen Macro Language, is a functional serverside XML compliant scripting language that is built into Roxen WebServer.

RXML is made to be easy to learn, especially for people with skills in HTML, as its syntax and visible semantics is similar to HTML.

RXML consists of over one hundred different tags that in themselves are much more complicated than HTML-tags, but as simple to use as HTML-tags. RXML makes it possible to create new tags by writing modules in Java or Pike, or by making wrappers around, i.e. CGI-scripts with the <define tag> tag.

In this way the webdesigner's and the developer's work can be separated. The developer can bind code to RXML-tags which then can be used by the webdesigners. If taken into account that webdesigners often are better than developers at designing webpages than writing code and vice versa, it can be assumed that the developer never has to hard wire HTML code into the code.

RXML was designed with security in mind, thus it is a blessing to write complex and secure applications.

RXML Tags

RXML consists of many often simple tags, that when combined can create very advanced and dynamic webpages. Most chapters following this will discuss these tags.

Since the Roxen WebServer is highly modular (all functions, tags, etc are built into modules) it is possible to customize every aspect of the Roxen WebServer. Hence, if a tag isn't working, it is very possible that its module hasn't been loaded. The tag <help/> gives a listing of all tags enabled as well as the latest documentation available for those tags. Note that the <help/> tag only will give a listing of those tags written properly as modules, not those made with the <define> tag and similar tags.

RXML Naming Convention

In case of planning an upgrade from a Roxen 1.3 product to Roxen 2.1 this section should be taken into consideration.

In RXML 1.3, many attributes had different names despite them performing the same tasks and some tags had strange names that didn't reflect their functionality. Due to these and other internal inconsistencies a RXML naming convention has been created.

If a tag or an attribute has changed name it most probably is because of this convention. The tags that still don't conform to the naming convention have not yet been 'newstyled', i.e. converted to make full use of the RXML 2 parser.

  1. The tag and attribute name reflects the functionality as much as possible.

    E.g. although <pr> is easy to remember it does not in any way hint its functionality to the user, hence the change to <roxen>

  2. The tag and attribute name should be as easy to remember as possible. Attributes have the same name as their HTML counterparts. Attribute names are now more consistent in RXML tags.

    E.g. although the bg argument to <gtext> is easy to understand and remember it differs from bgcolor in HTML and other RXML tags.

  3. Tag and attribute names that consist of several words have been concatenated without a separator. If there for some reason is a need to use a separator, the "-" symbol has been used, for instance the "set cookie"-tag has been named <set-cookie> instead of e.g. <set_cookie>.

  4. RXML now uses assignment attributes instead of atomic attributes as it might be necessary to introduce more attributes in the future that are not compatible with the old ones.

    E.g. the case description is now <tag case="upper"> instead of <tag upper> since the latter made it possible to write <tag upper lower>, which isn't compliant with XML and used to produce a situation with undefined result for the user.