hxt-7.4: A collection of tools for processing XML with Haskell.Source codeContentsIndex
Text.XML.HXT.RelaxNG.DataTypeLibUtils
Description
exports helper functions for the integration of new datatype-libraries
Synopsis
errorMsgEqual :: DatatypeName -> String -> String -> String
errorMsgDataTypeNotAllowed :: String -> [(String, String)] -> String -> String -> String
errorMsgDataTypeNotAllowed0 :: String -> String -> String
errorMsgDataTypeNotAllowed2 :: String -> String -> String -> String -> String
errorMsgDataLibQName :: String -> String -> String -> String
rng_maxLength :: String
module Text.XML.HXT.DOM.Util
module Text.XML.HXT.RelaxNG.Utils
module Text.XML.HXT.RelaxNG.DataTypes
alwaysOK :: Check a
alwaysErr :: (a -> String) -> Check a
orErr :: (a -> Bool) -> (a -> String) -> Check a
andCheck :: Check a -> Check a -> Check a
withVal :: Check a -> (b -> a) -> Check b
stringValid :: DatatypeName -> Integer -> Integer -> ParamList -> Check String
numberValid :: DatatypeName -> Integer -> Integer -> ParamList -> Check String
Documentation
errorMsgEqual :: DatatypeName -> String -> String -> StringSource
errorMsgDataTypeNotAllowed :: String -> [(String, String)] -> String -> String -> StringSource
errorMsgDataTypeNotAllowed0 :: String -> String -> StringSource
errorMsgDataTypeNotAllowed2 :: String -> String -> String -> String -> StringSource
errorMsgDataLibQName :: String -> String -> String -> StringSource
rng_maxLength :: StringSource
module Text.XML.HXT.DOM.Util
module Text.XML.HXT.RelaxNG.Utils
module Text.XML.HXT.RelaxNG.DataTypes
alwaysOK :: Check aSource
Unit for checks
alwaysErr :: (a -> String) -> Check aSource
Zero for checks: Create an error message for an illegal value
orErr :: (a -> Bool) -> (a -> String) -> Check aSource
Perform check and generate error message on failure
andCheck :: Check a -> Check a -> Check aSource
Combine two checks
withVal :: Check a -> (b -> a) -> Check bSource
stringValid :: DatatypeName -> Integer -> Integer -> ParamList -> Check StringSource

Tests whether a "string" datatype value is between the lower and upper bound of the datatype and matches all parameters.

All tests are performed on the string value.

  • 1.parameter : datatype
  • 2.parameter : lower bound of the datatype range
  • 3.parameter : upper bound of the datatype range (-1 = no upper bound)
  • 4.parameter : list of parameters
  • 5.parameter : datatype value to be checked
  • return : Just "Errormessage" in case of an error, else Nothing
numberValid :: DatatypeName -> Integer -> Integer -> ParamList -> Check StringSource

Tests whether a "numeric" datatype value is between the lower and upper bound of the datatype and matches all parameters.

First, the string value is parsed into a numeric representation. If no error occur, all following tests are performed on the numeric value.

  • 1.parameter : datatype
  • 2.parameter : lower bound of the datatype range
  • 3.parameter : upper bound of the datatype range (-1 = no upper bound)
  • 4.parameter : list of parameters
  • 5.parameter : datatype value to be checked
  • return : Just "Errormessage" in case of an error, else Nothing
Produced by Haddock version 2.3.0