org.ejen.ext
Class Properties

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

public class Properties
extends Object

Properties 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:pro="org.ejen.ext.Properties"
                  exclude-result-prefixes="pro ..."
                  version="1.0">

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

    <xsl:template match="ejen">

      <xsl:copy-of select="pro:getSystemProperties()"/>
      <xsl:copy-of select="pro:load($file-name)"/>

    </xsl:template>

  </xsl:stylesheet>
 

Version:
1.0
Author:
F. Wolff
See Also:
Properties

Constructor Summary
protected Properties()
          Protected constructor (prevents instanciation).
 
Method Summary
static NodeSet getSystemProperties(ExpressionContext context)
          Returns a NodeSet that contains system properties.
static NodeSet load(ExpressionContext context, String fileName)
          Loads a properties file and returns it as a NodeSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Properties

protected Properties()
Protected constructor (prevents instanciation).

Method Detail

getSystemProperties

public static NodeSet getSystemProperties(ExpressionContext context)
Returns a NodeSet that contains system properties.


  <xsl:value-of select="pro:getSystemProperties()"/>
 

Returned NodeSet contains a set of property Nodes with the following format:


  <property>
    <name><![CDATA[java.runtime.name]]></name>
    <value><![CDATA[Java(TM) 2 Runtime Environment, Standard Edition]]></value>
  </property>
 

Parameters:
context - automatically passed by the xalan extension mechanism.
Returns:
system properties.
Throws:
WrappedRuntimeException - DOM error or SecurityException.

load

public static NodeSet load(ExpressionContext context,
                           String fileName)
Loads a properties file and returns it as a NodeSet.


  <xsl:value-of select="pro:load($file-name)"/>
 

Returned NodeSet contains a set of property Nodes with the following format:


  <property>
    <name><![CDATA[path]]></name>
    <value><![CDATA[../../ejen]]></value>
  </property>
 

See Properties.load(java.io.InputStream).

XSLT parameters:
[Mandatory/AVT] name of the file.

Parameters:
context - automatically passed by the xalan extension mechanism.
fileName - name of the file.
Returns:
system properties.
Throws:
WrappedRuntimeException - DOM error or SecurityException.