The following Jelly tag libraries are defined in this project.
jelly:xml
The XML Tags from the JSTL.
This tag library is also available as an XML Schema
Tag Name | Description |
---|---|
attribute | Adds an XML attribute to the parent element tag like the tag. |
comment | A tag which outputs a comment to the underlying XMLOutput based on the contents of its body. |
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. |
copyOf | A tag which performs a copy-of operation like the XSLT tag |
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 and it should occur before any element content. |
element | A tag to produce an XML element which can contain other attributes or elements like the tag. |
expr | A tag which performs a string XPath expression; similar to <xsl:value-of> in XSLT |
forEach | A tag which performs an iteration over the results of an XPath expression |
if | Evaluates the XPath expression to be a boolean and only evaluates the body if the expression is true. |
param | Sets a parameter in the parent transform tag |
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 the xml property which can be a Reader, InputStream, URL or String URI. |
replaceNamespace | Replace namespace is a filter to change the namespace of any elemement attribute passing through it. |
set | A tag which defines a variable from an XPath expression. This function creates a variable of type List or org.dom4j.Node (for example org.dom4j.Element or org.dom4j.Attribute). Thus, the variable created from xml:set can be used from the other xml library functions. |
sort | A tag that can sort a list of xml nodes via an xpath expression. |
transform | A tag which parses some XML, applies an xslt transform to it and defines a variable with the transformed Document. The XML can either be specified as its body or can be passed in via the xml property which can be a Reader, InputStream, URL or String URI. The XSL can be passed in via the xslt property which can be a Reader, InputStream, URL or String URI. |
attribute
Adds an XML attribute to the parent element tag like the tag.
Attribute Name | Type | Description |
---|---|---|
URI | java.lang.String | Sets the namespace URI of the element |
name | java.lang.String | Sets the name of the attribute. |
comment
A tag which outputs a comment to the underlying XMLOutput based on the contents of its body.
Attribute Name | Type | Description |
---|---|---|
text | java.lang.String | Sets the comment text. If no text is specified then the body of the tag is used instead. |
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 Name | Type | Description |
---|---|---|
lexical | boolean | |
select | org.jaxen.XPath | Sets the XPath expression to evaluate. |
copyOf
A tag which performs a copy-of operation like the XSLT tag
Attribute Name | Type | Description |
---|---|---|
lexical | boolean | |
select | org.jaxen.XPath | Sets the XPath expression to evaluate. |
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 and it should occur before any element content.
Attribute Name | Type | Description |
---|---|---|
name | java.lang.String | Sets the document type name of the DOCTYPE |
publicId | java.lang.String | Sets the declared public identifier for DTD |
systemId | java.lang.String | Sets the declared system identifier for the DTD |
element
A tag to produce an XML element which can contain other attributes or elements like the tag.
Attribute Name | Type | Description |
---|---|---|
URI | java.lang.String | Sets the namespace URI of the element |
name | java.lang.String | Sets the qualified name of the element |
expr
A tag which performs a string XPath expression; similar to <xsl:value-of> in XSLT
Attribute Name | Type | Description |
---|---|---|
select | org.jaxen.XPath | Sets the XPath expression to evaluate. |
forEach
A tag which performs an iteration over the results of an XPath expression
Attribute Name | Type | Description |
---|---|---|
descending | boolean | Set whether to sort ascending or descending. |
select | org.jaxen.XPath | Sets the XPath selection expression |
sort | org.jaxen.XPath | Sets the xpath expression to use to sort selected nodes. |
var | java.lang.String | Sets the variable name to export for the item being iterated over |
if
Evaluates the XPath expression to be a boolean and only evaluates the body if the expression is true.
Attribute Name | Type | Description |
---|---|---|
select | org.jaxen.XPath | Sets the XPath expression to evaluate. |
param
Sets a parameter in the parent transform tag
Attribute Name | Type | Description |
---|---|---|
name | java.lang.String | Sets the name of the attribute |
value | java.lang.Object | Sets the value of the attribute |
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 the xml property which can be a Reader, InputStream, URL or String URI.
Attribute Name | Type | Description |
---|---|---|
SAXReader | org.dom4j.io.SAXReader | Sets the SAXReader used for parsing |
text | java.lang.String | Sets the text to be parsed by this parser |
validate | boolean | Sets whether XML validation is enabled or disabled |
var | java.lang.String | Sets the variable name that will be used for the Document variable created |
xml | java.lang.Object | Sets the source of the XML which is either a String URI, a File, Reader or InputStream |
replaceNamespace
Replace namespace is a filter to change the namespace of any elemement attribute passing through it.
Attribute Name | Type | Description |
---|---|---|
fromURI | java.lang.String | Sets the source namespace URI to replace. |
toURI | java.lang.String | Sets the destination namespace URI to replace. |
set
A tag which defines a variable from an XPath expression. This function creates a variable of type List or org.dom4j.Node (for example org.dom4j.Element or org.dom4j.Attribute). Thus, the variable created from xml:set can be used from the other xml library functions.
Attribute Name | Type | Description |
---|---|---|
asString | boolean | If set to true, will ensure that the (XPath) text-value of the selected node is taken instead of the node itself. This ensures that, thereafter, string manipulations can be performed on the result. |
delim | java.lang.String | If set, returns a string delimited by this delimiter. Implies to be true. |
descending | boolean | Set whether to sort ascending or descending. |
select | org.jaxen.XPath | Sets the XPath expression to evaluate. |
single | boolean | If set to true will only take the first element matching. It then guarantees that the result is of type org.dom4j.Node thereby making sure that, for example, when an element is selected, one can directly call such methods as setAttribute. If set to false, guarantees that a list is returned. |
sort | org.jaxen.XPath | Sets the xpath expression to use to sort selected nodes. Ignored if single is true. |
var | java.lang.String | Sets the variable name to define for this expression |
sort
A tag that can sort a list of xml nodes via an xpath expression.
Attribute Name | Type | Description |
---|---|---|
descending | boolean | Set whether to sort ascending or descending. |
list | java.util.List | Set the list to sort. |
sort | org.jaxen.XPath | Sets the xpath expression to use to sort selected nodes. |
transform
A tag which parses some XML, applies an xslt transform to it and defines a variable with the transformed Document. The XML can either be specified as its body or can be passed in via the xml property which can be a Reader, InputStream, URL or String URI.
The XSL can be passed in via the xslt property which can be a Reader, InputStream, URL or String URI.
Attribute Name | Type | Description |
---|---|---|
SAXReader | org.dom4j.io.SAXReader | Sets the SAXReader used for parsing |
text | java.lang.String | Sets the text to be parsed by this parser |
validate | boolean | Sets whether XML validation is enabled or disabled |
var | java.lang.String | Sets the variable name that will be used for the Document variable created |
xml | java.lang.Object | Sets the source of the XML which is either a String URI, a File, Reader or InputStream |
xslt | java.lang.Object | Sets the source of the XSL which is either a String URI, Reader or InputStream |