-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | The HXT RelaxNG validator
--   
--   The HXT RelaxNG validator
@package hxt-relaxng
@version 9.1.5.5

module Text.XML.HXT.RelaxNG.DataTypes
relaxSchemaFile :: String
relaxSchemaGrammarFile :: String
a_numberOfErrors :: String
a_relaxSimplificationChanges :: String
a_output_changes :: String
defineOrigName :: String
type Env = [(String, XmlTree)]
type PatternEnv = [(String, Pattern)]

-- | Start of a context attribute value (see also:
--   simplificationStep1)
--   
--   The value is always followed by the original attribute name and value
contextAttributes :: String
contextAttributesDefault :: String

-- | Start of base uri attribute value (see also:
--   simplificationStep1 in
--   Text.XML.HXT.RelaxNG.Simplification)
contextBaseAttr :: String
type OldName = String
type NewName = String
type NamePair = (OldName, NewName)
type RefList = [NamePair]

-- | 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 DatatypeEqual = DatatypeName -> String -> Context -> String -> Context -> Maybe String

-- | 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 DatatypeAllows = DatatypeName -> ParamList -> String -> Context -> Maybe String

-- | List of all supported datatype libraries
type DatatypeLibraries = [DatatypeLibrary]

-- | Each datatype library is identified by a URI.
type DatatypeLibrary = (Uri, DatatypeCheck)
type DatatypeName = String
type ParamName = String

-- | List of all supported params for a datatype
type AllowedParams = [ParamName]

-- | List of all supported datatypes and there allowed params
type AllowedDatatypes = [(DatatypeName, AllowedParams)]

-- | 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.
data DatatypeCheck
DTC :: DatatypeAllows -> DatatypeEqual -> AllowedDatatypes -> DatatypeCheck

-- | function to test whether a value matches a data-pattern
[dtAllowsFct] :: DatatypeCheck -> DatatypeAllows

-- | function to test whether a value matches a value-pattern
[dtEqualFct] :: DatatypeCheck -> DatatypeEqual

-- | list of all supported params for a datatype
[dtAllowedTypes] :: DatatypeCheck -> AllowedDatatypes
type Uri = String
type LocalName = String

-- | List of parameters; each parameter is a pair consisting of a local
--   name and a value.
type ParamList = [(LocalName, String)]
type Prefix = String

-- | A Context represents the context of an XML element. It consists of a
--   base URI and a mapping from prefixes to namespace URIs.
type Context = (Uri, [(Prefix, Uri)])

-- | A Datatype identifies a datatype by a datatype library name and a
--   local name.
type Datatype = (Uri, LocalName)
showDatatype :: Datatype -> String

-- | Represents a name class
data NameClass
AnyName :: NameClass
AnyNameExcept :: NameClass -> NameClass
Name :: Uri -> LocalName -> NameClass
NsName :: Uri -> NameClass
NsNameExcept :: Uri -> NameClass -> NameClass
NameClassChoice :: NameClass -> NameClass -> NameClass
NCError :: String -> NameClass

-- | Represents a pattern after simplification
data Pattern
NotAllowed :: ErrMessage -> Pattern
Empty :: Pattern
Text :: Pattern
Element :: NameClass -> Pattern -> Pattern
Attribute :: NameClass -> Pattern -> Pattern
Choice :: Pattern -> Pattern -> Pattern
Interleave :: Pattern -> Pattern -> Pattern
Group :: Pattern -> Pattern -> Pattern
After :: Pattern -> Pattern -> Pattern
OneOrMore :: Pattern -> Pattern
Data :: Datatype -> ParamList -> Pattern
DataExcept :: Datatype -> ParamList -> Pattern -> Pattern
List :: Pattern -> Pattern
Value :: Datatype -> String -> Context -> Pattern
data Pattern'
NotAllowed' :: Pattern'
Empty' :: Pattern'
Text' :: Pattern'
Element' :: Pattern'
Attribute' :: Pattern'
Data' :: Pattern'
DataExcept' :: Pattern'
List' :: Pattern'
Value' :: Pattern'
OneOrMore' :: Pattern'
Interleave' :: Pattern'
Group' :: Pattern'
After' :: Pattern'
Choice' :: Pattern'
ord' :: Pattern -> Pattern'
equiv :: Pattern -> Pattern -> Bool
gt :: Pattern -> Pattern -> Bool
data ErrMessage
ErrMsg :: ErrLevel -> [String] -> ErrMessage
type ErrLevel = Int

