Text.XML.HXT.Arrow.XmlArrow

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

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

Text.XML.HXT.Arrow.XmlArrow

Description

Basic arrows for processing XML documents

All arrows use IO and a global state for options, errorhandling, ...

Synopsis

- class (Arrow a, ArrowList a, ArrowTree a) => ArrowXml a where
- class ArrowXml a => ArrowDTD a where

# Documentation

class (Arrow a, ArrowList a, ArrowTree a) => ArrowXml a where #

Arrows for processing `XmlTree`s

These arrows can be grouped into predicates, selectors, constructors, and transformers.

All predicates (tests) act like `none` for failure and `this` for success. A logical and can be formed by `a1 >>> a2` , a locical or by `a1 <+> a2` .

Selector arrows will fail, when applied to wrong input, e.g. selecting the text of a node with `getText` will fail when applied to a none text node.

Edit arrows will remain the input unchanged, when applied to wrong argument, e.g. editing the content of a text node with `changeText` applied to an element node will return the unchanged element node.

Methods

isText :: a XmlTree XmlTree #

test for text nodes

isBlob :: a XmlTree XmlTree #

isCharRef :: a XmlTree XmlTree #

test for char reference, used during parsing

isEntityRef :: a XmlTree XmlTree #

test for entity reference, used during parsing

isCmt :: a XmlTree XmlTree #

test for comment

isCdata :: a XmlTree XmlTree #

test for CDATA section, used during parsing

isPi :: a XmlTree XmlTree #

test for processing instruction

isXmlPi :: a XmlTree XmlTree #

test for processing instruction <?xml ...>

isElem :: a XmlTree XmlTree #

test for element

isDTD :: a XmlTree XmlTree #

test for DTD part, used during parsing

isAttr :: a XmlTree XmlTree #

test for attribute tree

isError :: a XmlTree XmlTree #

test for error message

isRoot :: a XmlTree XmlTree #

test for root node (element with name "/")

hasText :: (String -> Bool) -> a XmlTree XmlTree #

test for text nodes with text, for which a predicate holds

example: `hasText (all (`elem` " \t\n"))` check for text nodes with only whitespace content

isWhiteSpace :: a XmlTree XmlTree #

test for text nodes with only white space

implemented with `hasTest`

hasNameWith :: (QName -> Bool) -> a XmlTree XmlTree #

test whether a node (element, attribute, pi) has a name with a special property

hasQName :: QName -> a XmlTree XmlTree #

test whether a node (element, attribute, pi) has a specific qualified name useful only after namespace propagation

hasName :: String -> a XmlTree XmlTree #

test whether a node has a specific name (prefix:localPart or localPart), generally useful, even without namespace handling

hasLocalPart :: String -> a XmlTree XmlTree #

test whether a node has a specific name as local part, useful only after namespace propagation

hasNamePrefix :: String -> a XmlTree XmlTree #

test whether a node has a specific name prefix, useful only after namespace propagation

hasNamespaceUri :: String -> a XmlTree XmlTree #

test whether a node has a specific namespace URI useful only after namespace propagation

hasAttr :: String -> a XmlTree XmlTree #

test whether an element node has an attribute node with a specific name

hasQAttr :: QName -> a XmlTree XmlTree #

test whether an element node has an attribute node with a specific qualified name

hasAttrValue :: String -> (String -> Bool) -> a XmlTree XmlTree #

test whether an element node has an attribute with a specific value

hasQAttrValue :: QName -> (String -> Bool) -> a XmlTree XmlTree #

test whether an element node has an attribute with a qualified name and a specific value

mkText :: a String XmlTree #

text node construction arrow

mkBlob :: a Blob XmlTree #

blob node construction arrow

mkCharRef :: a Int XmlTree #

char reference construction arrow, useful for document output

mkEntityRef :: a String XmlTree #

entity reference construction arrow, useful for document output

mkCmt :: a String XmlTree #

comment node construction, useful for document output

mkCdata :: a String XmlTree #

CDATA construction, useful for document output

mkError :: Int -> a String XmlTree #

error node construction, useful only internally

mkElement :: QName -> a n XmlTree -> a n XmlTree -> a n XmlTree #

element construction: | the attributes and the content of the element are computed by applying arrows to the input

mkAttr :: QName -> a n XmlTree -> a n XmlTree #

attribute node construction: | the attribute value is computed by applying an arrow to the input

mkPi :: QName -> a n XmlTree -> a n XmlTree #

processing instruction construction: | the content of the processing instruction is computed by applying an arrow to the input

mkqelem :: QName -> [a n XmlTree] -> [a n XmlTree] -> a n XmlTree #

convenient arrow for element construction, more comfortable variant of `mkElement`

example for simplifying `mkElement` :

    mkElement qn (a1 <+> ... <+> ai) (c1 <+> ... <+> cj)

equals

    mkqelem qn [a1,...,ai] [c1,...,cj]

mkelem :: String -> [a n XmlTree] -> [a n XmlTree] -> a n XmlTree #

convenient arrow for element construction with strings instead of qualified names as element names, see also `mkElement` and `mkelem`

aelem :: String -> [a n XmlTree] -> a n XmlTree #

convenient arrow for element constrution with attributes but without content, simple variant of `mkelem` and `mkElement`

selem :: String -> [a n XmlTree] -> a n XmlTree #

convenient arrow for simple element constrution without attributes, simple variant of `mkelem` and `mkElement`

