org.apache.commons.jelly.tags.xml

## Class SortTag

- java.lang.Object
- - org.apache.commons.jelly.TagSupport
  - - org.apache.commons.jelly.xpath.XPathTagSupport
    - - org.apache.commons.jelly.tags.xml.SortTag

All Implemented Interfaces:
  Tag

    public class SortTag
    extends XPathTagSupport

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

Version:
  $Id: SortTag.java 155420 2005-02-26 13:06:03Z dirkv $
Author:
  Jason Horman

### Field Summary

### Fields inherited from class org.apache.commons.jelly.TagSupport

`body, context, parent`

### Constructor Summary

Constructors
Constructor and Description
`SortTag()`

### Method Summary

Methods
`void` `doTag(XMLOutput output)` Evaluates this tag after all the tags properties have been initialized.
`void` `setDescending(boolean descending)` Set whether to sort ascending or descending.
`void` `setList(java.util.List list)` Set the list to sort.
`void` `setSort(org.jaxen.XPath sortXPath)` Sets the xpath expression to use to sort selected nodes.

### Methods inherited from class org.apache.commons.jelly.xpath.XPathTagSupport

`getXPathContext`

### Methods inherited from class org.apache.commons.jelly.TagSupport

`findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SortTag

    public SortTag()

### Method Detail

#### doTag

    public void doTag(XMLOutput output)
               throws MissingAttributeException,
                      JellyTagException

Description copied from interface: `Tag`
Evaluates this tag after all the tags properties have been initialized.

Throws:
  `MissingAttributeException`
  `JellyTagException`

#### setList

    public void setList(java.util.List list)

Set the list to sort.

#### setSort

    public void setSort(org.jaxen.XPath sortXPath)
                 throws org.jaxen.JaxenException

Sets the xpath expression to use to sort selected nodes.

Throws:
  `org.jaxen.JaxenException`

#### setDescending

    public void setDescending(boolean descending)

Set whether to sort ascending or descending.