model

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpecificAttributes                 AttributeCategories = "Specific Attributes"
	GlobalAttributes                                       = "Global Attributes"
	AriaAttributes                                         = "Aria Attributes"
	DocumentActions                                        = "Document Actions"
	WindowActions                                          = "Window Actions"
	AnimationAdditionAttributes                            = "Animation Addition Attributes"
	AnimationEventAttributes                               = "Animation Event Attributes"
	AnimationTargetElementAttributes                       = "Animation Target Element Attributes"
	AnimationAttributeTargetAttributes                     = "Animation Attribute Target Attributes"
	AnimationTimingAttributes                              = "Animation Timing Attributes"
	AnimationValueAttributes                               = "Animation Value Attributes"
	ConditionalProcessingAttributes                        = "Conditional Processing Attributes"
	CoreAttributes                                         = "Core Attributes"
	PresentationAttributes                                 = "Presentation Attributes"
	FilterPrimitiveAttributes                              = "Filter Primitive Attributes"
	TransferFunctionAttributes                             = "Transfer Function Attributes"
	GlobalEventAttributes                                  = "Global Event Attributes"
	DocumentElementEventAttributes                         = "Document Element Event Attributes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeCategories

type AttributeCategories string

func (AttributeCategories) String

func (a AttributeCategories) String() string

type AttributeConfig

type AttributeConfig struct {
	Name             string
	Boolean          bool
	Comment          Comment
	DocumentationURL string
	InitialValue     string             // if exist value will be there if not it will be empty string ""
	SupportedValues  map[string]Comment // if map has 0 len its
}

type Comment

type Comment string

func (Comment) BuildComment

func (c Comment) BuildComment() string

BuildComment - this method will create comment for attribute or tag. starts after "TagName/AttributeName - %s", BuildComment

type Namespace

type Namespace int
const (
	HTML Namespace = iota
	SVG
	MATH
	XHTML
)

func (Namespace) String

func (n Namespace) String() string

type NamespaceConfig

type NamespaceConfig struct {
	Tags                 []*TagConfig
	AttributesCategories map[AttributeCategories][]*AttributeConfig
}

func (*NamespaceConfig) CheckValueValidity

func (n *NamespaceConfig) CheckValueValidity(name, value string, category AttributeCategories) bool

func (*NamespaceConfig) GetAttributeBoolean

func (n *NamespaceConfig) GetAttributeBoolean(name string, category AttributeCategories) bool

func (*NamespaceConfig) GetAttributeDefaultValue

func (n *NamespaceConfig) GetAttributeDefaultValue(name string, category AttributeCategories) string

func (*NamespaceConfig) GetTagConfig

func (n *NamespaceConfig) GetTagConfig(name string) (*TagConfig, error)

type TagConfig

type TagConfig struct {
	Name                       string
	TagType                    TagType
	Comment                    Comment
	DocumentationURL           string
	AttributesCategorySupports map[AttributeCategories][]string
	SpecificAttributes         []*AttributeConfig
	SupportedChildrenTags      []string
}

type TagType

type TagType int
const (
	DoctypeType TagType = iota
	SelfClosingType
	CommentType
	TextContentType
	FullTagType
)

func (TagType) String

func (t TagType) String() string

type WebSpecification

type WebSpecification struct {
	Version string
	Spec    map[Namespace]*NamespaceConfig
}

func (*WebSpecification) GetConfig

func (w *WebSpecification) GetConfig(tagType Namespace) *NamespaceConfig

Jump to

Keyboard shortcuts

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