-- TTCN3 module extracted from ITU-T Z.169 (11/2008)
module XSD {
//anySimpleType
type XMLCompatibleString AnySimpleType
with { variant "XSD:anySimpleType"};
//anyType
type record AnyType
{
record of String attr,
record of String elem_list
}
with {
variant "XSD:anyType";
variant "anyAttributes 'attr'";
variant "anyElement 'elem_list'"
};
// String types
type XMLCompatibleString String
with { variant "XSD:string"};
type XMLStringWithNoCRLFHT NormalizedString
with { variant "XSD:normalizedString"};
type NormalizedString Token
with { variant "XSD:token" };
type XMLStringWithNoWhitespace Name
with { variant "XSD:Name"};
type XMLStringWithNoWhitespace NMTOKEN
with { variant "XSD:NMTOKEN"};
type Name NCName
with { variant "XSD:NCName"};
type NCName ID
with { variant "XSD:ID"};
type NCName IDREF
with { variant "XSD:IDREF"};
type NCName ENTITY
with { variant "XSD:ENTITY"};
type octetstring HexBinary
with { variant "XSD:hexBinary"};
type octetstring Base64Binary
with { variant "XSD:base64Binary"};
type XMLStringWithNoCRLFHT AnyURI
with { variant "XSD:anyURI"};
type charstring Language (pattern "[a-zA-Z]#(1,8)(-[\w]#(1,8))#(0,)")
with { variant "XSD:language"};
// Integer types
type integer Integer
with { variant "XSD:integer"};
type integer PositiveInteger (1 .. infinity)
with { variant "XSD:positiveInteger"};
type integer NonPositiveInteger (-infinity .. 0)
with { variant "XSD:nonPositiveInteger"};
type integer NegativeInteger (-infinity .. -1)
with { variant "XSD:negativeInteger"};
type integer NonNegativeInteger (0 .. infinity)
with { variant "XSD:nonNegativeInteger"};
type longlong Long
with { variant "XSD:long"};
type unsignedlonglong UnsignedLong
with { variant "XSD:unsignedLong"};
type long Int
with { variant "XSD:int"};
type unsignedlong UnsignedInt
with { variant "XSD:unsignedInt"};
type short Short
with { variant "XSD:short"};
type unsignedshort UnsignedShort
with { variant "XSD:unsignedShort"};
type byte Byte
with { variant "XSD:byte"};
type unsignedbyte UnsignedByte
with { variant "XSD:unsignedByte"};
// Float types
type float Decimal
with { variant "XSD:decimal"};
type IEEE754float Float
with { variant "XSD:float"};
type IEEE754double Double
with { variant "XSD:double"};
// Time types
type charstring Duration (pattern ")
with { variant "XSD:duration"};
type charstring DateTime (pattern ")
with { variant "XSD:dateTime"};
type charstring Time (pattern ")
with { variant "XSD:time"};
type charstring Date (pattern ")
with { variant "XSD:date"};
type charstring GYearMonth (pattern ")
with { variant "XSD:gYearMonth"};
type charstring GYear (pattern ")
with { variant "XSD:gYear"};
type charstring GMonthDay (pattern "--((0[1-9])|[10-12])-((0[1-9])|[10-31])([+-]?[\d:Z]+)#(0,1)")
with { variant "XSD:gMonthDay"};
type charstring GDay (pattern ")
with { variant "XSD:gDay"};
type charstring GMonth (pattern "--((")
with { variant "XSD:gMonth"};
// Sequence types
type record of NMTOKEN NMTOKENS
with { variant "XSD:NMTOKENS"};
type record of IDREF IDREFS
with { variant "XSD:IDREFS"};
type record of ENTITY ENTITIES
with { variant "XSD:ENTITIES"};
type record QName
{
AnyURI uri optional,
NCName name
}
with { variant "XSD:QName"};
// Boolean type
type boolean Boolean
with { variant "XSD:boolean"};
//TTCN-3 type definitions supporting the mapping of W3C XML Schema built-in datatypes
type utf8string XMLCompatibleString
(
char(0,0,0,9).. char(0,0,0,9),
char(0,0,0,10)..char(0,0,0,10),
char(0,0,0,12)..char(0,0,0,12),
char(0,0,0,32)..char(0,0,215,255),
char(0,0,224,0)..char(0,0,255,253),
char(0,1,0,0)..char(0,16,255,253)
);
type utf8string XMLStringWithNoWhitespace
(
char(0,0,0,33)..char(0,0,215,255),
char(0,0,224,0)..char(0,0,255,253),
char(0,1,0,0)..char(0,16,255,253)
);
type utf8string XMLStringWithNoCRLFHT
(
char(0,0,0,32)..char(0,0,215,255),
char(0,0,224,0)..char(0,0,255,253),
char(0,1,0,0)..char(0,16,255,253)
);
}//end module