JSim RTML Reference Manual

This documents provides the complete current specification for the JSim Run-Time Markup Language (RTML).

Prerequisites:

Contents:

  • RTML Design
  • RTML Document Structure
  • page elements
  • text elements
  • table elements
  • pageButton elements
  • varButton elements
  • image elements
  • menu elements
  • Comments or Questions?
    Give feedback

RTML Design

Important note: RTML design is not yet finalized, so be aware that RTML created using the present document may need to be somewhat revised in for future JSim releases. The present document is not complete, but is intended to provide a starting point for a discussion of what the final RTML format should be. If you're interested in participating in this discussion, or designing tools that generate RTML, please contact the JSim development team.

RTML specifies content for a set of pages and (optionally) menus for navigating those pages. RTML pages are designed to meet the following criteria:

  1. pages are resizable based upon dynamic user magnification preference;
  2. amenable to the development of an interactive RTML editing tool (not yet available);
  3. superset of the functionality of XSIM configuration files (XSIM was a predecessor of JSim which provided model-specific markup);
  4. simplified design compared to XSIM.

RTML Document Structure

The root element of an RTML file should be named JSim . It has no supported attributes.

Within the JSim element, there may be one or more page elements and zero or one menu elements.

page elements

page elements contain the specification for content of a single RTML page. The JSim GUI currently allows the user to display only a single page at a time, although this may change at some future time.

RTML pages use an abstract coordinate system whose unit measure is the current font size of the JSim application. The default value is 12 points, but this is adjustable by the user via the "Project" tab "Preferences" menu. All items within an RTML page are rescaled whenever the use adjusts the current font size. The origin of this coordinate system is the upper left corner of the page. Coordinates are progressively larger moving right and down.

page elements support the following attributes:

  • name (required): the name of the page as it appears in menus and as it is referenced by pageButton elements (see below).
  • There is no current attribute for the overall size of a page. Pages are upper-left justified within the window provided for them within JSim.

The following elements are supported within an RTML page:

  • text : plain text;
  • table : a table of variable names, values and units.
  • pageButton : a hyperlink button to another RTML page;
  • varButton : a button associated with a model variable. Clicking the button will display additional information about the variable.
  • image : a pixel-based graphic image;

Example:

      <page name="Exchange vessel">
         <text pos="12 2.5" text="Very simple RTML page"/>
      </page>

 

text elements

text element specifies arbitrary text within a page. This element supports the following attributes:

  • pos (required) : the (space separated) X and Y coordinates of the element within the abstract coordinate system.
  • text (required): The text to be displayed.

Example:

      <text pos="1.5 8" text="Electrolux. Better living today..."/>

 

table elements

table element specifies a table of variables. Tables consist of three column: names, values and units. The vertical size of the tables is dependent upon the number of variables in the table in an, as yet, undocumented way. The width of the table is the sum of the widths of the three columns, as determined by the widths attribute. This element supports the following attributes:

  • pos (required) : the (space separated) X and Y coordinates of the element within the abstract coordinate system.
  • widths (required) : the (space separated) widths of the names, values and units columns within the abstract coordinate system.

table elements must contain one or move var elements, each one representing a variable to appear in the table.

var element represents a single variable within a table. var supports the following attributes:

  • name (required): name of variable within the model;
  • text (optional): the text to appear within the table's name column. If blank, this defaults to the value of the name attribute.

Example:

      <table pos="60.4 24.6" widths="10 7 0">
        <var name="Flow">
        <var name="Vprime" text="V'">
      </table>

 

pageButton elements

pageButton element specifies a hyperlink to another RTML page. This element supports the following attributes:

  • pos (required) : the (space separated) X and Y coordinates of the element within the abstract coordinate system.
  • name (required): Name of page to jump to.
  • text (optional): The text appearing on the button. If blank, the text defaults to the name attribute.

Example:

      <pageButton pos="10 15" name="Exchange vessel"/>

 

varButton elements

varButton element specifies a button associated with a variable. Clicking the button will display additional information about the variable. Such buttons are very useful in conjunction with images to provide interactive model diagrams. This element supports the following attributes:

  • pos (required) : the (space separated) X and Y coordinates of the element within the abstract coordinate system.
  • name (required): Name of associated variable.
  • text (optional): The text appearing on the button. If blank, the text defaults to the name attribute.

Example:

      <varButton pos="10 15" name="p_Kfed"/>

 

image elements

An image element specifies a pixel-based graphic image.

This element supports the following attributes:

  • name (required): Name of the image within the model image set. The actual image data (GIF, JPEG, etc) is stored in the project image set associated with the model. See Introduction to JSIM RTML for more information on loading image data into a model image set.
  • pos (required) : the (space separated) X and Y coordinates of the element within the abstract coordinate system.
  • size (required) : the (space separated) width and height of the element within the abstract coordinate system. Note that this is not the same as the pixel dimensions of the raw data. Images are rescaled by the JSim GUI to the specified width and height.

Example:

      <image name="myocyte" pos="0 10" size="20 10"/>

 

menu elements

menu element specifies a menu. The elements within the menu may be page references or sub-menus. There may be at most one menu in an RTML file. This menu will appear in the custom section of the "Pages" menu of the "Run Time" tab of a JSim model. If no menu is present in the custom RTML file, a default menu will be generated containing all the pages in the file. Attributes supported by menu are:

  • text (required): text for this menu as it appears in parent menu.

menu item may contain only menu and page sub-elements.

page element, within a menu, is a link to a page within the RTML document. The element supports the following attributes:

  • name (required) : name of page to jump to;
  • text (optional) : text appearing in menu item. If blank, defaults to value of name attribute.

Example:

      <menu>
        <page name="head" text="Your Head"/>
        <page name="torso" text="Your Torso"/>
        <menu name="Your Legs...">
          <page name="Left"/>
          <page name="Right"/>
        </menu>
      </menu>

 

Comments or Questions?

Give feedback

 

Model development and archiving support at https://www.imagwiki.nibib.nih.gov/physiome provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.