License X:Forge Tag Reference Request Component SQL Component XSL Component | X:Forge Tag ReferenceAlphabetical ListingThe following tags are available in X:Forge:
xf:attribute
Creates an attribute for an XML element. For an example see xf:elementCreates an XML element. <xf:element name="testelement"> <xf:attribute name="testattribute">testvalue</xf:attribute> </xf:element> xf:else
Used with xf:evaluate
Evaluates an expression. X:Forge contains a simple expressions parser. In the following
usage examples it is assumed that a variable of the correct type has been declared before.
For example, the string-length function obviously expects a string and the xpath function
a node, so these should be declared via <xf:evaluate expression="'The string length is: ' + string-length($mystring)"/> <xf:evaluate expression="$mynode#xpath('/some/xml/element')"/> <xf:evaluate expression="$myint * 2 + $myotherint"/> <xf:evaluate expression="$myint < 10"/> <xf:evaluate expression="indexof(starts-with(not( contains(string-replace($mystring,'Old','New'),'Old')),'tru'),'u')"/> xf:getGet the current value of a previously declared variable. It is also possible to retrieve a serialized object from a context, if the object has been put into the context before. <xf:get name="myvar"/> <contextdemo xmlns:thread="http://xforge.org/xforge/ 3.0/context/org.bibop.xml.xforge.helpers.ThreadContext"> A serialized object from the thread context: <xf:get name="thread:testfile"/> </contextdemo> xf:ifUsed to construct conditional expressions. <xf:if test="$mystring=trim('Some other value...')"> Test successful. </xf:if> <xf:else> Test not successful. </xf:else> xf:includeExplanation here. xf:node
Declares a node variable, which can later be retrieved with <xf:node name="mynode"> <some> <xml> <element>data</element> </xml> </some> </xf:node> xf:number
Declares a number-type variable, which can later be retrieved with <xf:number type="bool" name="mybool">true</xf:number> <xf:number type="byte" name="mybyte">3</xf:number> <xf:number type="int" name="myint">525</xf:number> <xf:number type="double" name="mydouble">11111111111111111111</xf:number> xf:parameter
Whenever a component is invoked via <xf:process using="FormattedDate"> <xf:parameter name="format">yyyy.MM.dd G ' at' hh:mm:ss z</xf:parameter> </xf:process> <xf:process using="MyBean"> <xf:parameter name="setLastName">Doe</xf:parameter> <xf:parameter name="setFirstName">John</xf:parameter> <xf:parameter name="getLastName"/> <xf:parameter name="getFirstName"/> </xf:process> <xsl:apply> <xf:parameter name="xml"> <person><lastname>Doe</lastname><firstname>John</firstname></person> </xf:parameter> <xf:parameter name="xsl">test/test.xsl</xf:parameter> </xsl:apply> xf:processOne of the invocation mechanisms for X:Forge components. A detailed explanation can be found on the index page. xf:setUsed to set a variable's value after it has been declared. <xf:set name="mystring">Some value...</xf:set> xf:string
Declares a string variable, which can later be retrieved with <xf:string name="mystring">mystringvalue</xf:string> xf:whileWith this tag it is possible to construct loops: <xf:while test="$i < $count"> <xf:set name="result"><xf:evaluate expression="$result+$i"/></xf:set> <xf:set name="i"><xf:evaluate expression="$i+1"/></xf:set> </xf:while> |