SBML.org — the global portal for all things SBML

Package mechanism

All additional packages besides the Core are built on top of the core. Conceptually, all packages are placed the same level in a hierarchy rooted under the XML namespace URI "http://www.sbml.org/sbml/level3". The versioning scheme for packages is as follows:

  1. The root version number in the SBML namespace URI refers to the version of the Core package. For example, "http://www.sbml.org/sbml/level3/version1" indicates the version of the SBML Level 3 Core package.
    • The URI for Version 1 of the Core package is "http://www.sbml.org/sbml/level3/version1/core" (i.e., including the component /core at the end), so that all package namespace URIs have the same parallel structure.
  2. All other packages are numbered sequentially using monotonically increasing integers, regardless of the version of the Core package.
    1. The first version of a package is version 1. (Example: SBML Level 3 Layout, Version 1.) The second version is Version 2, and so on.
    2. The XML namespace URI for a package is the concatenation of the root Level 3 URI, the package label (as listed in the Level 3 activity table), and the package version number. (Example: the URI for the Qualitative Models package, version 1, is "http://www.sbml.org/sbml/level3/version1/qual/version1".)
  3. When the version of the Core package is incremented, all packages must be reviewed and separately verified for compatibility with the new version of the Core. For each package, when it is revised to work with the new Core (or after it is determined that no changes are necessary), a new version of that package must be released in order to coincide with the new version of the Core. The version number of a package is not reset when the Core changes versions. For example, given a package P with version number N for Core version X, if a new Core version X+1 is released, P must be reviewed and a new version N+1 of P must be released before package P can be used with Core version X+1.

The diagram below illustrates the package version numbering approach:


The package numbering approach is designed to avoid confusion and ambiguity about which version of a package is usable with which version of the Core. Although the scheme does lead to a more rapid increase in version numbers than other possible numbering scheme, we believe this trade-off is worth it; in this approach, it is entirely unambiguous which version of a package corresponds to a given version of the Core.

Package declaration scheme

Level 3 will use a simple scheme for allowing models to indicate which packages are needed to properly interpret the model. The package declaration scheme uses XML namespaces and attributes. The scheme works like this:

  1. (This is a standard XML requirement.) A model must declare the XML namespaces used. The following is an example of one way to do this:
    <sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1"
          xmlns:types="http://www.sbml.org/sbml/level3/version1/types/version1"
          xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1"
          xmlns:render="http://www.sbml.org/sbml/level3/version1/render/version1">
      ...
    </sbml> 
    

    The namespace declarations are each prefixed with xmlns: followed by a tag name; this tag is then used as a prefix on every element and attribute belonging to that namespace.

  2. SBML Level 3 will require that every Level 3 package defines at least one attribute on the <sbml> element called required. This attribute will be used to indicate whether a given package is required for correct mathematical interpretation of the model, or whether the package is optional. If a package is declared as being optional, it means that the package can be ignored (i.e., not loaded, or not interpreted by the reading software) without any loss of meaning of the model's full mathematics. The following is an example:
    <sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1"
          xmlns:types="http://www.sbml.org/sbml/level3/version1/types/version1"
          xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1"
          xmlns:render="http://www.sbml.org/sbml/level3/version1/render/version1">
          types:required="true"
          layout:required="false"      
          render:required="false" >
      <model>
        ...
      </model>
    </sbml> 
    

    The above says that a tool reading the model must be able to understand the Types package to properly interpret the model, whereas understanding the Layout and Render packages is optional.

No declaration/inclusion is necessary for the Level 3 Core package, since it is the base package and support for it is required in any case. Thus, a model using only the Core package would not declare other XML namespaces, and would have no namespace:required attribute at all.

Retrieved from "http://sbml.org/Community/Wiki/SBML_Level_3_Core/Package_mechanism"

This page was last modified 00:51, 17 April 2014.



Please use our issue tracking system for any questions or suggestions about this website. This page was last modified 00:51, 17 April 2014.