xsd

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 3 Imported by: 6

README

xsd

XML Schema Datatypes

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyURI

type AnyURI Symbol

The data type represents Internationalized Resource Identifier. Used to uniquely identify concept, objects, etc.

func (AnyURI) XSDType

func (v AnyURI) XSDType() XSDType

type Base64Binary

type Base64Binary = []byte

type Boolean

type Boolean = bool

The boolean data-type in knowledge statement

type DataType

type DataType interface {
	~string |
		~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 |
		~float32 | ~float64 |
		~bool |
		~[]byte
}

DataType is a type constrain used by the library. See https://www.w3.org/TR/xmlschema-2/#datatype

Knowledge statements contain scalar objects -- literals. Literals are either language-tagged string `rdf:langString` or type-safe values containing a reference to data-type (e.g. `xsd:string`).

This interface defines data-types supported by the library. It maps well-known semantic types to Golang native types and relation to existed schema(s) and ontologies.

type Double

type Double = float64

type Float

type Float = float32

The floating point data-type in knowledge statement. The library uses various uint precisions.

type HexBinary

type HexBinary = []byte

type String

type String string

The string data-type represents character strings in knowledge statements. The language strings are annotated with corresponding language tag.

func (String) String

func (v String) String() string

func (String) XSDType

func (v String) XSDType() XSDType

type Symbol

type Symbol uint32

The data type is symbol

func (Symbol) XSDType added in v0.1.1

func (v Symbol) XSDType() XSDType

type Value

type Value interface{ XSDType() XSDType }

func From

func From[T DataType](
	symbols interface {
		SymbolOf(s string) (Symbol, error)
	},
	value T,
) (Value, error)

From builds xsd.Value from Golang type(s)

type XSDType added in v0.2.0

type XSDType int
const (
	XSD_NIL XSDType = iota
	XSD_SYMBOL
	XSD_ANYURI
	XSD_STRING
)

XSD Types codes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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