Hets - the Heterogeneous Tool Set

Copyright(c) Christian Maeder DFKI GmbH 2010
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellNone

Common.XUpdate

Description

Synopsis

Documentation

data AddChange Source #

possible insertions

Constructors

AddElem Element 
AddAttr Attr 
AddText String 
AddComment String 
AddPI String String 
ValueOf 

Instances

Show AddChange Source # 

Methods

showsPrec :: Int -> AddChange -> ShowS

show :: AddChange -> String

showList :: [AddChange] -> ShowS

valueOfS :: String Source #

data Insert Source #

Constructors

Before 
After 
Append 

Instances

Eq Insert Source # 

Methods

(==) :: Insert -> Insert -> Bool

(/=) :: Insert -> Insert -> Bool

Show Insert Source # 

Methods

showsPrec :: Int -> Insert -> ShowS

show :: Insert -> String

showList :: [Insert] -> ShowS

showInsert :: Insert -> String Source #

data ChangeSel Source #

Constructors

Add Insert [AddChange] 
Remove 
Update String 
Rename String 
Variable String 

Instances

Show ChangeSel Source # 

Methods

showsPrec :: Int -> ChangeSel -> ShowS

show :: ChangeSel -> String

showList :: [ChangeSel] -> ShowS

data Change Source #

Constructors

Change ChangeSel Expr 

Instances

Show Change Source # 

Methods

showsPrec :: Int -> Change -> ShowS

show :: Change -> String

showList :: [Change] -> ShowS

anaXUpdates :: Monad m => String -> m [Change] Source #

anaMods :: Monad m => Element -> m [Change] Source #

xupdateS :: String Source #

updateS :: String Source #

elementS :: String Source #

attributeS :: String Source #

textS :: String Source #

appendS :: String Source #

removeS :: String Source #

selectS :: String Source #

isXUpdateQN :: QName -> Bool Source #

hasLocalQN :: String -> QName -> Bool Source #

isElementQN :: QName -> Bool Source #

isAttributeQN :: QName -> Bool Source #

isTextQN :: QName -> Bool Source #

isAddQN :: QName -> Bool Source #

isRemoveQN :: QName -> Bool Source #

getAttrVal :: Monad m => String -> Element -> m String Source #

extract the non-empty attribute value

readAttrVal :: (Read a, Monad m) => String -> String -> Element -> m a Source #

apply a read operation to the extracted value

maybeF :: Monad m => String -> Maybe a -> m a Source #

getSelectAttr :: Monad m => Element -> m String Source #

getNameAttr :: Monad m => Element -> m String Source #

str2QName :: String -> QName Source #

convert a string to a qualified name by splitting at the colon

getText :: Monad m => Element -> m String Source #

extract text and check for no other children

getXUpdateText :: Monad m => Element -> m String Source #

anaXUpdate :: Monad m => Element -> m Change Source #

partitionAddChanges :: [AddChange] -> ([Attr], [Content]) Source #

partitions additions and ignores comments, pi, and value-of

failX :: Monad m => String -> QName -> m a Source #

noContent :: Monad m => Element -> a -> m a Source #

check if the element contains no other content

addXElem :: Monad m => Element -> m AddChange Source #

emptyCData :: CData -> Bool Source #

validContent :: Content -> Bool Source #

cleanUpElem :: Element -> Element Source #