Tag Documentation

[tag libraries] [tags]

The following document contains a summary of all theJellytag libraries.

Tag Libraries

[tag libraries] [tags]

LibraryDescription
jelly:xml

The XML Tags from the JSTL

jelly:xml

The XML Tags from the JSTL

Tag NameDescription
attributeAdds an XML attribute to the parent element tag likethe <xsl:attribute> tag.
commentA tag which outputs a comment to the underlying XMLOutput based on thecontents of its body.
copyA tag which performs a copy operation like the XSLT tag,performing a shallow copy of the element and its attributes but no content.
copyOfA tag which performs a copy-of operation like the XSLT tag
doctypeA tag which outputs a DOCTYPE declaration to the current XML output pipe.Note that there should only be a single DOCTYPE declaration in any XML stream andit should occur before any element content.
elementA tag to produce an XML element which can contain other attributesor elements like the <xsl:element> tag.
exprA tag which performs a string XPath expression; similar to <xsl:value-of>in XSLT
forEachA tag which performs an iteration over the results of an XPath expression
ifEvaluates the XPath expression to be a boolean and only evaluates the bodyif the expression is true.
paramSets a parameter in the parent transform tag
parseA tag which parses some XML and defines a variable with the parsed Document.The XML can either be specified as its body or can be passed in via thexml property which can be a Reader, InputStream, URL or String URI.
replaceNamespaceReplace namespace is a filter to change the namespace of anyelemement attribute passing through it.
setA tag which defines a variable from an XPath expression.This function creates a variable of type java.util.Listor org.dom4j.Node(for example org.dom4j.Elementor org.dom4j.Attribute).Thus, the variable created from xml:set can beused from the other xml library functions.
sortA tag that can sort a list of xml nodes via an xpath expression.
transformA tag which parses some XML, applies an xslt transform to itand defines a variable with the transformed Document.The XML can either be specified as its body or can be passed in via thexml property which can be a Reader, InputStream, URL or String URI.The XSL can be passed in via thexslt property which can be a Reader, InputStream, URL or String URI.

Tags

[tag libraries] [tags]

xml:attribute

Adds an XML attribute to the parent element tag likethe <xsl:attribute> tag.

Attribute NameTypeDescription
URIjava.lang.StringSets the namespace URI of the element
escapeTextboolean
namejava.lang.StringSets the name of the attribute.
trimboolean

xml:comment

A tag which outputs a comment to the underlying XMLOutput based on thecontents of its body.

Attribute NameTypeDescription
escapeTextboolean
textjava.lang.StringSets the comment text. If no text is specified then the body of the tagis used instead.
trimboolean

xml:copy

A tag which performs a copy operation like the XSLT tag,performing a shallow copy of the element and its attributes but no content.

Attribute NameTypeDescription
escapeTextboolean
lexicalboolean
selectorg.jaxen.XPathSets the XPath expression to evaluate.
trimboolean

xml:copyOf

A tag which performs a copy-of operation like the XSLT tag

Attribute NameTypeDescription
escapeTextboolean
lexicalboolean
selectorg.jaxen.XPathSets the XPath expression to evaluate.
trimboolean

xml:doctype

A tag which outputs a DOCTYPE declaration to the current XML output pipe.Note that there should only be a single DOCTYPE declaration in any XML stream andit should occur before any element content.

Attribute NameTypeDescription
escapeTextboolean
namejava.lang.StringSets the document type name of the DOCTYPE
publicIdjava.lang.StringSets the declared public identifier for DTD
systemIdjava.lang.StringSets the declared system identifier for the DTD
trimboolean

xml:element

A tag to produce an XML element which can contain other attributesor elements like the <xsl:element> tag.

Attribute NameTypeDescription
URIjava.lang.StringSets the namespace URI of the element
escapeTextboolean
namejava.lang.StringSets the qualified name of the element
trimboolean

xml:expr

A tag which performs a string XPath expression; similar to <xsl:value-of>in XSLT

Attribute NameTypeDescription
escapeTextboolean
selectorg.jaxen.XPathSets the XPath expression to evaluate.
trimboolean

xml:forEach