eelem :: String -> a n XmlTree #

convenient arrow for constrution of empty elements without attributes, simple variant of `mkelem` and `mkElement`

root :: [a n XmlTree] -> [a n XmlTree] -> a n XmlTree #

construction of an element node with name "/" for document roots

qattr :: QName -> a n XmlTree -> a n XmlTree #

alias for `mkAttr`

attr :: String -> a n XmlTree -> a n XmlTree #

convenient arrow for attribute constrution, simple variant of `mkAttr`

txt :: String -> a n XmlTree #

constant arrow for text nodes

blb :: Blob -> a n XmlTree #

constant arrow for blob nodes

charRef :: Int -> a n XmlTree #

constant arrow for char reference nodes

entityRef :: String -> a n XmlTree #

constant arrow for entity reference nodes

cmt :: String -> a n XmlTree #

constant arrow for comment

warn :: String -> a n XmlTree #

constant arrow for warning

err :: String -> a n XmlTree #

constant arrow for errors

fatal :: String -> a n XmlTree #

constant arrow for fatal errors

spi :: String -> String -> a n XmlTree #

constant arrow for simple processing instructions, see `mkPi`

sqattr :: QName -> String -> a n XmlTree #

constant arrow for attribute nodes, attribute name is a qualified name and value is a text, | see also `mkAttr`, `qattr`, `attr`

sattr :: String -> String -> a n XmlTree #

constant arrow for attribute nodes, attribute name and value are | given by parameters, see `mkAttr`

getText :: a XmlTree String #

select the text of a text node

getCharRef :: a XmlTree Int #

select the value of a char reference

getEntityRef :: a XmlTree String #

select the name of a entity reference node

getCmt :: a XmlTree String #

select the comment of a comment node

getCdata :: a XmlTree String #

select the content of a CDATA node

getPiName :: a XmlTree QName #

select the name of a processing instruction

getPiContent :: a XmlTree XmlTree #

select the content of a processing instruction

getElemName :: a XmlTree QName #

select the name of an element node

getAttrl :: a XmlTree XmlTree #

select the attribute list of an element node

getDTDPart :: a XmlTree DTDElem #

select the DTD type of a DTD node

getDTDAttrl :: a XmlTree Attributes #

select the DTD attributes of a DTD node

getAttrName :: a XmlTree QName #

select the name of an attribute

getErrorLevel :: a XmlTree Int #

select the error level (c_warn, c_err, c_fatal) from an error node

getErrorMsg :: a XmlTree String #

select the error message from an error node

getQName :: a XmlTree QName #

select the qualified name from an element, attribute or pi

getName :: a XmlTree String #

select the prefix:localPart or localPart from an element, attribute or pi

getUniversalName :: a XmlTree String #

select the univeral name ({namespace URI} ++ localPart)

getUniversalUri :: a XmlTree String #

select the univeral name (namespace URI ++ localPart)

getLocalPart :: a XmlTree String #

select the local part

getNamePrefix :: a XmlTree String #

select the name prefix

getNamespaceUri :: a XmlTree String #

select the namespace URI

getAttrValue :: String -> a XmlTree String #

select the value of an attribute of an element node, always succeeds with empty string as default value ""

getAttrValue0 :: String -> a XmlTree String #

like `getAttrValue`, but fails if the attribute does not exist

getQAttrValue :: QName -> a XmlTree String #

like `getAttrValue`, but select the value of an attribute given by a qualified name, always succeeds with empty string as default value ""

getQAttrValue0 :: QName -> a XmlTree String #

like `getQAttrValue`, but fails if attribute does not exist

changeText :: (String -> String) -> a XmlTree XmlTree #

edit the string of a text node

changeBlob :: (Blob -> Blob) -> a XmlTree XmlTree #

edit the blob of a blob node

changeCmt :: (String -> String) -> a XmlTree XmlTree #

edit the comment string of a comment node

changeQName :: (QName -> QName) -> a XmlTree XmlTree #

edit an element-, attribute- or pi- name

changeElemName :: (QName -> QName) -> a XmlTree XmlTree #

edit an element name

changeAttrName :: (QName -> QName) -> a XmlTree XmlTree #

edit an attribute name

changePiName :: (QName -> QName) -> a XmlTree XmlTree #

edit a pi name

changeAttrValue :: (String -> String) -> a XmlTree XmlTree #

edit an attribute value

changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> a XmlTree XmlTree -> a XmlTree XmlTree #

edit an attribute list of an element node

setQName :: QName -> a XmlTree XmlTree #

replace an element, attribute or pi name

setElemName :: QName -> a XmlTree XmlTree #

replace an element name

setAttrName :: QName -> a XmlTree XmlTree #

replace an attribute name

setPiName :: QName -> a XmlTree XmlTree #

replace an element name

setAttrl :: a XmlTree XmlTree -> a XmlTree XmlTree #

replace an atribute list of an element node

addAttrl :: a XmlTree XmlTree -> a XmlTree XmlTree #

add a list of attributes to an element

addAttr :: String -> String -> a XmlTree XmlTree #

add (or replace) an attribute

removeAttr :: String -> a XmlTree XmlTree #

remove an attribute

removeQAttr :: QName -> a XmlTree XmlTree #

remove an attribute with a qualified name

processAttrl :: a XmlTree XmlTree -> a XmlTree XmlTree #

process the attributes of an element node with an arrow

processTopDownWithAttrl :: a XmlTree XmlTree -> a XmlTree XmlTree #

