Documentation ¶
Index ¶
- type AnySimpleType
- type AnyType
- type AnyURI
- type Base64Binary
- type Boolean
- type Byte
- type Date
- type DateTime
- type Decimal
- type Double
- type Duration
- type ENTITIES
- type ENTITY
- type Float
- type GDay
- type GMonth
- type GMonthDay
- type GYear
- type GYearMonth
- type HexBinary
- type ID
- type IDREF
- type IDREFS
- type Int
- type Integer
- type Language
- type Long
- type NCName
- type NMTOKEN
- type NMTOKENS
- type Name
- type NegativeInteger
- type NonNegativeInteger
- type NonPositiveInteger
- type NormalizedString
- type PositiveInteger
- type QName
- type Short
- type String
- type Time
- type Token
- type UnsignedByte
- type UnsignedInt
- type UnsignedLong
- type UnsignedShort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnySimpleType ¶
type AnySimpleType string
type AnyURI ¶
type AnyURI AnySimpleType
anyURI represents a Uniform Resource Identifier Reference (URI). An anyURI value can be absolute or relative, and may have an optional fragment identifier (i.e., it may be a URI Reference). This type should be used to specify the intention that the value fulfills the role of a URI as defined by [RFC 2396], as amended by [RFC 2732].
anyURI has the following ·constraining facets·: • length • minLength • maxLength • pattern • enumeration • whiteSpace
More info: https://www.w3.org/TR/xmlschema-2/#anyURI
type Base64Binary ¶
type Base64Binary AnySimpleType
base64Binary represents Base64-encoded arbitrary binary data. The ·value space· of base64Binary is the set of finite-length sequences of binary octets. For base64Binary data the entire binary stream is encoded using the Base64 Alphabet in [RFC 2045].
base64Binary has the following ·constraining facets·: • length • minLength • maxLength • pattern • enumeration • whiteSpace
More info: https://www.w3.org/TR/xmlschema-2/#base64Binary
func (Base64Binary) NewBase64Binary ¶
func (tp Base64Binary) NewBase64Binary(data []byte) Base64Binary
type Boolean ¶
type Boolean bool
Boolean has the ·value space· required to support the mathematical concept of binary-valued logic: {true, false}. Boolean has the following ·constraining facets·: • pattern • whiteSpace
More info: https://www.w3.org/TR/xmlschema-2/#boolean
//TODO: process restrictions
type Date ¶
type Date AnySimpleType
The ·value space· of date consists of top-open intervals of exactly one day in length on the timelines of dateTime, beginning on the beginning moment of each day (in each timezone), i.e. '00:00:00', up to but not including '24:00:00' (which is identical with '00:00:00' of the next day). For nontimezoned values, the top-open intervals disjointly cover the nontimezoned timeline, one per day. For timezoned values, the intervals begin at every minute and therefore overlap.
type DateTime ¶
type DateTime AnySimpleType
DateTime values may be viewed as objects with integer-valued year, month, day, hour and minute properties, a decimal-valued second property, and a boolean timezoned property.
The ·lexical space· of dateTime consists of finite-length sequences of characters of the form:
'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?,
DateTime has the following ·constraining facets·:
• pattern • enumeration • whiteSpace • maxInclusive • maxExclusive • minInclusive • minExclusive
More info: https://www.w3.org/TR/xmlschema-2/#dateTime
TODO: decide good type for time with proper format TODO: process restrictions
func (DateTime) NewDateTime ¶
Construct an instance of xsd dateTime type
type Decimal ¶
type Decimal string
The type decimal represents a decimal number of arbitrary precision. Schema processors vary in the number of significant digits they support, but a conforming processor must support a minimum of 18 significant digits. The format of xsd:decimal is a sequence of digits optionally preceded by a sign ("+" or "-") and optionally containing a period. The value may start or end with a period. If the fractional part is 0 then the period and trailing zeros may be omitted. Leading and trailing zeros are permitted, but they are not considered significant. That is, the decimal values 3.0 and 3.0000 are considered equal.
Source: http://www.datypic.com/sc/xsd/t-xsd_decimal.html
Decimal has the following ·constraining facets·: • totalDigits • fractionDigits • pattern • whiteSpace • enumeration • maxInclusive • maxExclusive • minInclusive • minExclusive
More info: https://www.w3.org/TR/xmlschema-2/#decimal
//TODO: process restrictions, valid/invalid characters(commas are not permitted; the decimal separator must be a period)
func (Decimal) NewDecimal ¶
Construct an instance of xsd Decimal type
type Double ¶
type Double float64
The double datatype is patterned after the IEEE double-precision 64-bit floating point type Double has the following ·constraining facets·: • pattern • enumeration • whiteSpace • maxInclusive • maxExclusive • minInclusive • minExclusive
More info: https://www.w3.org/TR/xmlschema-2/#double
//TODO: process restrictions
type Duration ¶
type Duration AnySimpleType
func (Duration) NewDateTime ¶
Construct an instance of xsd duration type
type Float ¶
type Float float32
Float is patterned after the IEEE single-precision 32-bit floating point type Float has the following ·constraining facets·: • pattern • enumeration • whiteSpace • maxInclusive • maxExclusive • minInclusive • minExclusive
More info: https://www.w3.org/TR/xmlschema-2/#float
//TODO: process restrictions
type GDay ¶
type GDay AnySimpleType
The type xsd:gDay represents a day that recurs every month. The letter g signifies "Gregorian." xsd:gDay can be used to say, for example, that checks are paid on the 5th of each month. To represent a duration of days, use the duration type instead. The format of gDay is ---DD.
Source: http://www.datypic.com/sc/xsd/t-xsd_gDay.html
More info: https://www.w3.org/TR/xmlschema-2/#gDay
type GMonth ¶
type GMonth AnySimpleType
The type xsd:gMonth represents a specific month that recurs every year. The letter g signifies "Gregorian." xsd:gMonth can be used to indicate, for example, that fiscal year-end processing occurs in September of every year. To represent a duration of months, use the duration type instead. The format of xsd:gMonth is --MM.
Source: http://www.datypic.com/sc/xsd/t-xsd_gMonth.html
More info: https://www.w3.org/TR/xmlschema-2/#gMonth
type GMonthDay ¶
type GMonthDay AnySimpleType
The type xsd:gMonthDay represents a specific day that recurs every year. The letter g signifies "Gregorian." xsd:gMonthDay can be used to say, for example, that your birthday is on the 14th of April every year. The format of xsd:gMonthDay is --MM-DD.
Source: http://www.datypic.com/sc/xsd/t-xsd_gMonthDay.html
More info: https://www.w3.org/TR/xmlschema-2/#gMonthDay
type GYear ¶
type GYear AnySimpleType
The type xsd:gYear represents a specific calendar year. The letter g signifies "Gregorian." The format of xsd:gYear is CCYY. No left truncation is allowed. To represent years later than 9999, additional digits can be added to the left of the year value. To represent years before 0001, a preceding minus sign ("-") is allowed.
Source: http://www.datypic.com/sc/xsd/t-xsd_gYear.html
More info: https://www.w3.org/TR/xmlschema-2/#gYear
type GYearMonth ¶
type GYearMonth AnySimpleType
The type xsd:gYearMonth represents a specific month of a specific year. The letter g signifies "Gregorian." The format of xsd:gYearMonth is CCYY-MM. No left truncation is allowed on either part. To represents years later than 9999, additional digits can be added to the left of the year value. To represent years before 0001, a preceding minus sign ("-") is permitted.
Source: http://www.datypic.com/sc/xsd/t-xsd_gYearMonth.html
More info: https://www.w3.org/TR/xmlschema-2/#gYearMonth
func (GYearMonth) NewGYearMonth ¶
func (tp GYearMonth) NewGYearMonth(time time.Time) GYearMonth
Construct an instance of xsd GYearMonth type
type HexBinary ¶
type HexBinary AnySimpleType
The xsd:hexBinary type represents binary data as a sequence of binary octets. It uses hexadecimal encoding, where each binary octet is a two-character hexadecimal number. Lowercase and uppercase letters A through F are permitted. For example, 0FB8 and 0fb8 are two equal xsd:hexBinary representations consisting of two octets.
Source: http://www.datypic.com/sc/xsd/t-xsd_hexBinary.html
More info: https://www.w3.org/TR/xmlschema-2/#hexBinary
func (HexBinary) NewHexBinary ¶
type NCName ¶
type NCName Name
func (NCName) NewNCName ¶
TODO: https://www.w3.org/TR/REC-xml/#NT-Name and https://www.w3.org/TR/xml-names/#NT-NCName
type NMTOKEN ¶
type NMTOKEN Token
func (NMTOKEN) NewNMTOKEN ¶
TODO: check for valid symbols: https://www.w3.org/TR/xml/#NT-Nmtoken
type NegativeInteger ¶
type NegativeInteger int64
func (NegativeInteger) NewNegativeInteger ¶
func (tp NegativeInteger) NewNegativeInteger(data int64) (NegativeInteger, error)
type NonNegativeInteger ¶
type NonNegativeInteger int64
func (NonNegativeInteger) NewNonNegativeInteger ¶
func (tp NonNegativeInteger) NewNonNegativeInteger(data int64) (NonNegativeInteger, error)
type NonPositiveInteger ¶
type NonPositiveInteger int64
func (NonPositiveInteger) NewNonPositiveInteger ¶
func (tp NonPositiveInteger) NewNonPositiveInteger(data int64) (NonPositiveInteger, error)
type NormalizedString ¶
type NormalizedString String
func (NormalizedString) NewNormalizedString ¶
func (tp NormalizedString) NewNormalizedString(data string) (NormalizedString, error)
TODO: check normalization
type PositiveInteger ¶
type PositiveInteger int64
func (PositiveInteger) NewPositiveInteger ¶
func (tp PositiveInteger) NewPositiveInteger(data int64) (PositiveInteger, error)
type QName ¶
type QName AnySimpleType
QName represents XML qualified names. The ·value space· of QName is the set of tuples {namespace name, local part}, where namespace name is an anyURI and local part is an NCName. The ·lexical space· of QName is the set of strings that ·match· the QName production of [Namespaces in XML].
QName has the following ·constraining facets·: • length • minLength • maxLength • pattern • enumeration • whiteSpace
More info: https://www.w3.org/TR/xmlschema-2/#QName
type String ¶
type String string
The string datatype represents character strings in XML. The ·value space· of string is the set of finite-length sequences of characters. String has the following constraining facets: • length • minLength • maxLength • pattern • enumeration • whiteSpace
More info: https://www.w3.org/TR/xmlschema-2/#string
//TODO: valid/invalid character declaration and process restrictions
type Time ¶
type Time AnySimpleType
Time represents an instant of time that recurs every day. The ·value space· of time is the space of time of day values as defined in § 5.3 of [ISO 8601]. Specifically, it is a set of zero-duration daily time instances.
Time has the following ·constraining facets·:
• pattern • enumeration • whiteSpace • maxInclusive • maxExclusive • minInclusive • minExclusive
More info: https://www.w3.org/TR/xmlschema-2/#time
TODO: process restrictions
type Token ¶
type Token NormalizedString
type UnsignedByte ¶
type UnsignedByte uint8
func (UnsignedByte) NewUnsignedByte ¶
func (tp UnsignedByte) NewUnsignedByte(data uint8) UnsignedByte
type UnsignedInt ¶
type UnsignedInt uint32
func (UnsignedInt) NewUnsignedInt ¶
func (tp UnsignedInt) NewUnsignedInt(data uint32) UnsignedInt
type UnsignedLong ¶
type UnsignedLong uint64
func (UnsignedLong) NewUnsignedLong ¶
func (tp UnsignedLong) NewUnsignedLong(data uint64) UnsignedLong
type UnsignedShort ¶
type UnsignedShort uint16
func (UnsignedShort) NewUnsignedShort ¶
func (tp UnsignedShort) NewUnsignedShort(data uint16) UnsignedShort