-- | smart constructor for NotAllowed
notAllowed :: String -> Pattern
notAllowed1 :: String -> Pattern
notAllowed2 :: String -> Pattern
notAllowedN :: ErrLevel -> String -> Pattern

-- | 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
mergeNotAllowed :: Pattern -> Pattern -> Pattern

-- | smart constructor for Choice
--   
--   nexted choices are transformed into a sorted list
choice :: Pattern -> Pattern -> Pattern

-- | smart constructor for Group
group :: Pattern -> Pattern -> Pattern

-- | smart constructor for OneOrMore
oneOrMore :: Pattern -> Pattern

-- | smart constructor for Interleave
--   
--   nested interleaves are transformed into a sorted list
interleave :: Pattern -> Pattern -> Pattern

-- | smart constructor for After
after :: Pattern -> Pattern -> Pattern

-- | Possible content types of a Relax NG pattern. (see also chapter 7.2 in
--   Relax NG specification)
data ContentType
CTEmpty :: ContentType
CTComplex :: ContentType
CTSimple :: ContentType
CTNone :: ContentType
instance GHC.Classes.Ord Text.XML.HXT.RelaxNG.DataTypes.ContentType
instance GHC.Classes.Eq Text.XML.HXT.RelaxNG.DataTypes.ContentType
instance GHC.Show.Show Text.XML.HXT.RelaxNG.DataTypes.ContentType
instance GHC.Classes.Ord Text.XML.HXT.RelaxNG.DataTypes.Pattern'
instance GHC.Classes.Eq Text.XML.HXT.RelaxNG.DataTypes.Pattern'
instance GHC.Classes.Ord Text.XML.HXT.RelaxNG.DataTypes.NameClass
instance GHC.Classes.Eq Text.XML.HXT.RelaxNG.DataTypes.NameClass
instance GHC.Show.Show Text.XML.HXT.RelaxNG.DataTypes.Pattern
instance GHC.Show.Show Text.XML.HXT.RelaxNG.DataTypes.ErrMessage
instance GHC.Show.Show Text.XML.HXT.RelaxNG.DataTypes.NameClass

-- | Constants and basic arrows for Relax NG
module Text.XML.HXT.RelaxNG.BasicArrows
hasRngAttName :: ArrowXml a => String -> a XmlTree XmlTree
hasRngElemName :: ArrowXml a => String -> a XmlTree XmlTree
checkRngName :: ArrowXml a => [String] -> a XmlTree XmlTree
noOfChildren :: ArrowXml a => (Int -> Bool) -> a XmlTree XmlTree
isAttributeRef :: ArrowXml a => a XmlTree XmlTree
isAttributeRefTextListGroupInterleaveOneOrMoreEmpty :: ArrowXml a => a XmlTree XmlTree
isAttributeRefTextListInterleave :: ArrowXml a => a XmlTree XmlTree
isAttributeListGroupInterleaveOneOrMore :: ArrowXml a => a XmlTree XmlTree
isExternalRefInclude :: ArrowXml a => a XmlTree XmlTree
isNameNsNameValue :: ArrowXml a => a XmlTree XmlTree
isNameNsName :: ArrowXml a => a XmlTree XmlTree
isNameAnyNameNsName :: ArrowXml a => a XmlTree XmlTree
isDefineOneOrMoreZeroOrMoreOptionalListMixed :: ArrowXml a => a XmlTree XmlTree
isChoiceGroupInterleave :: ArrowXml a => a XmlTree XmlTree
isChoiceGroupInterleaveOneOrMore :: ArrowXml a => a XmlTree XmlTree
isGroupInterleave :: ArrowXml a => a XmlTree XmlTree
isRngAnyName :: ArrowXml a => a XmlTree XmlTree
isRngAttribute :: ArrowXml a => a XmlTree XmlTree
isRngChoice :: ArrowXml a => a XmlTree XmlTree
isRngCombine :: ArrowXml a => a XmlTree XmlTree
isRngData :: ArrowXml a => a XmlTree XmlTree
isRngDefine :: ArrowXml a => a XmlTree XmlTree
isRngDiv :: ArrowXml a => a XmlTree XmlTree
isRngElement :: ArrowXml a => a XmlTree XmlTree
isRngEmpty :: ArrowXml a => a XmlTree XmlTree
isRngExcept :: ArrowXml a => a XmlTree XmlTree
isRngExternalRef :: ArrowXml a => a XmlTree XmlTree
isRngGrammar :: ArrowXml a => a XmlTree XmlTree
isRngGroup :: ArrowXml a => a XmlTree XmlTree
isRngInclude :: ArrowXml a => a XmlTree XmlTree
isRngInterleave :: ArrowXml a => a XmlTree XmlTree
isRngList :: ArrowXml a => a XmlTree XmlTree
isRngMixed :: ArrowXml a => a XmlTree XmlTree
isRngName :: ArrowXml a => a XmlTree XmlTree
isRngNotAllowed :: ArrowXml a => a XmlTree XmlTree
isRngNsName :: ArrowXml a => a XmlTree XmlTree
isRngOneOrMore :: ArrowXml a => a XmlTree XmlTree
isRngOptional :: ArrowXml a => a XmlTree XmlTree
isRngParam :: ArrowXml a => a XmlTree XmlTree
isRngParentRef :: ArrowXml a => a XmlTree XmlTree
isRngRef :: ArrowXml a => a XmlTree XmlTree
isRngRelaxError :: ArrowXml a => a XmlTree XmlTree
isRngStart :: ArrowXml a => a XmlTree XmlTree
isRngText :: ArrowXml a => a XmlTree XmlTree
isRngType :: ArrowXml a => a XmlTree XmlTree
isRngValue :: ArrowXml a => a XmlTree XmlTree
isRngZeroOrMore :: ArrowXml a => a XmlTree XmlTree
mkRngElement :: ArrowXml a => String -> a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngChoice :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngDefine :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngEmpty :: ArrowXml a => a n XmlTree -> a n XmlTree
mkRngGrammar :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngGroup :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngInterleave :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngName :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngNotAllowed :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngOneOrMore :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngRef :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngRelaxError :: ArrowXml a => a n XmlTree
mkRngStart :: ArrowXml a => a n XmlTree -> a n XmlTree -> a n XmlTree
mkRngText :: ArrowXml a => a n XmlTree -> a n XmlTree
setRngName :: ArrowXml a => String -> a XmlTree XmlTree
setRngNameDiv :: ArrowXml a => a XmlTree XmlTree
setRngNameRef :: ArrowXml a => a XmlTree XmlTree
isRngAttrAttribute :: ArrowXml a => a XmlTree XmlTree
isRngAttrCombine :: ArrowXml a => a XmlTree XmlTree
isRngAttrDatatypeLibrary :: ArrowXml a => a XmlTree XmlTree
isRngAttrHref :: ArrowXml a => a XmlTree XmlTree
isRngAttrName :: ArrowXml a => a XmlTree XmlTree
isRngAttrNs :: ArrowXml a => a XmlTree XmlTree
isRngAttrType :: ArrowXml a => a XmlTree XmlTree
isRngAttrRelaxSimplificationChanges :: ArrowXml a => a XmlTree XmlTree
mkRngAttr :: ArrowXml a => String -> a b String -> a b XmlTree
mkRngAttrName :: ArrowXml a => String -> a b XmlTree
mkRngAttrRelaxSimplificationChanges :: ArrowXml a => String -> a b XmlTree
mkRngAttrDefineOrigName :: ArrowXml a => String -> a b XmlTree
mkRngAttrContextBase :: ArrowXml a => a b String -> a b XmlTree
addRngAttrName :: ArrowXml a => String -> a XmlTree XmlTree
addRngAttrDescr :: ArrowXml a => String -> a XmlTree XmlTree
addRngAttrChanges :: ArrowXml a => String -> a XmlTree XmlTree
addRngAttrNs :: ArrowXml a => String -> a XmlTree XmlTree
rmRngAttrNs :: ArrowXml a => a XmlTree XmlTree
hasRngAttrRelaxSimplificationChanges :: ArrowXml a => a XmlTree XmlTree
hasRngAttrAttribute :: ArrowXml a => a XmlTree XmlTree
hasRngAttrCombine :: ArrowXml a => a XmlTree XmlTree
hasRngAttrDatatypeLibrary :: ArrowXml a => a XmlTree XmlTree
hasRngAttrHref :: ArrowXml a => a XmlTree XmlTree
hasRngAttrName :: ArrowXml a => a XmlTree XmlTree
hasRngAttrNs :: ArrowXml a => a XmlTree XmlTree
hasRngAttrType :: ArrowXml a => a XmlTree XmlTree
getRngAttrAttribute :: ArrowXml a => a XmlTree String
getRngAttrCombine :: ArrowXml a => a XmlTree String
getRngAttrDatatypeLibrary :: ArrowXml a => a XmlTree String
getRngAttrDescr :: ArrowXml a => a XmlTree String
getRngAttrHref :: ArrowXml a => a XmlTree String
getRngAttrName :: ArrowXml a => a XmlTree String
getRngAttrNs :: ArrowXml a => a XmlTree String
getRngAttrType :: ArrowXml a => a XmlTree String

