org.mmbase.bridge.util.xml
Class NodeFunction
java.lang.Object
|
+--org.mmbase.bridge.util.xml.NodeFunction
- public class NodeFunction
- extends java.lang.Object
Nodes of the bridge can have `virtual fields', which are in fact
functions on the node. An example of such a function is "gui()". If
you want to use these functions in an XSL transformation it is
necessary to use this Xalan extension. The XSLT looks like this then:
<xsl:stylesheet version = "1.0"
xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
xmlns:node ="org.mmbase.bridge.util.xml.NodeFunction"
>
..
You can then use a function like this if in the current template is a DOM Node with a 'field' subnode.
..
<img src="{$formatter_imgdb}{node:function(., 'cache(s(180x180))')}" />
And otherwise you can also feed it a number:
..
<img src="{$formatter_imgdb}{node:function(string(@number), 'cache(s(180x180))')}" />
Possibly even with the name of MMBase:
..
<img src="{$formatter_imgdb}{node:function('mmbase', string(@number), 'cache(s(180x180))')}" />
- Since:
- MMBase-1.6
- Version:
- $Id: NodeFunction.java,v 1.6 2002/11/12 16:57:46 pierre Exp $
- Author:
- Michiel Meeuwissen
|
Method Summary |
static java.lang.String |
function(Cloud cloud,
org.w3c.dom.Node node,
java.lang.String function)
It can be handy to supply a whole node, it will search for the field 'number' itself. |
static java.lang.String |
function(Cloud cloud,
java.lang.String number,
java.lang.String function)
|
static java.lang.String |
function(org.w3c.dom.Node node,
java.lang.String function)
It can be handy to supply a whole node, it will search for the field 'number' itself. |
static java.lang.String |
function(java.lang.String node,
java.lang.String function)
Supposes the default cloud 'mmbase'. |
static java.lang.String |
function(java.lang.String cloudName,
java.lang.String number,
java.lang.String function)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeFunction
public NodeFunction()
function
public static java.lang.String function(java.lang.String node,
java.lang.String function)
- Supposes the default cloud 'mmbase'.
- See Also:
function(java.lang.String, java.lang.String)
function
public static java.lang.String function(java.lang.String cloudName,
java.lang.String number,
java.lang.String function)
- Parameters:
cloudName - The name of the Cloud.number - The number (or alias) of the Nodefunction - The function (with arguments).- Returns:
- The result of the function (as a String)
function
public static java.lang.String function(org.w3c.dom.Node node,
java.lang.String function)
throws javax.xml.transform.TransformerException
- It can be handy to supply a whole node, it will search for the field 'number' itself.
function
public static java.lang.String function(Cloud cloud,
java.lang.String number,
java.lang.String function)
function
public static java.lang.String function(Cloud cloud,
org.w3c.dom.Node node,
java.lang.String function)
throws javax.xml.transform.TransformerException
- It can be handy to supply a whole node, it will search for the field 'number' itself.
MMBase build 1.6.5.20030923