process a whole tree inclusive attribute list of element nodes see also: `processTopDown`

(+=) :: a b XmlTree -> a b XmlTree -> a b XmlTree infixl 7 #

convenient op for adding attributes or children to a node

usage: `tf += cf`

the `tf` arrow computes an element node, and all trees computed by `cf` are added to this node, if a tree is an attribute, it is inserted in the attribute list else it is appended to the content list.

attention: do not build long content list this way because `+=` is implemented by ++

examples:

    eelem "a"
      += sattr "href" "page.html"
      += sattr "name" "here"
      += txt "look here"

is the same as

    mkelem [ sattr "href" "page.html"
           , sattr "name" "here"
           ]
           [ txt "look here" ]

and results in the XML fragment: <a href="page.html" name="here">look here</a>

advantage of the `+=` operator is, that attributes and content can be added any time step by step. if `tf` computes a whole list of trees, e.g. a list of "td" or "tr" elements, the attributes or content is added to all trees. useful for adding "class" or "style" attributes to table elements.

xshow :: a n XmlTree -> a n String #

apply an arrow to the input and convert the resulting XML trees into a string representation

xshowBlob :: a n XmlTree -> a n Blob #

apply an arrow to the input and convert the resulting XML trees into a string representation

Instances

ArrowXml LA # |
Methods isText :: LA XmlTree XmlTree # isBlob :: LA XmlTree XmlTree # isCharRef :: LA XmlTree XmlTree # isEntityRef :: LA XmlTree XmlTree # isCmt :: LA XmlTree XmlTree # isCdata :: LA XmlTree XmlTree # isPi :: LA XmlTree XmlTree # isXmlPi :: LA XmlTree XmlTree # isElem :: LA XmlTree XmlTree # isDTD :: LA XmlTree XmlTree # isAttr :: LA XmlTree XmlTree # isError :: LA XmlTree XmlTree # isRoot :: LA XmlTree XmlTree # hasText :: (String -> Bool) -> LA XmlTree XmlTree # isWhiteSpace :: LA XmlTree XmlTree # hasNameWith :: (QName -> Bool) -> LA XmlTree XmlTree # hasQName :: QName -> LA XmlTree XmlTree # hasName :: String -> LA XmlTree XmlTree # hasLocalPart :: String -> LA XmlTree XmlTree # hasNamePrefix :: String -> LA XmlTree XmlTree # hasNamespaceUri :: String -> LA XmlTree XmlTree # hasAttr :: String -> LA XmlTree XmlTree # hasQAttr :: QName -> LA XmlTree XmlTree # hasAttrValue :: String -> (String -> Bool) -> LA XmlTree XmlTree # hasQAttrValue :: QName -> (String -> Bool) -> LA XmlTree XmlTree # mkText :: LA String XmlTree # mkBlob :: LA Blob XmlTree # mkCharRef :: LA Int XmlTree # mkEntityRef :: LA String XmlTree # mkCmt :: LA String XmlTree # mkCdata :: LA String XmlTree # mkError :: Int -> LA String XmlTree # mkElement :: QName -> LA n XmlTree -> LA n XmlTree -> LA n XmlTree # mkAttr :: QName -> LA n XmlTree -> LA n XmlTree # mkPi :: QName -> LA n XmlTree -> LA n XmlTree # mkqelem :: QName -> [LA n XmlTree] -> [LA n XmlTree] -> LA n XmlTree # mkelem :: String -> [LA n XmlTree] -> [LA n XmlTree] -> LA n XmlTree # aelem :: String -> [LA n XmlTree] -> LA n XmlTree # selem :: String -> [LA n XmlTree] -> LA n XmlTree # eelem :: String -> LA n XmlTree # root :: [LA n XmlTree] -> [LA n XmlTree] -> LA n XmlTree # qattr :: QName -> LA n XmlTree -> LA n XmlTree # attr :: String -> LA n XmlTree -> LA n XmlTree # txt :: String -> LA n XmlTree # blb :: Blob -> LA n XmlTree # charRef :: Int -> LA n XmlTree # entityRef :: String -> LA n XmlTree # cmt :: String -> LA n XmlTree # warn :: String -> LA n XmlTree # err :: String -> LA n XmlTree # fatal :: String -> LA n XmlTree # spi :: String -> String -> LA n XmlTree # sqattr :: QName -> String -> LA n XmlTree # sattr :: String -> String -> LA n XmlTree # getText :: LA XmlTree String # getCharRef :: LA XmlTree Int # getEntityRef :: LA XmlTree String # getCmt :: LA XmlTree String # getCdata :: LA XmlTree String # getPiName :: LA XmlTree QName # getPiContent :: LA XmlTree XmlTree # getElemName :: LA XmlTree QName # getAttrl :: LA XmlTree XmlTree # getDTDPart :: LA XmlTree DTDElem # getDTDAttrl :: LA XmlTree Attributes # getAttrName :: LA XmlTree QName # getErrorLevel :: LA XmlTree Int # getErrorMsg :: LA XmlTree String # getQName :: LA XmlTree QName # getName :: LA XmlTree String # getUniversalName :: LA XmlTree String # getUniversalUri :: LA XmlTree String # getLocalPart :: LA XmlTree String # getNamePrefix :: LA XmlTree String # getNamespaceUri :: LA XmlTree String # getAttrValue :: String -> LA XmlTree String # getAttrValue0 :: String -> LA XmlTree String # getQAttrValue :: QName -> LA XmlTree String # getQAttrValue0 :: QName -> LA XmlTree String # changeText :: (String -> String) -> LA XmlTree XmlTree # changeBlob :: (Blob -> Blob) -> LA XmlTree XmlTree # changeCmt :: (String -> String) -> LA XmlTree XmlTree # changeQName :: (QName -> QName) -> LA XmlTree XmlTree # changeElemName :: (QName -> QName) -> LA XmlTree XmlTree # changeAttrName :: (QName -> QName) -> LA XmlTree XmlTree # changePiName :: (QName -> QName) -> LA XmlTree XmlTree # changeAttrValue :: (String -> String) -> LA XmlTree XmlTree # changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> LA XmlTree XmlTree -> LA XmlTree XmlTree # setQName :: QName -> LA XmlTree XmlTree # setElemName :: QName -> LA XmlTree XmlTree # setAttrName :: QName -> LA XmlTree XmlTree # setPiName :: QName -> LA XmlTree XmlTree # setAttrl :: LA XmlTree XmlTree -> LA XmlTree XmlTree # addAttrl :: LA XmlTree XmlTree -> LA XmlTree XmlTree # addAttr :: String -> String -> LA XmlTree XmlTree # removeAttr :: String -> LA XmlTree XmlTree # removeQAttr :: QName -> LA XmlTree XmlTree # processAttrl :: LA XmlTree XmlTree -> LA XmlTree XmlTree # processTopDownWithAttrl :: LA XmlTree XmlTree -> LA XmlTree XmlTree # (+=) :: LA b XmlTree -> LA b XmlTree -> LA b XmlTree # xshow :: LA n XmlTree -> LA n String # xshowBlob :: LA n XmlTree -> LA n Blob #
ArrowXml IOLA # |
Methods isText :: IOLA XmlTree XmlTree # isBlob :: IOLA XmlTree XmlTree # isCharRef :: IOLA XmlTree XmlTree # isEntityRef :: IOLA XmlTree XmlTree # isCmt :: IOLA XmlTree XmlTree # isCdata :: IOLA XmlTree XmlTree # isPi :: IOLA XmlTree XmlTree # isXmlPi :: IOLA XmlTree XmlTree # isElem :: IOLA XmlTree XmlTree # isDTD :: IOLA XmlTree XmlTree # isAttr :: IOLA XmlTree XmlTree # isError :: IOLA XmlTree XmlTree # isRoot :: IOLA XmlTree XmlTree # hasText :: (String -> Bool) -> IOLA XmlTree XmlTree # isWhiteSpace :: IOLA XmlTree XmlTree # hasNameWith :: (QName -> Bool) -> IOLA XmlTree XmlTree # hasQName :: QName -> IOLA XmlTree XmlTree # hasName :: String -> IOLA XmlTree XmlTree # hasLocalPart :: String -> IOLA XmlTree XmlTree # hasNamePrefix :: String -> IOLA XmlTree XmlTree # hasNamespaceUri :: String -> IOLA XmlTree XmlTree # hasAttr :: String -> IOLA XmlTree XmlTree # hasQAttr :: QName -> IOLA XmlTree XmlTree # hasAttrValue :: String -> (String -> Bool) -> IOLA XmlTree XmlTree # hasQAttrValue :: QName -> (String -> Bool) -> IOLA XmlTree XmlTree # mkText :: IOLA String XmlTree # mkBlob :: IOLA Blob XmlTree # mkCharRef :: IOLA Int XmlTree # mkEntityRef :: IOLA String XmlTree # mkCmt :: IOLA String XmlTree # mkCdata :: IOLA String XmlTree # mkError :: Int -> IOLA String XmlTree # mkElement :: QName -> IOLA n XmlTree -> IOLA n XmlTree -> IOLA n XmlTree # mkAttr :: QName -> IOLA n XmlTree -> IOLA n XmlTree # mkPi :: QName -> IOLA n XmlTree -> IOLA n XmlTree # mkqelem :: QName -> [IOLA n XmlTree] -> [IOLA n XmlTree] -> IOLA n XmlTree # mkelem :: String -> [IOLA n XmlTree] -> [IOLA n XmlTree] -> IOLA n XmlTree # aelem :: String -> [IOLA n XmlTree] -> IOLA n XmlTree # selem :: String -> [IOLA n XmlTree] -> IOLA n XmlTree # eelem :: String -> IOLA n XmlTree # root :: [IOLA n XmlTree] -> [IOLA n XmlTree] -> IOLA n XmlTree # qattr :: QName -> IOLA n XmlTree -> IOLA n XmlTree # attr :: String -> IOLA n XmlTree -> IOLA n XmlTree # txt :: String -> IOLA n XmlTree # blb :: Blob -> IOLA n XmlTree # charRef :: Int -> IOLA n XmlTree # entityRef :: String -> IOLA n XmlTree # cmt :: String -> IOLA n XmlTree # warn :: String -> IOLA n XmlTree # err :: String -> IOLA n XmlTree # fatal :: String -> IOLA n XmlTree # spi :: String -> String -> IOLA n XmlTree # sqattr :: QName -> String -> IOLA n XmlTree # sattr :: String -> String -> IOLA n XmlTree # getText :: IOLA XmlTree String # getCharRef :: IOLA XmlTree Int # getEntityRef :: IOLA XmlTree String # getCmt :: IOLA XmlTree String # getCdata :: IOLA XmlTree String # getPiName :: IOLA XmlTree QName # getPiContent :: IOLA XmlTree XmlTree # getElemName :: IOLA XmlTree QName # getAttrl :: IOLA XmlTree XmlTree # getDTDPart :: IOLA XmlTree DTDElem # getDTDAttrl :: IOLA XmlTree Attributes # getAttrName :: IOLA XmlTree QName # getErrorLevel :: IOLA XmlTree Int # getErrorMsg :: IOLA XmlTree String # getQName :: IOLA XmlTree QName # getName :: IOLA XmlTree String # getUniversalName :: IOLA XmlTree String # getUniversalUri :: IOLA XmlTree String # getLocalPart :: IOLA XmlTree String # getNamePrefix :: IOLA XmlTree String # getNamespaceUri :: IOLA XmlTree String # getAttrValue :: String -> IOLA XmlTree String # getAttrValue0 :: String -> IOLA XmlTree String # getQAttrValue :: QName -> IOLA XmlTree String # getQAttrValue0 :: QName -> IOLA XmlTree String # changeText :: (String -> String) -> IOLA XmlTree XmlTree # changeBlob :: (Blob -> Blob) -> IOLA XmlTree XmlTree # changeCmt :: (String -> String) -> IOLA XmlTree XmlTree # changeQName :: (QName -> QName) -> IOLA XmlTree XmlTree # changeElemName :: (QName -> QName) -> IOLA XmlTree XmlTree # changeAttrName :: (QName -> QName) -> IOLA XmlTree XmlTree # changePiName :: (QName -> QName) -> IOLA XmlTree XmlTree # changeAttrValue :: (String -> String) -> IOLA XmlTree XmlTree # changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> IOLA XmlTree XmlTree -> IOLA XmlTree XmlTree # setQName :: QName -> IOLA XmlTree XmlTree # setElemName :: QName -> IOLA XmlTree XmlTree # setAttrName :: QName -> IOLA XmlTree XmlTree # setPiName :: QName -> IOLA XmlTree XmlTree # setAttrl :: IOLA XmlTree XmlTree -> IOLA XmlTree XmlTree # addAttrl :: IOLA XmlTree XmlTree -> IOLA XmlTree XmlTree # addAttr :: String -> String -> IOLA XmlTree XmlTree # removeAttr :: String -> IOLA XmlTree XmlTree # removeQAttr :: QName -> IOLA XmlTree XmlTree # processAttrl :: IOLA XmlTree XmlTree -> IOLA XmlTree XmlTree # processTopDownWithAttrl :: IOLA XmlTree XmlTree -> IOLA XmlTree XmlTree # (+=) :: IOLA b XmlTree -> IOLA b XmlTree -> IOLA b XmlTree # xshow :: IOLA n XmlTree -> IOLA n String # xshowBlob :: IOLA n XmlTree -> IOLA n Blob #
ArrowXml (SLA s) # |
Methods isText :: SLA s XmlTree XmlTree # isBlob :: SLA s XmlTree XmlTree # isCharRef :: SLA s XmlTree XmlTree # isEntityRef :: SLA s XmlTree XmlTree # isCmt :: SLA s XmlTree XmlTree # isCdata :: SLA s XmlTree XmlTree # isPi :: SLA s XmlTree XmlTree # isXmlPi :: SLA s XmlTree XmlTree # isElem :: SLA s XmlTree XmlTree # isDTD :: SLA s XmlTree XmlTree # isAttr :: SLA s XmlTree XmlTree # isError :: SLA s XmlTree XmlTree # isRoot :: SLA s XmlTree XmlTree # hasText :: (String -> Bool) -> SLA s XmlTree XmlTree # isWhiteSpace :: SLA s XmlTree XmlTree # hasNameWith :: (QName -> Bool) -> SLA s XmlTree XmlTree # hasQName :: QName -> SLA s XmlTree XmlTree # hasName :: String -> SLA s XmlTree XmlTree # hasLocalPart :: String -> SLA s XmlTree XmlTree # hasNamePrefix :: String -> SLA s XmlTree XmlTree # hasNamespaceUri :: String -> SLA s XmlTree XmlTree # hasAttr :: String -> SLA s XmlTree XmlTree # hasQAttr :: QName -> SLA s XmlTree XmlTree # hasAttrValue :: String -> (String -> Bool) -> SLA s XmlTree XmlTree # hasQAttrValue :: QName -> (String -> Bool) -> SLA s XmlTree XmlTree # mkText :: SLA s String XmlTree # mkBlob :: SLA s Blob XmlTree # mkCharRef :: SLA s Int XmlTree # mkEntityRef :: SLA s String XmlTree # mkCmt :: SLA s String XmlTree # mkCdata :: SLA s String XmlTree # mkError :: Int -> SLA s String XmlTree # mkElement :: QName -> SLA s n XmlTree -> SLA s n XmlTree -> SLA s n XmlTree # mkAttr :: QName -> SLA s n XmlTree -> SLA s n XmlTree # mkPi :: QName -> SLA s n XmlTree -> SLA s n XmlTree # mkqelem :: QName -> [SLA s n XmlTree] -> [SLA s n XmlTree] -> SLA s n XmlTree # mkelem :: String -> [SLA s n XmlTree] -> [SLA s n XmlTree] -> SLA s n XmlTree # aelem :: String -> [SLA s n XmlTree] -> SLA s n XmlTree # selem :: String -> [SLA s n XmlTree] -> SLA s n XmlTree # eelem :: String -> SLA s n XmlTree # root :: [SLA s n XmlTree] -> [SLA s n XmlTree] -> SLA s n XmlTree # qattr :: QName -> SLA s n XmlTree -> SLA s n XmlTree # attr :: String -> SLA s n XmlTree -> SLA s n XmlTree # txt :: String -> SLA s n XmlTree # blb :: Blob -> SLA s n XmlTree # charRef :: Int -> SLA s n XmlTree # entityRef :: String -> SLA s n XmlTree # cmt :: String -> SLA s n XmlTree # warn :: String -> SLA s n XmlTree # err :: String -> SLA s n XmlTree # fatal :: String -> SLA s n XmlTree # spi :: String -> String -> SLA s n XmlTree # sqattr :: QName -> String -> SLA s n XmlTree # sattr :: String -> String -> SLA s n XmlTree # getText :: SLA s XmlTree String # getCharRef :: SLA s XmlTree Int # getEntityRef :: SLA s XmlTree String # getCmt :: SLA s XmlTree String # getCdata :: SLA s XmlTree String # getPiName :: SLA s XmlTree QName # getPiContent :: SLA s XmlTree XmlTree # getElemName :: SLA s XmlTree QName # getAttrl :: SLA s XmlTree XmlTree # getDTDPart :: SLA s XmlTree DTDElem # getDTDAttrl :: SLA s XmlTree Attributes # getAttrName :: SLA s XmlTree QName # getErrorLevel :: SLA s XmlTree Int # getErrorMsg :: SLA s XmlTree String # getQName :: SLA s XmlTree QName # getName :: SLA s XmlTree String # getUniversalName :: SLA s XmlTree String # getUniversalUri :: SLA s XmlTree String # getLocalPart :: SLA s XmlTree String # getNamePrefix :: SLA s XmlTree String # getNamespaceUri :: SLA s XmlTree String # getAttrValue :: String -> SLA s XmlTree String # getAttrValue0 :: String -> SLA s XmlTree String # getQAttrValue :: QName -> SLA s XmlTree String # getQAttrValue0 :: QName -> SLA s XmlTree String # changeText :: (String -> String) -> SLA s XmlTree XmlTree # changeBlob :: (Blob -> Blob) -> SLA s XmlTree XmlTree # changeCmt :: (String -> String) -> SLA s XmlTree XmlTree # changeQName :: (QName -> QName) -> SLA s XmlTree XmlTree # changeElemName :: (QName -> QName) -> SLA s XmlTree XmlTree # changeAttrName :: (QName -> QName) -> SLA s XmlTree XmlTree # changePiName :: (QName -> QName) -> SLA s XmlTree XmlTree # changeAttrValue :: (String -> String) -> SLA s XmlTree XmlTree # changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree # setQName :: QName -> SLA s XmlTree XmlTree # setElemName :: QName -> SLA s XmlTree XmlTree # setAttrName :: QName -> SLA s XmlTree XmlTree # setPiName :: QName -> SLA s XmlTree XmlTree # setAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree # addAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree # addAttr :: String -> String -> SLA s XmlTree XmlTree # removeAttr :: String -> SLA s XmlTree XmlTree # removeQAttr :: QName -> SLA s XmlTree XmlTree # processAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree # processTopDownWithAttrl :: SLA s XmlTree XmlTree -> SLA s XmlTree XmlTree # (+=) :: SLA s b XmlTree -> SLA s b XmlTree -> SLA s b XmlTree # xshow :: SLA s n XmlTree -> SLA s n String # xshowBlob :: SLA s n XmlTree -> SLA s n Blob #
ArrowXml (IOSLA s) # |
Methods isText :: IOSLA s XmlTree XmlTree # isBlob :: IOSLA s XmlTree XmlTree # isCharRef :: IOSLA s XmlTree XmlTree # isEntityRef :: IOSLA s XmlTree XmlTree # isCmt :: IOSLA s XmlTree XmlTree # isCdata :: IOSLA s XmlTree XmlTree # isPi :: IOSLA s XmlTree XmlTree # isXmlPi :: IOSLA s XmlTree XmlTree # isElem :: IOSLA s XmlTree XmlTree # isDTD :: IOSLA s XmlTree XmlTree # isAttr :: IOSLA s XmlTree XmlTree # isError :: IOSLA s XmlTree XmlTree # isRoot :: IOSLA s XmlTree XmlTree # hasText :: (String -> Bool) -> IOSLA s XmlTree XmlTree # isWhiteSpace :: IOSLA s XmlTree XmlTree # hasNameWith :: (QName -> Bool) -> IOSLA s XmlTree XmlTree # hasQName :: QName -> IOSLA s XmlTree XmlTree # hasName :: String -> IOSLA s XmlTree XmlTree # hasLocalPart :: String -> IOSLA s XmlTree XmlTree # hasNamePrefix :: String -> IOSLA s XmlTree XmlTree # hasNamespaceUri :: String -> IOSLA s XmlTree XmlTree # hasAttr :: String -> IOSLA s XmlTree XmlTree # hasQAttr :: QName -> IOSLA s XmlTree XmlTree # hasAttrValue :: String -> (String -> Bool) -> IOSLA s XmlTree XmlTree # hasQAttrValue :: QName -> (String -> Bool) -> IOSLA s XmlTree XmlTree # mkText :: IOSLA s String XmlTree # mkBlob :: IOSLA s Blob XmlTree # mkCharRef :: IOSLA s Int XmlTree # mkEntityRef :: IOSLA s String XmlTree # mkCmt :: IOSLA s String XmlTree # mkCdata :: IOSLA s String XmlTree # mkError :: Int -> IOSLA s String XmlTree # mkElement :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkAttr :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkPi :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkqelem :: QName -> [IOSLA s n XmlTree] -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # mkelem :: String -> [IOSLA s n XmlTree] -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # aelem :: String -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # selem :: String -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # eelem :: String -> IOSLA s n XmlTree # root :: [IOSLA s n XmlTree] -> [IOSLA s n XmlTree] -> IOSLA s n XmlTree # qattr :: QName -> IOSLA s n XmlTree -> IOSLA s n XmlTree # attr :: String -> IOSLA s n XmlTree -> IOSLA s n XmlTree # txt :: String -> IOSLA s n XmlTree # blb :: Blob -> IOSLA s n XmlTree # charRef :: Int -> IOSLA s n XmlTree # entityRef :: String -> IOSLA s n XmlTree # cmt :: String -> IOSLA s n XmlTree # warn :: String -> IOSLA s n XmlTree # err :: String -> IOSLA s n XmlTree # fatal :: String -> IOSLA s n XmlTree # spi :: String -> String -> IOSLA s n XmlTree # sqattr :: QName -> String -> IOSLA s n XmlTree # sattr :: String -> String -> IOSLA s n XmlTree # getText :: IOSLA s XmlTree String # getCharRef :: IOSLA s XmlTree Int # getEntityRef :: IOSLA s XmlTree String # getCmt :: IOSLA s XmlTree String # getCdata :: IOSLA s XmlTree String # getPiName :: IOSLA s XmlTree QName # getPiContent :: IOSLA s XmlTree XmlTree # getElemName :: IOSLA s XmlTree QName # getAttrl :: IOSLA s XmlTree XmlTree # getDTDPart :: IOSLA s XmlTree DTDElem # getDTDAttrl :: IOSLA s XmlTree Attributes # getAttrName :: IOSLA s XmlTree QName # getErrorLevel :: IOSLA s XmlTree Int # getErrorMsg :: IOSLA s XmlTree String # getQName :: IOSLA s XmlTree QName # getName :: IOSLA s XmlTree String # getUniversalName :: IOSLA s XmlTree String # getUniversalUri :: IOSLA s XmlTree String # getLocalPart :: IOSLA s XmlTree String # getNamePrefix :: IOSLA s XmlTree String # getNamespaceUri :: IOSLA s XmlTree String # getAttrValue :: String -> IOSLA s XmlTree String # getAttrValue0 :: String -> IOSLA s XmlTree String # getQAttrValue :: QName -> IOSLA s XmlTree String # getQAttrValue0 :: QName -> IOSLA s XmlTree String # changeText :: (String -> String) -> IOSLA s XmlTree XmlTree # changeBlob :: (Blob -> Blob) -> IOSLA s XmlTree XmlTree # changeCmt :: (String -> String) -> IOSLA s XmlTree XmlTree # changeQName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changeElemName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changeAttrName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changePiName :: (QName -> QName) -> IOSLA s XmlTree XmlTree # changeAttrValue :: (String -> String) -> IOSLA s XmlTree XmlTree # changeAttrl :: (XmlTrees -> XmlTrees -> XmlTrees) -> IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # setQName :: QName -> IOSLA s XmlTree XmlTree # setElemName :: QName -> IOSLA s XmlTree XmlTree # setAttrName :: QName -> IOSLA s XmlTree XmlTree # setPiName :: QName -> IOSLA s XmlTree XmlTree # setAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # addAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # addAttr :: String -> String -> IOSLA s XmlTree XmlTree # removeAttr :: String -> IOSLA s XmlTree XmlTree # removeQAttr :: QName -> IOSLA s XmlTree XmlTree # processAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # processTopDownWithAttrl :: IOSLA s XmlTree XmlTree -> IOSLA s XmlTree XmlTree # (+=) :: IOSLA s b XmlTree -> IOSLA s b XmlTree -> IOSLA s b XmlTree # xshow :: IOSLA s n XmlTree -> IOSLA s n String # xshowBlob :: IOSLA s n XmlTree -> IOSLA s n Blob #

