AntaniXml


FacetBasedGenerators

Namespace: AntaniXml

This module provides generators supporting the facets defined in XML schema.

Functions and values

Function or valueDescription
allXmlChars
Signature: Gen<char>
applyTextFacets (...)
Signature: facets:Facets -> whitespaceHandling:WhitespaceHandling -> generator:ConstrGen<string> -> Gen<string>

Combines the given generator with other ones based on pattern and enum facets (if present). Also apply the whitespace handling specified in the facets (if present) or the default one provided

applyTextFacets' facets arg2 generator
Signature: facets:Facets -> 'a -> generator:ConstrGen<string> -> Gen<string>
Type parameters: 'a

this version is to handle a corner case with token: it seems that a token with only spaces is not collapsed by the .NET validator resulting in validation error

boundedGen (...)
Signature: baseGen:Gen<^a> -> lex:LexMap<^a> -> facets:Facets -> defaultMin:^a -> defaultMax:^a -> epsilon:^a -> ConstrGen<string>
Type parameters: ^a, ^a

Creates a generator of values constrained to an interval determined by facets or by the default min and max provided. Epsilon allows adjusting bounds for MinExclusive and MaxExclusive facets. A lexical mapping is also needed to parse facets values and to format the generated values

boundedStringGen (...)
Signature: facets:Facets -> defaultMin:int -> defaultMax:int -> ConstrGen<String>

Creates a generator of string values of bounded length

commonChars
Signature: Gen<char>
denormalize stringGenerator
Signature: stringGenerator:Gen<string> -> Gen<String>
enumGen facets
Signature: facets:Facets -> ConstrGen<string> option
expand stringGenerator
Signature: stringGenerator:Gen<string> -> Gen<string>
genPattern patterns
Signature: patterns:string list -> Gen<string>
genXmlChar
Signature: Gen<char>
handleWhitespace _arg1
Signature: _arg1:WhitespaceHandling -> Gen<string> -> Gen<string>
hasPattern patterns inp
Signature: patterns:string list -> inp:string -> bool
isMatch (inp, pat)
Signature: (inp:string * pat:string) -> bool
lengthBounds (...)
Signature: facets:Facets -> defaultMin:int -> defaultMax:int -> int * int
patternGen facets
Signature: facets:Facets -> ConstrGen<string> option list
xeger pattern
Signature: pattern:string -> Gen<string>
Fork me on GitHub