RTXPS
Reference &
User Manual
    RTXPS  On-line Reference Manual

      Release Level 2.0
      Release Date 2012 06
      Revision Level 1.0
    Document was last modified on:   Sunday, 12-Aug-12 20:12 CEST

    HTML TEMPLATES

    Display pages as part of the interactive user dialog are based on HTML-style TEMPLATE files; these can include a number of embbed FUNCTION to provide access to the expert systems (XPS, RTXPS) dynamic Knowledge Base:

    PARSER commands available in the TEMPLATES

    Basic in-text DESCRIPTOR editing:

    • \value(DESCRIPTOR_NAME)
      fetches and displays the value of the DESCRIPTOR from the DATA-Table

    • \name(DESCRIPTOR_NAME)
      fetches and displays the display-name from the DESCRIPTOR-definitions

    • \unit(DESCRIPTOR_NAME)
      fetches and displays the unit of the DESCRIPTOR from the DESCRIPTOR-definitions

    • \ask(DESCRIPTOR_NAME)
      creates a trigger for the ASKBOX. When leaving the ASKBOX with the SAVE-Button, the value is directly stored to the DATA Table; the type (layout and function) of the ask box is determined (SHOULD BE) by the TYPE of the Descriptor:
      • S: symbolic, symbols only;
      • H: hybrid, symbols and corresponding numerical ranges;
      • V: variable, arbitrary text;
      • T: a larger (arbitrary) text block (1024 character ?
        NOT YET IMPLEMENTED ? see textarea(D) below: SIZE LIMITATIONS ?)
      • B: boolean, a simple 0/1, yes/no, on/off checkbox,
        see also:\checkbox(Descriptor) currently for symbolic ? Descriptors.

    • \text(DESCRIPTOR_NAME)
      creates a textfield with the given DESCRIPTOR_NAME and tries to fetch the stored VALUE from the DATA Table.
      If the DESCRIPTOR has a symbolic RANGE definition it creates a pulldown-menu with the symbolic values for that Descriptor.
      SHOULD NOR depend on values, but on the Descriptor TYPE: S = pulldowen; V = text box.

    • \askDate(DESCRIPTOR_NAME)
      Provides a calendar box from which a date value can be set for the DESCRIPTOR parameter. The date format is YYYY-MM-DD. A null value DESCRIPTOR will display the string "undefined".

    • \textarea(DESCRIPTOR_NAME)
      creates a textarea input field; The textarea will show the current value of DESCRIPTOR as a string. The DESCRIPTOR (if defined in the KnowledgeBase must be of type VARIABLE, or undefined (only in the RBO DATA TABLES). The size, format and other properties can be set using the \style(..css_format..) function call.

    • \checkbox(DESCRIPTOR)
      Displays a checkbox for user action and assigns the resulting value (yes/no, 0/1 ???) NOTE: there is currently no matching DESCRIPTOR of type: Boolean defined. To use (DON'T for now !) this construct, the TEMPLATE must first contain the DESCRIPTOR as literal string, then the checkbox with the DESCRIPTOR as argument.

    Configuration and GIS:
    • \setDescDB(KNOWLEDGEBASE)
      Providing this descriptor, you can control which Knowledge base the parser will use to parse the descriptors on your page.

    • \getSessID()
      Returns the current session's ID.

    • \include(FILE)
      includes the given FILE. PATH is relative to RBO/

    • \style(STYLE)
      adds the given STYLE (eg:width:100px;) to the next command (like \text or \textarea)
      Any valid Custom Style Sheet (CSS) formating text can be used as argument and formats the subsequent object accordingly.

    • \format(\value(DESCRIPTOR); type)
      Will format the value of the given DESCRIPTOR to the format type, where type is any legal floating point format. eg. \format(\value(DESCRIPTOR);%.1f) returns a numeric value of the DESCRIPTOR to the first decimal place.

    • readonly
      Marks a text field, text area, variable or any such component as not editable. readonly uses no parameters.
      Example:   <input type="text" name="readonlyTextName" value="readonlyTextValue" readonly>

    • \map([WIDTH])
      creates a mapserver call using GX,GY information and the MAPID from the OBJECT's LOCATION including a scalebar. Default WIDTH is 300px

    • \getScaledValue(\value(EXTENT_DESCRIPTOR); \value(ASPECT_RATIO_DESCRIPTOR))
      Returns the scaled value of the given DESCRIPTOR parameters.

    • \location_attr(ATTRIBUTE_NAME)
      returns any attribute of the OBJECT's Location
      LOCATION ATTRIBUTES include:
      • WHAT IS THIS ???

    Analysis:
    • \execute(CGI_FILE)
      This will enable the caller to execute the functions embedded in the .cgi file parameter, the results of which is used in the parser.

    • \executeParsed(CGI_FILE)
      This will generate dynamic .html files from the .cgi document and then parse the function calls within it.

    • \add(\value(DESCRIPTOR); \value(DESCRIPTOR2); ...;...)
      HOW IS THIS DIFFERENT FROM SUM (below) -- should be consolidated, drop ADD and convert all instances to SUM !)

    • \sum(\value(DESCRIPTOR); \value(DESCRIPTOR2); ...;...)
      Returns the sum of any number of (numerical) DESCRIPTOR values.

    • \sumPointEmission(DESCRIPTOR)
      Sums up the value of all instances where the DESCRIPTOR occurs. Example: \sumPointEmission(no_emission_gps), found in /templates/powerplant/powerplant.html.
      MAKES NO SENSE ! AGGREGATES CHILDREN ??

    • \mul(\value(DESCRIPTOR); \value(DESCRIPTOR2))
      returns the result of multiplying the values of the given DESCRIPTOR parameters

    • \sub(\value(DESCRIPTOR); \value(DESCRIPTOR2))
      will subtract the value of DESCRIPTOR2 from DESCRIPTOR

    • \div(\value(DESCRIPTOR); \value(DESCRIPTOR2))
      will divide the value of DESCRIPTOR by DESCRIPTOR2, can be used for normalising Descriptors (e.g., X per capita etc.)

    • \selector(STATUS;STATUS;GLOBAL.PROJECT_STATUS;project_status;\value(project_status))
      No sure what exactly this function call does. The above example call was found in templates/project_locations/project_attributes.html

    rbo.php:

    CALL: rbo.php?ID=&[CLASSID=]&[SELECT=1]

    this php-file does some pre-processing and provides the correct SAVE,COPY,DELETE,SELECT functionality (important for the TEMPLATE template/submit.html which provides the save, copy and delete button.

    • ID is the OBJECTID, without it you cannot run the PARSER
    • CLASSID is the CLASSID of the OBJECT if you want the PARSER to skip the lookup for the CLASSID in the RBO.RBO table
    • SELECT (see object.php)
    after the pre-processing it calls the PARSER (rbo.cgi) with the determined settings.

    rbo.cgi:

    CALL: rbo.cgi?ID=[&CLASSID=]

    • ID is the OBJECTID, without it you cannot run the PARSER
    • CLASSID is the CLASSID of the OBJECT if you want the PARSER to skip the lookup for the CLASSID in the RBO.RBO table


© Copyright 1995-2016 by:   ESS   Environmental Software and Services GmbH AUSTRIA | print page