symantic-xml-2.0.0.20200523: Library for reading, validating and writing XML.

Safe HaskellNone
LanguageHaskell2010

Symantic.XML.RelaxNG.Language

Contents

Synopsis

Class RelaxNG

class (XML repr, Permutable repr, Definable repr) => RelaxNG repr where Source #

Minimal complete definition

Nothing

Methods

elementMatch :: Transformable repr => RelaxNG (UnTrans repr) => NameClass -> repr a k -> repr (QName -> a) k Source #

Like element but with a matching pattern instead of a specific QName.

elementMatch :: NameClass -> repr a k -> repr (QName -> a) k Source #

Like element but with a matching pattern instead of a specific QName.

attributeMatch :: Transformable repr => RelaxNG (UnTrans repr) => NameClass -> repr a k -> repr (QName -> a) k Source #

Like attribute but with a matching pattern instead of a specific QName.

attributeMatch :: NameClass -> repr a k -> repr (QName -> a) k Source #

Like attribute but with a matching pattern instead of a specific QName.

Instances
RelaxNG RNCWriteSyn Source # 
Instance details

Defined in Symantic.XML.RelaxNG.Compact.Write

RelaxNG Write Source # 
Instance details

Defined in Symantic.XML.Write

Methods

elementMatch :: NameClass -> Write a k -> Write (QName -> a) k Source #

attributeMatch :: NameClass -> Write a k -> Write (QName -> a) k Source #

RelaxNG TreeData Source # 
Instance details

Defined in Symantic.XML.Tree.Data

(Ord err, ReadConstraints src, Textable (Read src err), Definable (Read src err)) => RelaxNG (Read src err) Source # 
Instance details

Defined in Symantic.XML.Read

Methods

elementMatch :: NameClass -> Read src err a k -> Read src err (QName -> a) k Source #

attributeMatch :: NameClass -> Read src err a k -> Read src err (QName -> a) k Source #

Type Definable

class Definable repr where Source #

Minimal complete definition

Nothing

Methods

define :: DefineName -> repr a k -> repr a k Source #

(define name expr) declares a rule named (name) and matching the RelaxNG schema (expr).

Useful for rendering the RelaxNG schema, and necessary to avoid infinite recursion when printing a RelaxNG schema calling itself recursively.

WARNING: DefineNames must be unique inside a whole RelaxNG schema.

define :: Transformable repr => RelaxNG (UnTrans repr) => DefineName -> repr f k -> repr f k Source #

(define name expr) declares a rule named (name) and matching the RelaxNG schema (expr).

Useful for rendering the RelaxNG schema, and necessary to avoid infinite recursion when printing a RelaxNG schema calling itself recursively.

WARNING: DefineNames must be unique inside a whole RelaxNG schema.

Instances
Definable RNCWriteSynPerm Source # 
Instance details

Defined in Symantic.XML.RelaxNG.Compact.Write

Definable RNCWriteSyn Source # 
Instance details

Defined in Symantic.XML.RelaxNG.Compact.Write

Definable Write Source # 
Instance details

Defined in Symantic.XML.Write

Methods

define :: DefineName -> Write a k -> Write a k Source #

Definable TreeData Source # 
Instance details

Defined in Symantic.XML.Tree.Data

Methods

define :: DefineName -> TreeData a k -> TreeData a k Source #

Definable (ReadPerm src err) Source # 
Instance details

Defined in Symantic.XML.Read

Methods

define :: DefineName -> ReadPerm src err a k -> ReadPerm src err a k Source #

Ord err => Definable (Read FileSourced err) Source # 
Instance details

Defined in Symantic.XML.Read

Methods

define :: DefineName -> Read FileSourced err a k -> Read FileSourced err a k Source #

Type DefineName

Type NameClass

data NameClass Source #

Instances
IsString NameClass Source #

Only parses "*", "{some-namespace}*", or "{some-namespace}some-localname".

Instance details

Defined in Symantic.XML.RelaxNG.Language

Textify (Namespaces NCName, (Infix, Side), NameClass) Source # 
Instance details

Defined in Symantic.XML.RelaxNG.Language

Methods

textify :: (Namespaces NCName, (Infix, Side), NameClass) -> Builder Source #

matchNameClass :: NameClass -> QName -> Bool Source #

(matchNameClass nc q) returns True iif. the NameClass (nc) matches the QName (q).

namespacesNameClass :: NameClass -> HashMap Namespace (Maybe NCName) Source #

Return the namespaces used by the given NameClass