xsd

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnySimpleType

type AnySimpleType string

AnySimpleType alias for string

type AnyType

type AnyType string

AnyType alias for 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

func (AnyURI) NewAnyURI

func (tp AnyURI) NewAnyURI(data url.URL) 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

func (Boolean) NewBool

func (tp Boolean) NewBool(data bool) Boolean

Construct an instance of xsd Boolean type

type Byte

type Byte int8

func (Byte) NewByte

func (tp Byte) NewByte(data int8) Byte

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.

func (Date) NewDate

func (tp Date) NewDate(time time.Time) Date

Construct an instance of xsd date type

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

func (tp DateTime) NewDateTime(time time.Time) DateTime

Construct an instance of xsd dateTime type

func (DateTime) NewTime

func (tp DateTime) NewTime(time time.Time) DateTime

Construct an instance of xsd time 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

func (tp Decimal) NewDecimal(data string) Decimal

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

func (Double) NewDouble

func (tp Double) NewDouble(data float64) Double

Construct an instance of xsd Double type

type Duration

type Duration AnySimpleType

Duration alias for AnySimpleType

func (Duration) NewDateTime

func (tp Duration) NewDateTime(years, months, days, hours, minutes, seconds string) Duration

Construct an instance of xsd duration type

type ENTITIES

type ENTITIES []ENTITY

func (ENTITIES) NewENTITIES

func (tp ENTITIES) NewENTITIES(data []ENTITY) ENTITIES

type ENTITY

type ENTITY NCName

func (ENTITY) NewENTITY

func (tp ENTITY) NewENTITY(data NCName) ENTITY

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

func (Float) NewFloat

func (tp Float) NewFloat(data float32) Float

Construct an instance of xsd Float type

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

func (GDay) NewGDay

func (tp GDay) NewGDay(t time.Time) GDay

Construct an instance of xsd GDay type

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

func (GMonth) NewGMonth

func (tp GMonth) NewGMonth(t time.Time) 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

func (GMonthDay) NewGMonthDay

func (tp GMonthDay) NewGMonthDay(t time.Time) GMonthDay

Construct an instance of xsd GMonthDay type

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

func (GYear) NewGYear

func (tp GYear) NewGYear(t time.Time) GYear

Construct an instance of xsd GYear type

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(t 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

func (tp HexBinary) NewHexBinary(data []byte) HexBinary

type ID

type ID NCName

TODO: improve next types to correspond to XMLSchema

func (ID) NewID

func (tp ID) NewID(data NCName) ID

type IDREF

type IDREF NCName

func (IDREF) NewIDREF

func (tp IDREF) NewIDREF(data NCName) IDREF

type IDREFS

type IDREFS []IDREF

func (IDREFS) NewIDREFS

func (tp IDREFS) NewIDREFS(data []IDREF) IDREFS

type Int

type Int int32

func (Int) NewInt

func (tp Int) NewInt(data int32) Int

type Integer

type Integer int64

func (Integer) NewInteger

func (tp Integer) NewInteger(data int64) Integer

type Language

type Language Token

func (Language) NewLanguage

func (tp Language) NewLanguage(data Token) (Language, error)

type Long

type Long int64

func (Long) NewLong

func (tp Long) NewLong(data int64) Long

type NMTOKEN

type NMTOKEN Token

func (NMTOKEN) NewNMTOKEN

func (tp NMTOKEN) NewNMTOKEN(data string) NMTOKEN

TODO: check for valid symbols: https://www.w3.org/TR/xml/#NT-Nmtoken

type NMTOKENS

type NMTOKENS []NMTOKEN

func (NMTOKENS) NewNMTOKENS

func (tp NMTOKENS) NewNMTOKENS(data []NMTOKEN) NMTOKENS

type Name

type Name Token

func (Name) NewName

func (tp Name) NewName(data Token) Name

TODO: implements https://www.w3.org/TR/xml/#NT-Name

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

func (QName) NewQName

func (tp QName) NewQName(prefix, local string) QName

type Short

type Short int16

func (Short) NewShort

func (tp Short) NewShort(data int16) Short

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

func (String) NewString

func (tp String) NewString(data string) String

Construct an instance of xsd String type

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

func (Token) NewToken

func (tp Token) NewToken(data NormalizedString) (Token, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL