Documentation ¶
Overview ¶
Package xsd parses an XML Schema Definition. This package does a number of questionable things to handle the Trafikverket XSD, as their XSDs aren't strictly speaking valid.
The package only implements features necessary to deal with the Trafikverket XSDs and can't be used as a generic XSD decoder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type All ¶
type All struct { XMLName xml.Name `xml:"all"` Annotation *Annotation `xml:"annotation"` Elements []Element `xml:"element"` }
type Annotation ¶
type Annotation struct { XMLName xml.Name `xml:"annotation"` Documentations []Documentation `xml:"documentation"` }
type AttributeGroup ¶
type ComplexContent ¶
type ComplexContent struct { XMLName xml.Name `xml:"complexContent"` Mixed bool `xml:"mixed,attr"` Annotation *Annotation `xml:"annotation"` Extension Extension `xml:"extension"` }
type ComplexType ¶
type ComplexType struct { XMLName xml.Name `xml:"complexType"` Name string `xml:"name,attr"` Mixed bool `xml:"mixed,attr"` All *All `xml:"all"` Sequence *Sequence `xml:"sequence"` SimpleContent *SimpleContent `xml:"simpleContent"` ComplexContent *ComplexContent `xml:"complexContent"` AttributeGroups []AttributeGroup `xml:"attributeGroup"` }
type Documentation ¶
type Element ¶
type Element struct { XMLName xml.Name `xml:"element"` Name string `xml:"name,attr"` Type string `xml:"type,attr"` Reference string `xml:"ref,attr"` Multiple bool `xml:"-"` StrMaxOccurs string `xml:"maxOccurs,attr"` Nillable bool `xml:"nillable,attr"` Annotation *Annotation `xml:"annotation"` SimpleType *SimpleType `xml:"simpleType"` // This attr is specific to Trafikverket Key bool `xml:"key,attr"` }
func (*Element) UnmarshalXML ¶
type Restriction ¶
type Restriction struct { XMLName xml.Name `xml:"restriction"` Base string `xml:"base,attr"` Attributes []Attribute `xml:"attribute"` Enumerations []struct { Value string `xml:"value,attr"` } `xml:"enumeration"` SimpleContent *struct { Value string `xml:"value,attr"` } `xml:"simpleContent"` MinInclusive *struct { Value string `xml:"value,attr"` } `xml:"minInclusive"` MaxInclusive *struct { Value string `xml:"value,attr"` } `xml:"maxInclusive"` Pattern *struct { Value string `xml:"value,attr"` } `xml:"pattern"` }
type Schema ¶
type Schema struct { XMLName xml.Name `xml:"schema"` ComplexTypes []ComplexType `xml:"complexType"` SimpleTypes []SimpleType `xml:"simpleType"` AttributeGroups []AttributeGroup `xml:"attributeGroup"` Annotation []Annotation `xml:"annotation"` Meta meta.Data `xml:"-"` }
func (*Schema) UnmarshalXML ¶
type Sequence ¶
type Sequence struct { XMLName xml.Name `xml:"sequence"` MinOccurs int `xml:"-"` MaxOccurs int `xml:"-"` Multiple bool `xml:"-"` StrMaxOccurs string `xml:"maxOccurs,attr"` Elements []Element `xml:"element"` Annotation *Annotation `xml:"annotation"` }
func (*Sequence) UnmarshalXML ¶
type SimpleContent ¶
type SimpleContent struct { XMLName xml.Name `xml:"simpleContent"` Annotation *Annotation `xml:"annotation"` Extension *Extension `xml:"extension"` }
type SimpleType ¶
type SimpleType struct { XMLName xml.Name `xml:"simpleType"` Name string `xml:"name,attr"` Restriction Restriction `xml:"restriction"` Annotation *Annotation `xml:"annotation"` }
Click to show internal directories.
Click to hide internal directories.