Text.XML.HaXml.Xtract.Combinators

| HaXml | Parent | Contents | Index
Text.XML.HaXml.Xtract.Combinators
Description
This is a new set of XML combinators for Xtract, not standard, but based on the standard set in Text.Xml.Haxml.Combinators. The main difference is that the Content Filter type becomes a Double Filter. A Double Filter always takes the whole document as an extra argument, so you can start to traverse it again from any inner location within the document tree. The new combinators definitions are derived from the old ones. New names are derived from the old by surrounding with the letter `o`, or by doubling the operator symbols.
Synopsis
type DFilter = Content -> Content -> [Content]
local :: CFilter -> DFilter
global :: CFilter -> DFilter
dfilter :: DFilter -> CFilter
oloco :: (CFilter -> CFilter) -> DFilter -> DFilter
oglobo :: (CFilter -> CFilter) -> DFilter -> DFilter
ooo :: DFilter -> DFilter -> DFilter
(||>||) :: (a -> b -> [c]) -> (a -> b -> [c]) -> a -> b -> [c]
owitho :: DFilter -> DFilter -> DFilter
owithouto :: DFilter -> DFilter -> DFilter
okeepo :: DFilter
ononeo :: DFilter
ochildreno :: DFilter
oelmo :: DFilter
otxto :: DFilter
applypred :: CFilter -> DFilter -> CFilter
oiffindo :: String -> (String -> DFilter) -> DFilter -> DFilter
oifTxto :: (String -> DFilter) -> DFilter -> DFilter
ocato :: [a -> b -> [c]] -> a -> b -> [c]
(//>>) :: DFilter -> DFilter -> DFilter
(<<//) :: DFilter -> DFilter -> DFilter
odeepo :: DFilter -> DFilter
Documentation
type DFilter = Content -> Content -> [Content]
double content filter - takes document root + local subtree.
local :: CFilter -> DFilter
lift an ordinary content filter to a double filter.
global :: CFilter -> DFilter
dfilter :: DFilter -> CFilter
drop a double filter to an ordinary content filter
oloco :: (CFilter -> CFilter) -> DFilter -> DFilter
lift a CFilter combinator to a DFilter combinator
oglobo :: (CFilter -> CFilter) -> DFilter -> DFilter
ooo :: DFilter -> DFilter -> DFilter
lifted composition over double filters.
(||>||) :: (a -> b -> [c]) -> (a -> b -> [c]) -> a -> b -> [c]
lifted choice.
owitho :: DFilter -> DFilter -> DFilter
lifted predicates.
owithouto :: DFilter -> DFilter -> DFilter
okeepo :: DFilter
lifted unit and zero.
ononeo :: DFilter
ochildreno :: DFilter
oelmo :: DFilter
otxto :: DFilter
applypred :: CFilter -> DFilter -> CFilter
oiffindo :: String -> (String -> DFilter) -> DFilter -> DFilter
oifTxto :: (String -> DFilter) -> DFilter -> DFilter
ocato :: [a -> b -> [c]] -> a -> b -> [c]
(//>>) :: DFilter -> DFilter -> DFilter
(<<//) :: DFilter -> DFilter -> DFilter
odeepo :: DFilter -> DFilter
Produced by Haddock version 0.4