HaXml-1.25.4: Utilities for manipulating XML documents

Safe Haskell | Safe
Language | Haskell98

Text.XML.HaXml.Schema.TypeConversion

Contents

- Orphan instances

Synopsis

- typeLift :: Schema -> Schema
- convert :: Environment -> Schema -> [Decl]
- comment :: Annotation -> Comment
- xname :: String -> XName
- checkXName :: Schema -> QName -> XName
- nameOfSimple :: SimpleType -> XName
- mkRestrict :: Restriction -> [Restrict]
- singleton :: a -> [a]
- consolidate :: Occurs -> (FacetType, Annotation, String) -> Occurs
- combineOccursModifier :: Occurs -> Modifier -> Modifier
- occursToModifier :: Occurs -> Modifier
- supertypeOf :: Environment -> QName -> Maybe QName
- repeatedly :: (a -> Maybe a) -> a -> [a]

# Documentation

typeLift :: Schema -> Schema #

Transform a Schema by lifting all locally-defined anonymous types to the top-level, naming them, and planting a referend at their original location.

convert :: Environment -> Schema -> [Decl] #

Given an environment of schema type mappings, and a schema module, create a bunch of Decls that describe the types in a more Haskell-friendly way.

comment :: Annotation -> Comment #

xname :: String -> XName #

checkXName :: Schema -> QName -> XName #

nameOfSimple :: SimpleType -> XName #

mkRestrict :: Restriction -> [Restrict] #

singleton :: a -> [a] #

consolidate :: Occurs -> (FacetType, Annotation, String) -> Occurs #

Consolidate a Facet occurrence into a single Occurs value.

combineOccursModifier :: Occurs -> Modifier -> Modifier #

Push another Occurs value inside an existing Modifier.

occursToModifier :: Occurs -> Modifier #

Convert an occurs range to a Haskell-style type modifier (Maybe, List, Id)

supertypeOf :: Environment -> QName -> Maybe QName #

Find the supertype (if it exists) of a given type name.

repeatedly :: (a -> Maybe a) -> a -> [a] #

Keep applying the function to transform the value, until it yields Nothing. Returns the sequence of transformed values.

# Orphan instances

Monoid Occurs # |
Methods mempty :: Occurs # mappend :: Occurs -> Occurs -> Occurs # mconcat :: [Occurs] -> Occurs #