hxt-relaxng-9.1.5.5: The HXT RelaxNG validator
Safe HaskellNone
LanguageHaskell98

Text.XML.HXT.RelaxNG.DataTypes

Synopsis

Documentation

type Env = [(String, XmlTree)] Source #

type PatternEnv = [(String, Pattern)] Source #

contextAttributes :: String Source #

Start of a context attribute value (see also: simplificationStep1)

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

contextBaseAttr :: String Source #

Start of base uri attribute value (see also: simplificationStep1 in Text.XML.HXT.RelaxNG.Simplification)

type OldName = String Source #

type NewName = String Source #

type DatatypeEqual = DatatypeName -> String -> Context -> String -> Context -> Maybe String Source #

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 String Source #

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 = String Source #

type ParamName = String Source #

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 

Fields

type Uri = String Source #

type LocalName = String Source #

type ParamList = [(LocalName, String)] Source #

List of parameters; each parameter is a pair consisting of a local name and a value.

type Prefix = String Source #

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.

data NameClass Source #

Represents a name class

Instances

Instances details
Eq NameClass Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

(==) :: NameClass -> NameClass -> Bool

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

Ord NameClass Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

compare :: NameClass -> NameClass -> Ordering

(<) :: NameClass -> NameClass -> Bool

(<=) :: NameClass -> NameClass -> Bool

(>) :: NameClass -> NameClass -> Bool

(>=) :: NameClass -> NameClass -> Bool

max :: NameClass -> NameClass -> NameClass

min :: NameClass -> NameClass -> NameClass

Show NameClass Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

showsPrec :: Int -> NameClass -> ShowS

show :: NameClass -> String

showList :: [NameClass] -> ShowS

data Pattern' Source #

Instances

Instances details
Eq Pattern' Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

(==) :: Pattern' -> Pattern' -> Bool

(/=) :: Pattern' -> Pattern' -> Bool

Ord Pattern' Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

compare :: Pattern' -> Pattern' -> Ordering

(<) :: Pattern' -> Pattern' -> Bool

(<=) :: Pattern' -> Pattern' -> Bool

(>) :: Pattern' -> Pattern' -> Bool

(>=) :: Pattern' -> Pattern' -> Bool

max :: Pattern' -> Pattern' -> Pattern'

min :: Pattern' -> Pattern' -> Pattern'

equiv :: Pattern -> Pattern -> Bool Source #

gt :: Pattern -> Pattern -> Bool Source #

data ErrMessage Source #

Constructors

ErrMsg ErrLevel [String] 

Instances

Instances details
Show ErrMessage Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

showsPrec :: Int -> ErrMessage -> ShowS

show :: ErrMessage -> String

showList :: [ErrMessage] -> ShowS

type ErrLevel = Int Source #

notAllowed :: String -> Pattern Source #

smart constructor for NotAllowed

mergeNotAllowed :: Pattern -> Pattern -> Pattern Source #

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 -> Pattern Source #

smart constructor for Choice

nexted choices are transformed into a sorted list

group :: Pattern -> Pattern -> Pattern Source #

smart constructor for Group

oneOrMore :: Pattern -> Pattern Source #

smart constructor for OneOrMore

interleave :: Pattern -> Pattern -> Pattern Source #

smart constructor for Interleave

nested interleaves are transformed into a sorted list

after :: Pattern -> Pattern -> Pattern Source #

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 

Instances

Instances details
Eq ContentType Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

(==) :: ContentType -> ContentType -> Bool

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

Ord ContentType Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Show ContentType Source # 
Instance details

Defined in Text.XML.HXT.RelaxNG.DataTypes

Methods

showsPrec :: Int -> ContentType -> ShowS

show :: ContentType -> String

showList :: [ContentType] -> ShowS