hxt-9.3.1.16: A collection of tools for processing XML with Haskell.

Copyright | Copyright (C) 2010 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe\@fh-wedel.de)
Stability | experimental
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Data.Tree.NavigatableTree.XPathAxis

Description

Navigatable trees need to have operations to move up, down, left and right. With these elementary operations, the XPath axises can be defined.

Synopsis

- maybeStar :: (a -> Maybe a) -> a -> [a]
- maybePlus :: (a -> Maybe a) -> a -> [a]
- parentAxis :: NavigatableTree t => t a -> [t a]
- ancestorAxis :: NavigatableTree t => t a -> [t a]
- ancestorOrSelfAxis :: NavigatableTree t => t a -> [t a]
- childAxis :: NavigatableTree t => t a -> [t a]
- descendantAxis :: NavigatableTree t => t a -> [t a]
- descendantOrSelfAxis :: NavigatableTree t => t a -> [t a]
- revDescendantOrSelfAxis :: NavigatableTree t => t a -> [t a]
- followingSiblingAxis :: NavigatableTree t => t a -> [t a]
- precedingSiblingAxis :: NavigatableTree t => t a -> [t a]
- selfAxis :: NavigatableTree t => t a -> [t a]
- followingAxis :: NavigatableTree t => t a -> [t a]
- precedingAxis :: NavigatableTree t => t a -> [t a]
- mvToRoot :: NavigatableTree t => t a -> t a
- isAtRoot :: NavigatableTree t => t a -> Bool

# Documentation

maybeStar :: (a -> Maybe a) -> a -> [a] Source #

collect all trees by moving into one direction, starting tree is included

maybePlus :: (a -> Maybe a) -> a -> [a] Source #

collect all trees by moving into one direction, starting tree is not included

parentAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: parent

ancestorAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: ancestor

ancestorOrSelfAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: ancestor or self

childAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: child

descendantAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: descendant

descendantOrSelfAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: descendant or self

revDescendantOrSelfAxis :: NavigatableTree t => t a -> [t a] Source #

not an official XPath axis but useful: reverse descendant or self, used in preceding axis

followingSiblingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: following sibling

precedingSiblingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: preceeding sibling

selfAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: self

followingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: following

precedingAxis :: NavigatableTree t => t a -> [t a] Source #

XPath axis: preceding

mvToRoot :: NavigatableTree t => t a -> t a Source #

move to the root

isAtRoot :: NavigatableTree t => t a -> Bool Source #