-- | basic Pattern functions
module Text.XML.HXT.RelaxNG.PatternFunctions
isRelaxEmpty :: Pattern -> Bool
isRelaxNotAllowed :: Pattern -> Bool
isRelaxText :: Pattern -> Bool
isRelaxChoice :: Pattern -> Bool
isRelaxInterleave :: Pattern -> Bool
isRelaxGroup :: Pattern -> Bool
isRelaxOneOrMore :: Pattern -> Bool
isRelaxList :: Pattern -> Bool
isRelaxData :: Pattern -> Bool
isRelaxDataExcept :: Pattern -> Bool
isRelaxValue :: Pattern -> Bool
isRelaxAttribute :: Pattern -> Bool
isRelaxElement :: Pattern -> Bool
isRelaxAfter :: Pattern -> Bool

-- | Returns a list of children pattern for each pattern, e.g. (Choice p1
--   p2) = [p1, p2]
getChildrenPattern :: Pattern -> [Pattern]

-- | Returns the nameclass of a element- or attribute pattern. Otherwise
--   NCError is returned.
getNameClassFromPattern :: Pattern -> NameClass

-- | Returns a string representation of the pattern name
getPatternName :: Pattern -> String

-- | Creates the Pattern datastructure from a simplified Relax NG
--   schema. The created datastructure is used in the validation algorithm
--   (see also: Text.XML.HXT.RelaxNG.Validation)
module Text.XML.HXT.RelaxNG.CreatePattern

-- | Creates the Pattern datastructure from a simplified Relax NG
--   schema.
createPatternFromXmlTree :: LA XmlTree Pattern

-- | Creates a NameClass from an "anyName"-, "nsName"- or
--   "name"-Pattern,
createNameClass :: LA XmlTree NameClass

