hxt-7.4: A collection of tools for processing XML with Haskell.Source codeContentsIndex
Text.XML.HXT.RelaxNG.DataTypes
Synopsis
relaxSchemaFile :: String
relaxSchemaGrammarFile :: String
a_relaxSimplificationChanges :: String
type Env = [(String, XmlTree)]
contextAttributes :: String
contextBaseAttr :: String
type OldName = String
type NewName = String
type NamePair = (OldName, NewName)
type RefList = [NamePair]
type DatatypeEqual = DatatypeName -> String -> Context -> String -> Context -> Maybe String
type DatatypeAllows = DatatypeName -> ParamList -> String -> Context -> Maybe String
type DatatypeLibraries = [DatatypeLibrary]
type DatatypeLibrary = (Uri, DatatypeCheck)
type DatatypeName = String
type ParamName = String
type AllowedParams = [ParamName]
type AllowedDatatypes = [(DatatypeName, AllowedParams)]
data DatatypeCheck = DTC {
dtAllowsFct :: DatatypeAllows
dtEqualFct :: DatatypeEqual
dtAllowedTypes :: AllowedDatatypes
}
type Uri = String
type LocalName = String
type ParamList = [(LocalName, String)]
type Prefix = String
type Context = (Uri, [(Prefix, Uri)])
type Datatype = (Uri, LocalName)
showDatatype :: Datatype -> String
data NameClass
= AnyName
| AnyNameExcept NameClass
| Name Uri LocalName
| NsName Uri
| NsNameExcept Uri NameClass
| NameClassChoice NameClass NameClass
| NCError String
data Pattern
= Empty
| NotAllowed ErrMessage
| Text
| Choice Pattern Pattern
| Interleave Pattern Pattern
| Group Pattern Pattern
| OneOrMore Pattern
| List Pattern
| Data Datatype ParamList
| DataExcept Datatype ParamList Pattern
| Value Datatype String Context
| Attribute NameClass Pattern
| Element NameClass Pattern
| After Pattern Pattern
data ErrMessage = ErrMsg ErrLevel [String]
type ErrLevel = Int
notAllowed :: String -> Pattern
notAllowed1 :: String -> Pattern
notAllowed2 :: String -> Pattern
notAllowedN :: ErrLevel -> String -> Pattern
mergeNotAllowed :: Pattern -> Pattern -> Pattern
choice :: Pattern -> Pattern -> Pattern
group :: Pattern -> Pattern -> Pattern
oneOrMore :: Pattern -> Pattern
interleave :: Pattern -> Pattern -> Pattern
after :: Pattern -> Pattern -> Pattern
data ContentType
= CTEmpty
| CTComplex
| CTSimple
| CTNone
Documentation
relaxSchemaFile :: StringSource
relaxSchemaGrammarFile :: StringSource
a_relaxSimplificationChanges :: StringSource
type Env = [(String, XmlTree)]Source
contextAttributes :: StringSource

Start of a context attribute value (see also: Text.XML.HXT.RelaxNG.Simplification.simplificationStep1)

The value is always followed by the original attribute name and value

contextBaseAttr :: StringSource
Start of base uri attribute value (see also: simplificationStep1 in Text.XML.HXT.RelaxNG.Simplification)
type OldName = StringSource
type NewName = StringSource
type NamePair = (OldName, NewName)Source
type RefList = [NamePair]Source
type DatatypeEqual = DatatypeName -> String -> Context -> String -> Context -> Maybe StringSource

Type of all datatype libraries functions that tests whether a XML instance value matches a value-pattern.

Returns Just "errorMessage" in case of an error else Nothing.

type DatatypeAllows = DatatypeName -> ParamList -> String -> Context -> Maybe StringSource

Type of all datatype libraries functions that tests whether a XML instance value matches a data-pattern.

Returns Just "errorMessage" in case of an error else Nothing.

type DatatypeLibraries = [DatatypeLibrary]Source
List of all supported datatype libraries
type DatatypeLibrary = (Uri, DatatypeCheck)Source
Each datatype library is identified by a URI.
type DatatypeName = StringSource
type ParamName = StringSource
type AllowedParams = [ParamName]Source
List of all supported params for a datatype
type AllowedDatatypes = [(DatatypeName, AllowedParams)]Source
List of all supported datatypes and there allowed params
data DatatypeCheck Source
The Constructor exports the list of supported datatypes for a library. It also exports the specialized datatype library functions to validate a XML instance value with respect to a datatype.
Constructors
DTC
dtAllowsFct :: DatatypeAllowsfunction to test whether a value matches a data-pattern
dtEqualFct :: DatatypeEqualfunction to test whether a value matches a value-pattern
dtAllowedTypes :: AllowedDatatypeslist of all supported params for a datatype
type Uri = StringSource
type LocalName = StringSource
type ParamList = [(LocalName, String)]Source
List of parameters; each parameter is a pair consisting of a local name and a value.
type Prefix = StringSource
type Context = (Uri, [(Prefix, Uri)])Source
A Context represents the context of an XML element. It consists of a base URI and a mapping from prefixes to namespace URIs.
type Datatype = (Uri, LocalName)Source
A Datatype identifies a datatype by a datatype library name and a local name.
showDatatype :: Datatype -> StringSource
data NameClass Source
Represents a name class
Constructors
AnyName
AnyNameExcept NameClass
Name Uri LocalName
NsName Uri
NsNameExcept Uri NameClass
NameClassChoice NameClass NameClass
NCError String
show/hide Instances
data Pattern Source
Represents a pattern after simplification
Constructors
Empty
NotAllowed ErrMessage
Text
Choice Pattern Pattern
Interleave Pattern Pattern
Group Pattern Pattern
OneOrMore Pattern
List Pattern
Data Datatype ParamList
DataExcept Datatype ParamList Pattern
Value Datatype String Context
Attribute NameClass Pattern
Element NameClass Pattern
After Pattern Pattern
show/hide Instances
data ErrMessage Source
Constructors
ErrMsg ErrLevel [String]
show/hide Instances
type ErrLevel = IntSource
notAllowed :: String -> PatternSource
smart constructor for NotAllowed
notAllowed1 :: String -> PatternSource
notAllowed2 :: String -> PatternSource
notAllowedN :: ErrLevel -> String -> PatternSource
mergeNotAllowed :: Pattern -> Pattern -> PatternSource

merge error messages

If error levels are different, the more important is taken, if level is 2 (max level) both error messages are taken else the 1. error mesage is taken

choice :: Pattern -> Pattern -> PatternSource
smart constructor for Choice
group :: Pattern -> Pattern -> PatternSource
smart constructor for Group
oneOrMore :: Pattern -> PatternSource
smart constructor for OneOrMore
interleave :: Pattern -> Pattern -> PatternSource
smart constructor for Interleave
after :: Pattern -> Pattern -> PatternSource
smart constructor for After
data ContentType Source
Possible content types of a Relax NG pattern. (see also chapter 7.2 in Relax NG specification)
Constructors
CTEmpty
CTComplex
CTSimple
CTNone
show/hide Instances
Produced by Haddock version 2.3.0