docs.roxen.com
main | demo | docs
download | community | pike
© 2000 Roxen Internet Software
Suggestions, Comments or Complaints
manuals@roxen.com

DocsRoxen2.0Web Site Creator ManualIntroduction
   

  • Encoding
  • Parsing

    This chapter will describe how tags, scopes, entities and their attributes are parsed. To make it easier to understand how parsing in RXML works many examples will be provided.

    When RXML was redesigned to be XML compliant, many of the flaws was removed. Security issues has hopefully been removed as well as many odd quirks and behaviours.

    XML compliancy

    To be XML compliant, a set of requirements has to be fulfilled. At this moment the XML standard is not fully supported. Roxen is able to understand and parse all XML compliant code, but doesn't have any support for DTD-parsing. Also, the parser is very forgiving when it comes to demanding that the code follows the correct XML-syntax. The table below shows a subset of the most common differences between old RXML and the new XML compliant RXML.

    RXML 1.3 RXML 2.0 
    <accessed>  <accessed/>  
    <p>  <p>content</p>  
    <tablify nice>  <tablify nice="nice"/> or <tablify nice=""/>  
    <if supports=cookies>  <if supports="cookies"/>  

    Note that if a site has older RXML code it can still survive the move to the new system. By adding the RXML compatibility module the parser will understand the old syntax.

    RXML parsing

    The Roxen 2.0 RXML parser utilizes a top-down parsing approach. This means that the parser now uses preparsing instead of postparsing as in RXML 1.3. Repetitive parsing in output tags used to be a performance hog in RXML 1.3. The new parser now makes one analyze pass when doing output from a tag, instead of rescanning the output tag in every loop. This feature makes tags like <formoutput> unneccessary.

    These images below, shows some of the differences in RXML parsing between Roxen WebServer 2.0 and Roxen Challenger 1.3.


    Parsing '<!--' comments

    The old 1.3 RXML parser didn't recognize '<!--' comments and thus the <if> inside the comment is parsed and the first ignored. The 2.0 RXML parser consistently ignores code within comments. However, if the comment is a RXML comment, problems might arise while the parser are scanning the page for tags.


    Locating the closing tag

    When the parser comes upon a container tag it does a scanpass, without performing any parsing, to locate the closing tag. If the parser as shown below, finds another <if> inside a RXML comment it automatically looks for its closing tag thus believing the closing tag for the first <if> is further down the page. As the 2.0 parser can't find the last <if> tag it decides there are unmatching tags in the code and returns an unbalanced tag error message.


    Evaluating tags

    When the parser scans a page for tags it automatically evaluates the tag that it recognizes and stores the results for later use. Recognized tags are tags that are registered within the parser, mostly RXML-tags. Tags which the parser doesn't recognize, like HTML-tags, won't be parsed but their attributes will be stored. The 1.3 parser however, isn't that smart and will declare all unknown tags as text and hence the <if> tag will be found and parsed.

    Under construction

    This page is currently under construction. It will be completed soon. ;-)

    Details:
    - Always preparsing
    - No repetitive parsing
    - Contextsensitive entities
    - Support for streaming tags. No streaming tags exists yet