A tag which performs an iteration over the results of an XPath expression

Attribute NameTypeDescription
descendingbooleanSet whether to sort ascending or descending.
escapeTextboolean
selectorg.jaxen.XPathSets the XPath selection expression
sortorg.jaxen.XPathSets the xpath expression to use to sort selected nodes.
trimboolean
varjava.lang.StringSets the variable name to export for the item being iterated over

xml:if

Evaluates the XPath expression to be a boolean and only evaluates the bodyif the expression is true.

Attribute NameTypeDescription
escapeTextboolean
selectorg.jaxen.XPathSets the XPath expression to evaluate.
trimboolean

xml:param

Sets a parameter in the parent transform tag

Attribute NameTypeDescription
escapeTextboolean
namejava.lang.StringSets the name of the attribute
trimboolean
valuejava.lang.ObjectSets the value of the attribute

xml:parse

A tag which parses some XML and defines a variable with the parsed Document.The XML can either be specified as its body or can be passed in via thexml property which can be a Reader, InputStream, URL or String URI.

Attribute NameTypeDescription
SAXReaderorg.dom4j.io.SAXReaderSets the SAXReader used for parsing
escapeTextboolean
textjava.lang.StringSets the text to be parsed by this parser
trimboolean
validatebooleanSets whether XML validation is enabled or disabled
varjava.lang.StringSets the variable name that will be used for the Document variable created
xmljava.lang.ObjectSets the source of the XML which is either a String URI, a File, Reader or InputStream

xml:replaceNamespace

Replace namespace is a filter to change the namespace of anyelemement attribute passing through it.

Attribute NameTypeDescription
escapeTextboolean
fromURIjava.lang.StringSets the source namespace URI to replace.
toURIjava.lang.StringSets the destination namespace URI to replace.
trimboolean

xml:set

A tag which defines a variable from an XPath expression.This function creates a variable of type java.util.Listor org.dom4j.Node(for example org.dom4j.Elementor org.dom4j.Attribute).Thus, the variable created from xml:set can beused from the other xml library functions.

Attribute NameTypeDescription
asStringbooleanIf set to true, will ensure that the (XPath) text-valueof the selected node is taken instead of the nodeitself.This ensures that, thereafter, string manipulationscan be performed on the result.
delimjava.lang.StringIf set, returns a string delimited by this delimiter.Implies asString to be true.
descendingbooleanSet whether to sort ascending or descending.
escapeTextboolean
selectorg.jaxen.XPathSets the XPath expression to evaluate.
singlebooleanIf set to true will only take the first element matching.It then guarantees that the result is of type org.dom4j.Nodethereby making sure that, for example,when an element is selected, one can directly call such methodsas setAttribute.

If set to false, guarantees that a list is returned.If set to false, guarantees that a list is returned.
sortorg.jaxen.XPathSets the xpath expression to use to sort selected nodes.Ignored if single is true.
trimboolean
varjava.lang.StringSets the variable name to define for this expression

xml:sort

A tag that can sort a list of xml nodes via an xpath expression.

Attribute NameTypeDescription
descendingbooleanSet whether to sort ascending or descending.
escapeTextboolean
listjava.util.ListSet the list to sort.
sortorg.jaxen.XPathSets the xpath expression to use to sort selected nodes.
trimboolean

xml:transform

A tag which parses some XML, applies an xslt transform to itand defines a variable with the transformed Document.The XML can either be specified as its body or can be passed in via thexml property which can be a Reader, InputStream, URL or String URI.The XSL can be passed in via thexslt property which can be a Reader, InputStream, URL or String URI.

Attribute NameTypeDescription
SAXReaderorg.dom4j.io.SAXReaderSets the SAXReader used for parsing
escapeTextboolean
textjava.lang.StringSets the text to be parsed by this parser
trimboolean
validatebooleanSets whether XML validation is enabled or disabled
varjava.lang.StringSets the variable name that will be used for the Document variable created
xmljava.lang.ObjectSets the source of the XML which is either a String URI, a File, Reader or InputStream
xsltjava.lang.ObjectSets the source of the XSL which is either a String URI, Reader orInputStream