org.ejen.ext
Class Version

java.lang.Object
  |
  +--org.ejen.ext.Version

public class Version
extends Object

Ejen version utility (static methods).

Usage (XSL stylesheet)

  <?xml version="1.0" encoding="iso-8859-1"?>

  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  ...
                  xmlns:ver="org.ejen.ext.Version"
                  version="1.0">

    <xsl:output method="xml" encoding="iso-8859-1"/>

    <xsl:template match="ejen">

      <ejen-version>
        <xsl:value-of select="ver:toString()"/>
      </ejen-version>
      <ejen-high-version>
        <xsl:value-of select="ver:high()"/>
      </ejen-high-version>
      <ejen-low-version>
        <xsl:value-of select="ver:low()"/>
      </ejen-low-version>
      <ejen-version-status>
        <xsl:value-of select="ver:status()"/>
      </ejen-version-status>

    </xsl:template>

  </xsl:stylesheet>
 

Version:
1.0
Author:
F. Wolff

Field Summary
static int HIGH_VERSION
          High version number.
static int LOW_VERSION
          Low version number.
static String VERSION_STATUS
          Version status.
 
Constructor Summary
protected Version()
          Protected constructor (prevents instanciation).
 
Method Summary
static int high(ExpressionContext context)
          Returns the Ejen high version number.
static int low(ExpressionContext context)
          Returns the Ejen low version number.
static String status(ExpressionContext context)
          Returns the Ejen low version number.
static String toString(ExpressionContext context)
          Returns the Ejen high version number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIGH_VERSION

public static final int HIGH_VERSION
High version number.

See Also:
Constant Field Values

LOW_VERSION

public static final int LOW_VERSION
Low version number.

See Also:
Constant Field Values

VERSION_STATUS

public static final String VERSION_STATUS
Version status.

See Also:
Constant Field Values
Constructor Detail

Version

protected Version()
Protected constructor (prevents instanciation).

Method Detail

high

public static int high(ExpressionContext context)
Returns the Ejen high version number.


  <xsl:variable name="high-version" select="ver:high()"/>
 

Parameters:
context - automatically passed by the xalan extension mechanism.
Returns:
the high version number.

low

public static int low(ExpressionContext context)
Returns the Ejen low version number.


  <xsl:variable name="low-version" select="ver:low()"/>
 

Parameters:
context - automatically passed by the xalan extension mechanism.
Returns:
the low version number.

status

public static String status(ExpressionContext context)
Returns the Ejen low version number.


  <xsl:variable name="version-status" select="ver:status()"/>
 

Parameters:
context - automatically passed by the xalan extension mechanism.
Returns:
the version status String.

toString

public static String toString(ExpressionContext context)
Returns the Ejen high version number.


  <xsl:variable name="version" select="ver:version()"/>
 

Parameters:
context - automatically passed by the xalan extension mechanism.
Returns:
the version number in the form of "<HIGH_VERSION>.<LOW_VERSION>-<VERSION_STATUS>".