class ArrowXml a => ArrowDTD a where #

Document Type Definition arrows

These are separated, because they are not needed for document processing, only when processing the DTD, e.g. for generating access funtions for the toolbox from a DTD (se example DTDtoHaskell in the examples directory)

Methods

isDTDDoctype :: a XmlTree XmlTree #

isDTDElement :: a XmlTree XmlTree #

isDTDContent :: a XmlTree XmlTree #

isDTDAttlist :: a XmlTree XmlTree #

isDTDEntity :: a XmlTree XmlTree #

isDTDPEntity :: a XmlTree XmlTree #

isDTDNotation :: a XmlTree XmlTree #

isDTDCondSect :: a XmlTree XmlTree #

isDTDName :: a XmlTree XmlTree #

isDTDPERef :: a XmlTree XmlTree #

hasDTDAttr :: String -> a XmlTree XmlTree #

getDTDAttrValue :: String -> a XmlTree String #

setDTDAttrValue :: String -> String -> a XmlTree XmlTree #

mkDTDElem :: DTDElem -> Attributes -> a n XmlTree -> a n XmlTree #

mkDTDDoctype :: Attributes -> a n XmlTree -> a n XmlTree #

mkDTDElement :: Attributes -> a n XmlTree #

mkDTDEntity :: Attributes -> a n XmlTree #

