| java.lang.Object org.mmbase.bridge.util.xml.NodeFunction
NodeFunction | public class NodeFunction (Code) | | 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))')}" />
author: Michiel Meeuwissen version: $Id: NodeFunction.java,v 1.21 2007/04/09 19:10:27 michiel Exp $ since: MMBase-1.6 |
Method Summary | |
public static String | function(String node, String function) Supposes the default cloud 'mmbase'.
Parameters: node - The number (or alias) of the Node Parameters: function - The function (with arguments). | public static String | function(String cloudName, String number, String function) Note: Saxon cannnot distinguish this function from
NodeFunction.function(Cloud,String,String) ,
consider using
NodeFunction.saxonFunction(Object,String,String) in stead.
Parameters: cloudName - The name of the Cloud. Parameters: number - The number (or alias) of the Node Parameters: function - The function (with arguments). | public static String | function(Cloud cloud, String number, String function) Note: Saxon cannnot distinguish this function from
NodeFunction.function(String,String,String) ,
consider using
NodeFunction.saxonFunction(Object,String,String) in stead. | public static String | function(org.w3c.dom.Node node, String function) It can be handy to supply a whole node, it will search for the field 'number' itself.
Parameters: node - The number (or alias) of the Node Parameters: function - The function (with arguments). | public static String | function(Cloud cloud, String number, String function, Object request) Parameters: request - Meant to be an HttpServletRequest. | public static String | function(Cloud cloud, org.w3c.dom.Node node, String function) It can be handy to supply a whole node, it will search for the field 'number' itself.
Parameters: cloud - cloud to execute in Parameters: node - The number (or alias) of the Node Parameters: function - The function (with arguments). | public static String | guiName(Cloud cloud, String node) | public static org.w3c.dom.Element | nodeFunction(org.w3c.dom.NodeList destination, Cloud cloud, String number, String function, String arguments) | public static String | saxonFunction(Object cloud, String number, String function) Saxon cannot distinguish the above two functions (
NodeFunction.function(String,String,String) ,
NodeFunction.function(Cloud,String,String) ). |
function | public static String function(Cloud cloud, String number, String function, Object request)(Code) | | Parameters: request - Meant to be an HttpServletRequest. If not, will be ignored (empty string e.g.). since: MMBase-1.8 |
|
|