HaXml-1.13.3: Utilities for manipulating XML documents

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

Documentation

type DFilter = Content -> Content -> [Content]Source

double content filter - takes document root + local subtree.

global :: CFilter -> DFilterSource

lift an ordinary content filter to a double filter.

dfilter :: DFilter -> CFilterSource

drop a double filter to an ordinary content filter

oglobo :: (CFilter -> CFilter) -> DFilter -> DFilterSource

lift a CFilter combinator to a DFilter combinator

ooo :: DFilter -> DFilter -> DFilterSource

lifted composition over double filters.

(||>||) :: (a -> b -> [c]) -> (a -> b -> [c]) -> a -> b -> [c]Source

lifted choice.

owithouto :: DFilter -> DFilter -> DFilterSource

lifted predicates.

ononeo :: DFilterSource

lifted unit and zero.

ocato :: [a -> b -> [c]] -> a -> b -> [c]Source