mkDTDPEntity :: Attributes -> a n XmlTree #

Instances

ArrowDTD LA # |
Methods isDTDDoctype :: LA XmlTree XmlTree # isDTDElement :: LA XmlTree XmlTree # isDTDContent :: LA XmlTree XmlTree # isDTDAttlist :: LA XmlTree XmlTree # isDTDEntity :: LA XmlTree XmlTree # isDTDPEntity :: LA XmlTree XmlTree # isDTDNotation :: LA XmlTree XmlTree # isDTDCondSect :: LA XmlTree XmlTree # isDTDName :: LA XmlTree XmlTree # isDTDPERef :: LA XmlTree XmlTree # hasDTDAttr :: String -> LA XmlTree XmlTree # getDTDAttrValue :: String -> LA XmlTree String # setDTDAttrValue :: String -> String -> LA XmlTree XmlTree # mkDTDElem :: DTDElem -> Attributes -> LA n XmlTree -> LA n XmlTree # mkDTDDoctype :: Attributes -> LA n XmlTree -> LA n XmlTree # mkDTDElement :: Attributes -> LA n XmlTree # mkDTDEntity :: Attributes -> LA n XmlTree # mkDTDPEntity :: Attributes -> LA n XmlTree #
ArrowDTD IOLA # |
Methods isDTDDoctype :: IOLA XmlTree XmlTree # isDTDElement :: IOLA XmlTree XmlTree # isDTDContent :: IOLA XmlTree XmlTree # isDTDAttlist :: IOLA XmlTree XmlTree # isDTDEntity :: IOLA XmlTree XmlTree # isDTDPEntity :: IOLA XmlTree XmlTree # isDTDNotation :: IOLA XmlTree XmlTree # isDTDCondSect :: IOLA XmlTree XmlTree # isDTDName :: IOLA XmlTree XmlTree # isDTDPERef :: IOLA XmlTree XmlTree # hasDTDAttr :: String -> IOLA XmlTree XmlTree # getDTDAttrValue :: String -> IOLA XmlTree String # setDTDAttrValue :: String -> String -> IOLA XmlTree XmlTree # mkDTDElem :: DTDElem -> Attributes -> IOLA n XmlTree -> IOLA n XmlTree # mkDTDDoctype :: Attributes -> IOLA n XmlTree -> IOLA n XmlTree # mkDTDElement :: Attributes -> IOLA n XmlTree # mkDTDEntity :: Attributes -> IOLA n XmlTree # mkDTDPEntity :: Attributes -> IOLA n XmlTree #
ArrowDTD (SLA s) # |
Methods isDTDDoctype :: SLA s XmlTree XmlTree # isDTDElement :: SLA s XmlTree XmlTree # isDTDContent :: SLA s XmlTree XmlTree # isDTDAttlist :: SLA s XmlTree XmlTree # isDTDEntity :: SLA s XmlTree XmlTree # isDTDPEntity :: SLA s XmlTree XmlTree # isDTDNotation :: SLA s XmlTree XmlTree # isDTDCondSect :: SLA s XmlTree XmlTree # isDTDName :: SLA s XmlTree XmlTree # isDTDPERef :: SLA s XmlTree XmlTree # hasDTDAttr :: String -> SLA s XmlTree XmlTree # getDTDAttrValue :: String -> SLA s XmlTree String # setDTDAttrValue :: String -> String -> SLA s XmlTree XmlTree # mkDTDElem :: DTDElem -> Attributes -> SLA s n XmlTree -> SLA s n XmlTree # mkDTDDoctype :: Attributes -> SLA s n XmlTree -> SLA s n XmlTree # mkDTDElement :: Attributes -> SLA s n XmlTree # mkDTDEntity :: Attributes -> SLA s n XmlTree # mkDTDPEntity :: Attributes -> SLA s n XmlTree #
ArrowDTD (IOSLA s) # |
Methods isDTDDoctype :: IOSLA s XmlTree XmlTree # isDTDElement :: IOSLA s XmlTree XmlTree # isDTDContent :: IOSLA s XmlTree XmlTree # isDTDAttlist :: IOSLA s XmlTree XmlTree # isDTDEntity :: IOSLA s XmlTree XmlTree # isDTDPEntity :: IOSLA s XmlTree XmlTree # isDTDNotation :: IOSLA s XmlTree XmlTree # isDTDCondSect :: IOSLA s XmlTree XmlTree # isDTDName :: IOSLA s XmlTree XmlTree # isDTDPERef :: IOSLA s XmlTree XmlTree # hasDTDAttr :: String -> IOSLA s XmlTree XmlTree # getDTDAttrValue :: String -> IOSLA s XmlTree String # setDTDAttrValue :: String -> String -> IOSLA s XmlTree XmlTree # mkDTDElem :: DTDElem -> Attributes -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkDTDDoctype :: Attributes -> IOSLA s n XmlTree -> IOSLA s n XmlTree # mkDTDElement :: Attributes -> IOSLA s n XmlTree # mkDTDEntity :: Attributes -> IOSLA s n XmlTree # mkDTDPEntity :: Attributes -> IOSLA s n XmlTree #