public class NodeFunction extends Object
<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))')}" />
| Modifier and Type | Method and Description |
|---|---|
static String |
function(Cloud cloud,
Node node,
String function)
It can be handy to supply a whole node, it will search for the field 'number' itself.
|
static String |
function(Cloud cloud,
String number,
String function)
Note: Saxon cannnot distinguish this function from
function(String, String, String),
consider using saxonFunction(Object, String, String) in stead. |
static String |
function(Cloud cloud,
String number,
String function,
Object request) |
static String |
function(Node node,
String function)
It can be handy to supply a whole node, it will search for the field 'number' itself.
|
static String |
function(String node,
String function)
Supposes the default cloud 'mmbase'.
|
static String |
function(String cloudName,
String number,
String function)
Note: Saxon cannnot distinguish this function from
function(Cloud, String, String),
consider using saxonFunction(Object, String, String) in stead. |
static String |
guiName(Cloud cloud,
String node) |
static Element |
nodeFunction(NodeList destination,
Cloud cloud,
String number,
String function,
String arguments) |
static String |
saxonFunction(Object cloud,
String number,
String function)
Saxon cannot distinguish the above two functions (
function(String, String, String),
function(Cloud, String, String)). |
public static String function(String node, String function)
node - The number (or alias) of the Nodefunction - The function (with arguments).function(String, String, String)public static String function(String cloudName, String number, String function)
function(Cloud, String, String),
consider using saxonFunction(Object, String, String) in stead.cloudName - The name of the Cloud.number - The number (or alias) of the Nodefunction - The function (with arguments).public static String function(Cloud cloud, String number, String function)
function(String, String, String),
consider using saxonFunction(Object, String, String) in stead.public static String saxonFunction(Object cloud, String number, String function)
function(String, String, String),
function(Cloud, String, String)). So, you can help it and use this one in stead.public static Element nodeFunction(NodeList destination, Cloud cloud, String number, String function, String arguments)
public static String function(Node node, String function) throws XPathExpressionException
node - The number (or alias) of the Nodefunction - The function (with arguments).XPathExpressionException - if xpath failspublic static String function(Cloud cloud, String number, String function, Object request)
request - Meant to be an HttpServletRequest. If not, will be ignored (empty string e.g.).public static String function(Cloud cloud, Node node, String function) throws XPathExpressionException
cloud - cloud to execute innode - The number (or alias) of the Nodefunction - The function (with arguments).TransformerException - if xpath failsXPathExpressionExceptionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}