Tag library name: context-taglib


Index of Tags and Functions.
Tags
  1. OMS.
  2. OMV.
  3. out.
  4. scope.
  5. set.
  6. value.



Authors:
NameInstitutione-mailRole
E. Reinaldo Barreiro Technical University of Eindhoven (TU/e) info@mathdox.org Main author



Description:

A JSP tab library to access and work with variables in a context. This tag library is used in MathDox to implement context.

A context is a tree structure with variables defined at each node of the tree. The tree structure corresponds to the hierarchical representation of documents in chapter, sections, pages, etc.




Download and Install:

Download:

The whole tag library project is available for dowloading, as tar.gz or as a zip file, here .

General INSTALL information:

This tag library is designed to be used in JSP pages compliant with the JSP 2.0 specification.

To get this tag library working you will have to copy the jar files

Jar fileDownloadDescription
context-taglib.jardownloadThe tag library jar file.
om-lib.jardownloadROML jar file.

to the WEB-INF/lib/ directory on your web application.

NOTE: We advise you to use the versions of additional jar files comming with the tag library and not to download them directly from other of our related projects. By doing so, you may create imcompatibilities: though we will do our best to make sure a tag library is using the latest version of a jar file.

You will also need to copy the tld file context-taglib.tld to somewhere in the WEB-INF/ directory, for instance to WEB-INF/ itselft, and add to the web.xml file, in the part corresponding to the tag libraries, the following lines:

<taglib>
    <taglib-uri>URI identifying your tag lib</taglib-uri>
    <taglib-location>/WEB-INF/context-taglib.tld</taglib-location>

</taglib>
                            

For more information on how to modify the web.xml file peruse the documentation coming with your WEB server/container. For information on how to use tag extensions on your own JSP pages consult the JSP 2.0 specification.

Tag specific INSTALL information:

This tag library is to be used with MathDox documents please refer to the MathDox guide for further information on how to use and install it.




Tags


1-OMS (tag).
Description

Produces an OMS symbol but also a pointer to the CD were this symbols is defined.

Body Content:

EMPTY

Tag Class:

nl.tue.win.riaca.mathbook.context.taglib.OMSTag



Attributes:
NameRequiredDynamicDescription
cdtruefalse The cd where the symbol is.
includeReffalsetrue If a reference is included.
nametruefalse The local name of the symbol.


Examples:
Snippet 1:
     
        <cont:scope id="book/c1/s1/p1/"> 
          .
          .
          .
          <para>

            The expression
              <inlineequation>
                <OMOBJ>
                    <OMA>
                        <cont:OMS name="plus" cd="arith1"/>
                        <cont:OMV name="a"/>
                        <cont:OMV name="b"/>

                    </OMA>
                </OMOBJ>
              </inlineequation>...
          </para>
          .
          .
          .
        </cont:scope>        
     




2-OMV (tag).
Description

It is used to access a OMV variable present in a context. The default display of the variable is produced. An appropriate reference to the variable (in the context) is produced.

Body Content:

EMPTY

Tag Class:

nl.tue.win.riaca.mathbook.context.taglib.OMVTag



Attributes:
NameRequiredDynamicDescription
includeReffalsetrue Determines if a reference to the context is produced. The default value is true.
namefalsefalse The local name of the variable to be retrieved.


Examples:
Snippet 1:
     
        <cont:scope id="book/c1/s1/p1/"> 
          .
          .
          .
          <para>

            The expression
              <inlineequation>
                <OMOBJ>
                    <OMA>
                        <OMS name="plus" cd="arith1"/>
                        <cont:OMV name="a"/>
                        <cont:OMV name="b"/>

                    </OMA>
                </OMOBJ>
              </inlineequation>...
          </para>
          .
          .
          .
        </cont:scope>        
     




3-out (tag).
Description

Prints out the value of the variable. The value is normally a XML encoded OpenMath fragment (but it could be any string).

Body Content:

EMPTY

Tag Class:

nl.tue.win.riaca.mathbook.context.taglib.OutTag



Attributes:
NameRequiredDynamicDescription
escapeXmlfalsetrue If the XML must be escaped or not. True is the default value.
namefalsefalse The local name of the variable to be retrieved.


Examples:
Snippet 1:
     
        <cont:scope id="book/c1/s1/p1/"> 
          .
          .
          .
           <para> We have
            <inlineequation>

                <OMOBJ xmlns:cont="http://www.mathdox.org/MathBook/Context">
                    <OMA>
                        <OMS name="eq" cd="relation1"/>
                        <cont:OMV name="b"/>
                        <cont:out name="b"/>
                    </OMA>

                </OMOBJ>
            </inlineequation>....
           </para>
          .
          .
          .
        </cont:scope>
     




4-scope (tag).
Description

A container for context. It specifies the place in the tree were the actual page is (and in that way used to retrieve variables).

Body Content:

JSP

Tag Class:

nl.tue.win.riaca.mathbook.context.taglib.ScopeTag



Attributes:
NameRequiredDynamicDescription
idtruefalse The id.


Examples:
Snippet 1:

     
        <cont:scope id="book/c1/s1/p1/"> 
          .
          .
          .
          <para>
            The expression
              <inlineequation>
                <OMOBJ>
                    <OMA>
                        <OMS name="plus" cd="arith1"/>

                        <cont:OMV name="a"/>
                        <cont:OMV name="b"/>
                    </OMA>
                </OMOBJ>
              </inlineequation>...
          </p>

          .
          .
          .
        </cont:scope>        
     




5-set (tag).
Description

Sets the value of a variable.

Body Content:

JSP

Tag Class:

nl.tue.win.riaca.mathbook.context.taglib.SetTag



Attributes:
NameRequiredDynamicDescription
nametruefalse The local name of the variable.


Examples:
Snippet 1:
    
        <cont:set name="a">
            <cont:value>

                <parameters>
                    <param><c:out value="${param.a}"/></param>
                </parameters>
            </cont:value>
        </cont:set>

     




6-value (tag).
Description

This tag is used, in combination with the set tag, to modify the value of a variable.

Body Content:

JSP

Tag Class:

nl.tue.win.riaca.mathbook.context.taglib.ValueTag



Attributes:
This tag has no attributes.


Examples:
Snippet 1:
       <cont:set name="a" xmlns:cont="http://www.mathdox.org/MathBook/Context">
            <cont:value xmlns:c="http://www.mathdox.org/MathBook/Core">
                <parameters>
                <param><c:out value="${param.a}"/></param>
                </parameters>

            </cont:value>
        </cont:set>