-- | Simple access arrows
firstChild :: (ArrowTree a, Tree t) => a (t b) (t b)
lastChild :: (ArrowTree a, Tree t) => a (t b) (t b)

-- | Don't edit this module, it's generated by RelaxSchemaToXmlTree
module Text.XML.HXT.RelaxNG.Schema
relaxSchemaTree :: XmlTree
relaxSchemaArrow :: ArrowList a => a b XmlTree

-- | Don't edit this module, it's generated by RelaxSchemaToXmlTree
module Text.XML.HXT.RelaxNG.SchemaGrammar
relaxSchemaTree :: XmlTree
relaxSchemaArrow :: ArrowList a => a b XmlTree

-- | Helper functions for RelaxNG validation
module Text.XML.HXT.RelaxNG.Utils

-- | Tests whether a URI matches the Relax NG anyURI symbol
isRelaxAnyURI :: String -> Bool

-- | Tests whether two URIs are equal after normalizeURI is
--   performed
compareURI :: String -> String -> Bool

-- | Converts all letters to the corresponding lower-case letter and
--   removes a trailing "/"
normalizeURI :: String -> String

-- | Tests whether a string matches a number -*
isNumber :: String -> Bool
isNmtoken :: String -> Bool
isName :: String -> Bool
formatStringList :: (String -> String) -> String -> [String] -> String

-- | Formats a list of strings into a single string. The first parameter
--   formats the elements, the 2. is inserted between two elements.
--   
--   example:
--   
--   
--   formatStringList show ", " ["foo", "bar", "baz"] -> "foo", "bar", "baz"
--   
formatStringListPatt :: [String] -> String
formatStringListId :: [String] -> String
formatStringListQuot :: [String] -> String
formatStringListPairs :: [(String, String)] -> String
formatStringListArr :: [String] -> String

module Text.XML.HXT.RelaxNG.PatternToString

-- | Returns a tree representation of the pattern structure. The hard work
--   is done by formatTree.
--   
--   Example:
--   
--   
--   +---element {}bar
--       |
--       +---group
--           |
--           +---oneOrMore
--           |   |
--           |   +---attribute AnyName
--           |       |
--           |       +---text
--           |
--           +---text
--   
--   
--   The function can be used to display circular ref-pattern structures.
--   
--   Example:
--   
--   
--   <define name="baz">
--     <element name="baz">
--       ... <ref name="baz"/> ...
--     </element>
--   </define>
--   
patternToStringTree :: LA Pattern String

