Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- class SimpleType a where
- acceptingParser :: TextParser a
- simpleTypeText :: a -> String
- module Text.Parse
- newtype XsdString = XsdString String
- type Boolean = Bool
- data Base64Binary = Base64Binary String
- data HexBinary = HexBinary String
- data Float :: *
- data Decimal = Decimal Double
- data Double :: *
- data AnyURI = AnyURI String
- data QName
- data NOTATION = NOTATION String
- data Duration = Duration Bool Int Int Int Int Int Float
- data DateTime = DateTime String
- data Time = Time String
- data Date = Date String
- data GYearMonth = GYearMonth String
- data GYear = GYear String
- data GMonthDay = GMonthDay String
- data GDay = GDay String
- data GMonth = GMonth String
- newtype NormalizedString = Normalized String
- newtype Token = Token String
- newtype Language = Language String
- newtype Name = Name String
- newtype NCName = NCName String
- newtype ID = ID String
- newtype IDREF = IDREF String
- newtype IDREFS = IDREFS String
- newtype ENTITY = ENTITY String
- newtype ENTITIES = ENTITIES String
- newtype NMTOKEN = NMTOKEN String
- newtype NMTOKENS = NMTOKENS String
- data Integer :: *
- newtype NonPositiveInteger = NonPos Integer
- newtype NegativeInteger = Negative Integer
- newtype Long = Long Int64
- data Int :: *
- newtype Short = Short Int16
- newtype Byte = Byte Int8
- newtype NonNegativeInteger = NonNeg Integer
- newtype UnsignedLong = ULong Word64
- newtype UnsignedInt = UInt Word32
- newtype UnsignedShort = UShort Word16
- newtype UnsignedByte = UByte Word8
- newtype PositiveInteger = Positive Integer
Type class for parsing simpleTypes
class SimpleType a where Source
Ultimately, an XML parser will find some plain text as the content of a simpleType, which will need to be parsed. We use a TextParser, because values of simpleTypes can also be given elsewhere, e.g. as attribute values in an XSD definition, e.g. to restrict the permissible values of the simpleType. Such restrictions are therefore implemented as layered parsers.
acceptingParser :: TextParser a Source
simpleTypeText :: a -> String Source
module Text.Parse
Primitive XSD datatypes
data Base64Binary Source
data Float :: *
Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.
data Double :: *
Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.
A QName is a (possibly) qualified name, in the sense of XML namespaces.
data GYearMonth Source
Derived, yet builtin, datatypes
newtype NormalizedString Source
data Integer :: *
Arbitrary-precision integers.
newtype NonPositiveInteger Source
newtype NegativeInteger Source
data Int :: *
newtype NonNegativeInteger Source
newtype UnsignedLong Source
newtype UnsignedInt Source
newtype UnsignedShort Source
newtype UnsignedByte Source