-- | Returns a formated string representation of the pattern structure.
--   
--   Example:
--   
--   
--   Element {}foo (Choice (Choice ( Value = abc,
--   datatypelibrary = http://relaxng.org/ns/structure/1.0, type = token,
--   context (base-uri =file://test.rng,
--   parameter: xml = http://www.w3.org/XML/1998/namespaces, foo = www.bar.baz),
--   
--   
--   The function can be used to display circular ref-pattern structures.
patternToFormatedString :: SLA [NameClass] Pattern String

-- | Returns a tree representation of the pattern structure. (see also:
--   createPatternFromXmlTree and patternToStringTree)
xmlTreeToPatternStringTree :: LA XmlTree String

-- | Returns a formated string representation of the pattern structure.
--   (see also: createPatternFromXmlTree and
--   patternToFormatedString)
xmlTreeToPatternFormatedString :: LA XmlTree String

-- | Returns a string representation of the pattern structure. (see also:
--   createPatternFromXmlTree)
--   
--   Example:
--   
--   
--   Element {}foo (Choice (Choice (Value ("","token") "abc"
--   ("foo","www.bar.baz")]))(Data ("http://www.mysql.com","VARCHAR")
--   [("length","2"),("maxLength","5")])) (Element {}bar (Group (Element {}baz
--   
--   
--   The function can not be used to display circular ref-pattern
--   structures.
xmlTreeToPatternString :: LA XmlTree String

-- | Returns a string representation of a nameclass.
nameClassToString :: NameClass -> String

-- | exports helper functions for the integration of new datatype-libraries
module Text.XML.HXT.RelaxNG.DataTypeLibUtils
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

-- | Error Message for the equality test of two datatype values
--   
--   
--   
- 1.parameter : datatype
--   
- 2.parameter : datatype value
--   
- 3.parameter : datatype value
--   
--   
--   example:
--   
--   
--   errorMsgEqual "Int" "21" "42" -> "Datatype Int with value = 21 expected, but value = 42 found"
--   
errorMsgParam :: LocalName -> String -> String -> String
rng_length :: String
rng_maxLength :: String
rng_minLength :: String
rng_maxExclusive :: String
rng_minExclusive :: String
rng_maxInclusive :: String
rng_minInclusive :: String

-- | Function table type
type FunctionTable = [(String, String -> String -> Bool)]
stringValidFT :: FunctionTable -> DatatypeName -> Integer -> Integer -> ParamList -> CheckString

-- | Function table for string tests, XML document value is first operand,
--   schema value second
fctTableString :: FunctionTable

-- | Function table for list tests, XML document value is first operand,
--   schema value second
fctTableList :: FunctionTable

-- | 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
--   
stringValid :: DatatypeName -> Integer -> Integer -> ParamList -> CheckString

-- | 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
--   
numberValid :: DatatypeName -> Integer -> Integer -> ParamList -> CheckString

-- | tests whether a string value matches a numeric param
--   
--   valid example:
--   
--   
--   <data type="CHAR"> <param name="maxLength">5</param> </data>
--   
--   
--   invalid example:
--   
--   
--   <data type="CHAR"> <param name="minLength">foo</param> </data>
--   
numParamValid :: (Integer -> Integer -> Bool) -> String -> String -> Bool
data CheckA a b
type CheckString = CheckA String String
type CheckInteger = CheckA Integer Integer

-- | run a check and deliver Just an error message or Nothing
performCheck :: CheckA a b -> a -> Maybe String

-- | every thing is fine
ok :: CheckA a a

-- | always failure
failure :: (a -> String) -> CheckA a b

-- | perform a simple check with a predicate p, when the predicate holds,
--   assert acts as identity, else an error message is generated
assert :: (a -> Bool) -> (a -> String) -> CheckA a a

-- | perform a simple check with a Maybe function, Nothing indicates error
assertMaybe :: (a -> Maybe b) -> (a -> String) -> CheckA a b

-- | perform a check, but convert the value before checking
checkWith :: (a -> b) -> CheckA b c -> CheckA a a
instance Control.Category.Category Text.XML.HXT.RelaxNG.DataTypeLibUtils.CheckA
instance Control.Arrow.Arrow Text.XML.HXT.RelaxNG.DataTypeLibUtils.CheckA
instance Control.Arrow.ArrowZero Text.XML.HXT.RelaxNG.DataTypeLibUtils.CheckA
instance Control.Arrow.ArrowPlus Text.XML.HXT.RelaxNG.DataTypeLibUtils.CheckA

-- | Datatype library for the MySQL datatypes
module Text.XML.HXT.RelaxNG.DataTypeLibMysql

-- | Namespace of the MySQL datatype library
mysqlNS :: String

-- | The main entry point to the MySQL datatype library.
--   
--   The DTC constructor exports the list of supported datatypes and
--   params. It also exports the specialized functions to validate a XML
--   instance value with respect to a datatype.
mysqlDatatypeLib :: DatatypeLibrary

-- | Version : $Id$
--   
--   Datatype library for the W3C XML schema datatypes
module Text.XML.HXT.RelaxNG.XMLSchema.DataTypeLibW3C

-- | The main entry point to the W3C XML schema datatype library.
--   
--   The DTC constructor exports the list of supported datatypes and
--   params. It also exports the specialized functions to validate a XML
--   instance value with respect to a datatype.
w3cDatatypeLib :: DatatypeLibrary

-- | This modul exports the list of supported datatype libraries. It also
--   exports the main functions to validate an XML instance value with
--   respect to a datatype.
module Text.XML.HXT.RelaxNG.DataTypeLibraries

-- | List of all supported datatype libraries which can be used within the
--   Relax NG validator modul.
datatypeLibraries :: DatatypeLibraries

-- | Tests whether a XML instance value matches a value-pattern.
--   
--   The following tests are performed:
--   
--   
--   
- 1. : does the uri exist in the list of supported datatype
--   libraries
--   
- 2. : does the library support the datatype
--   
- 3. : does the XML instance value match the value-pattern
--   
--   
--   The hard work is done by the specialized DatatypeEqual function
--   (see also: DatatypeCheck) of the datatype library.
datatypeEqual :: Uri -> DatatypeEqual

-- | Tests whether a XML instance value matches a data-pattern.
--   
--   The following tests are performed:
--   
--   
--   
- 1. : does the uri exist in the list of supported datatype
--   libraries
--   
- 2. : does the library support the datatype
--   
- 3. : does the XML instance value match the data-pattern
--   
- 4. : does the XML instance value match all params
--   
--   
--   The hard work is done by the specialized DatatypeAllows
--   function (see also: DatatypeCheck) of the datatype library.
datatypeAllows :: Uri -> DatatypeAllows

-- | Validation of a XML document with respect to a valid Relax NG schema
--   in simple form. Copied and modified from "An algorithm for RELAX NG
--   validation" by James Clark
--   (http://www.thaiopensource.com/relaxng/derivative.html).
module Text.XML.HXT.RelaxNG.Validation
validateWithRelax :: IOSArrow XmlTree XmlTree -> IOSArrow XmlTree XmlTree

-- | Validates a xml document with respect to a Relax NG schema
--   
--   
--   
- 1.parameter : the arrow for computing the Relax NG schema
--   
- 2.parameter : list of configuration options for reading and
--   validating
--   
- 3.parameter : XML document URI
--   
- arrow-input : ignored
--   
- arrow-output : list of errors or none
--   
validateDocWithRelax :: IOSArrow XmlTree XmlTree -> SysConfigList -> String -> IOSArrow XmlTree XmlTree

-- | Validates an XML document with respect to a Relax NG schema and issues
--   error messages.
--   
--   See also: validateRelax'
--   
--   
--   
- 1.parameter : Relax NG schema
--   
- arrow-input : XML document
--   
- arrow-output : the document or in case of errors none
--   
validateRelax :: XmlTree -> IOSArrow XmlTree XmlTree

-- | Validates an XML document with respect to a Relax NG schema This arrow
--   is pure. It does not need IO or any configuration parameters.
--   
--   
--   
- 1.parameter : Relax NG schema
--   
- arrow-input : XML document
--   
- arrow-output : the unchanged document or an error message
--   
validateRelax' :: XmlTree -> LA XmlTree XmlTree
readForRelax :: String -> IOSArrow b XmlTree

-- | normalize a document for validation with Relax NG: remove all
--   namespace declaration attributes, remove all processing instructions
--   and merge all sequences of text nodes into a single text node
normalizeForRelaxValidation :: ArrowXml a => a XmlTree XmlTree

-- | tests whether a NameClass contains a particular QName
contains :: NameClass -> QName -> Bool

-- | The modul creates the simplified form of a Relax NG schema. See also
--   chapter 4 of the Relax NG specification.
module Text.XML.HXT.RelaxNG.Simplification

-- | Creates the simple form of a Relax NG schema
--   
--   The schema document has to be parsed with namespace propagation
createSimpleForm :: Bool -> Bool -> Bool -> IOSArrow XmlTree XmlTree

-- | Returns the list of simplification errors or none
getErrors :: IOSArrow XmlTree XmlTree
resetStates :: IOSArrow XmlTree XmlTree

-- | This module exports the core functions from the basic validation und
--   simplification libraries. It also exports some helper functions for
--   easier access to the validation functionality.
module Text.XML.HXT.RelaxNG.Validator

-- | validate a document with a Relax NG schema
--   
--   
--   
- 1.parameter : the system configuration option list for
--   validation
--   
- 2.parameter : the URI of the Relax NG Schema
--   
- arrow-input : the document to be validated, namespaces must have
--   been processed
--   
- arrow-output : the input document, or in case of validation
--   errors, an empty document with status information in the root
--   
--   
--   configuration options evaluated by validateDocumentWithRelaxSchema:
--   
--   
--   
- withRelaxCheckRestr : check Relax NG schema restrictions
--   when simplifying the schema (default: on)
--   
- withRelaxValidateExtRef : validate a Relax NG schema
--   referenced by a externalRef-Pattern (default: on)
--   
- withRelaxValidateInclude : validate a Relax NG schema
--   referenced by a include-Pattern (default: on)
--   
--   
--   example:
--   
--   
--   validateDocumentWithRelaxSchema [withRelaxCheckRestr yes, withRelaxValidateExtRef no] "testSchema.rng"
--   
validateDocumentWithRelaxSchema :: SysConfigList -> String -> IOStateArrow s XmlTree XmlTree

-- | validate an XML document with respect to a Relax NG schema
--   
--   
--   
- 1.parameter : the valid and simplified schema as XML tree
--   
- arrow-input : the document to be validated
--   
- arrow-output : the validated and unchanged document or the empty
--   document with status information set in the root node
--   
validateDocumentWithRelax :: XmlTree -> IOSArrow XmlTree XmlTree
validateSchemaWithRelax :: String -> IOSArrow XmlTree XmlTree

-- | Document validation
--   
--   Validates a xml document with respect to a Relax NG schema
--   
--   
--   
- 1.parameter : XML document
--   
- 2.parameter : Relax NG schema file
--   
validateWithSpezification :: String -> String -> IOSArrow XmlTree XmlTree

-- | Relax NG schema validation
--   
--   see validateSchemaWithRelax and
--   validateWithSpezification
--   
--   
--   
- 1.parameter : Relax NG schema file
--   
- arrow-input : Relax NG Specification in simple form
--   
validateSchemaWithSpezification :: String -> IOSArrow XmlTree XmlTree

-- | This helper module exports elements from the basic Relax NG libraries:
--   Validator, CreatePattern, PatternToString and DataTypes. It is the
--   main entry point to the Relax NG schema validator of the Haskell XML
--   Toolbox.
module Text.XML.HXT.RelaxNG.SystemConfig
withRelaxNG :: String -> SysConfig
withRelaxCheckRestr :: Bool -> SysConfig
withRelaxValidateExtRef :: Bool -> SysConfig
withRelaxValidateInclude :: Bool -> SysConfig
withRelaxCollectErrors :: Bool -> SysConfig

-- | available Relax NG validation options
--   
--   defines options a_check_restrictions,
--   a_validate_externalRef, a_validate_include,
--   a_do_not_check_restrictions,
--   a_do_not_validate_externalRef, a_do_not_validate_include
relaxOptions :: [OptDescr SysConfig]
a_relax_schema :: String
a_do_not_check_restrictions :: String
a_check_restrictions :: String
a_do_not_validate_externalRef :: String
a_validate_externalRef :: String
a_do_not_validate_include :: String
a_validate_include :: String
a_do_not_collect_errors :: String

-- | This helper module exports elements from the basic Relax NG libraries:
--   Validator, CreatePattern, PatternToString and DataTypes. It is the
--   main entry point to the Relax NG schema validator of the Haskell XML
--   Toolbox.
module Text.XML.HXT.RelaxNG
