Documentation ¶
Index ¶
- type Array
- type AttrNode
- func (an *AttrNode) Attr() html.Attribute
- func (an *AttrNode) FirstChild() Node
- func (an *AttrNode) Inspect() string
- func (an *AttrNode) Key() string
- func (an *AttrNode) LastChild() Node
- func (an *AttrNode) NextSibling() Node
- func (an *AttrNode) Parent() Node
- func (an *AttrNode) PrevSibling() Node
- func (an *AttrNode) Self() *html.Node
- func (an *AttrNode) SetAttr(attr html.Attribute)
- func (an *AttrNode) SetTree(p *html.Node)
- func (an *AttrNode) Text() string
- func (an *AttrNode) Tree() *html.Node
- func (an *AttrNode) Type() Type
- type BaseNode
- func (bn *BaseNode) Attr() []Node
- func (bn *BaseNode) FirstChild() Node
- func (bn *BaseNode) Inspect() string
- func (bn *BaseNode) LastChild() Node
- func (bn *BaseNode) NextSibling() Node
- func (bn *BaseNode) Parent() Node
- func (bn *BaseNode) PrevSibling() Node
- func (bn *BaseNode) Self() *html.Node
- func (bn *BaseNode) SetTree(tree *html.Node)
- func (bn *BaseNode) Text() string
- func (bn *BaseNode) Tree() *html.Node
- func (bn *BaseNode) Type() Type
- type Boolean
- type Context
- type Decimal
- type Double
- type Error
- type Ev
- type Focus
- type Func
- type FuncInline
- type FuncNamed
- type FuncPartial
- type HashKey
- type Hasher
- type Integer
- type Item
- type Map
- type Node
- type Pair
- type Placeholder
- type Sequence
- type Static
- type String
- type Type
- type Varref
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttrNode ¶
type AttrNode struct {
// contains filtered or unexported fields
}
AttrNode ::= AttributeNode Attribute node is not exist in the golang.org/x/net/html package so the struct field is different from the BaseNode. AttrNode is basically, a child of ElementNode.
func (*AttrNode) FirstChild ¶
FirstChild is not exist in AttrNode
func (*AttrNode) NextSibling ¶
NextSibling returns next sibling of the current one if exist
func (*AttrNode) PrevSibling ¶
PrevSibling returns previous sibling of the current one if exist
type BaseNode ¶
type BaseNode struct {
// contains filtered or unexported fields
}
BaseNode ::= ElementNode | TextNode | DocumentNode | CommentNode | DoctypeNode BaseNode just wraps *html.Node
func (*BaseNode) FirstChild ¶
FirstChild returns first child node of the current one if exist
func (*BaseNode) NextSibling ¶
NextSibling returns next sibling node of the current one if exist
func (*BaseNode) PrevSibling ¶
PrevSibling returns previous sibling node of the current one if exist
type Boolean ¶
type Boolean struct {
// contains filtered or unexported fields
}
Boolean is an item that is represents bool data-type
type Context ¶
type Context struct { Doc Node CNode []Node CItem Item Focus Static // contains filtered or unexported fields }
Context contains items that is used in Eval or built-in functions store field stores Varref as a key, Item as as value In example expression, let $a := 1 return $a, 'a' is a key and 1 is a value outer is a context to make inner scope of function. In example expression, let $a := 1 return function($a) {$a} returned function makes new context to keep the varref $a
func NewEnclosedContext ¶
NewEnclosedContext creates a new context and stores the current context in the outer field
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
Decimal is an item that is represents float64 data-type number token that is not contains `e` or `E` is evaluated to Decimal
type Double ¶
type Double struct {
// contains filtered or unexported fields
}
Double is an item that is represents float64 data-type number token that contains `e` or `E` is evaluated to Double
type Error ¶
type Error struct {
Message string
}
Error is an item that is represents error when doing evaluation
type Focus ¶
Focus contains context size, context position, context axis CSize is used in bif - fn:last() CPos is used in predicate expressions CAxis is used to evaluate (relative)path expressions
type FuncInline ¶
FuncInline ::= function() {}
type FuncPartial ¶
FuncPartial ::= ns:bif(?,...)
func (*FuncPartial) Inspect ¶
func (fp *FuncPartial) Inspect() string
type Hasher ¶
type Hasher interface {
HashKey() HashKey
}
Hasher implemented in atomic types: integer, decimal, double, boolean, string So, atomic types are used as a Map key
type Integer ¶
type Integer struct {
// contains filtered or unexported fields
}
Integer is an item that is represents int data-type
type Node ¶
type Node interface { Item Tree() *html.Node SetTree(t *html.Node) Self() *html.Node Parent() Node FirstChild() Node LastChild() Node PrevSibling() Node NextSibling() Node Text() string }
Node ::= document, element, attribute, comment, namespace, processing-instruction, text
type Placeholder ¶
type Placeholder struct{}
Placeholder is an item that is represents ?(question token) when doing evaluation
type Sequence ¶
type Sequence struct {
Items []Item
}
Sequence is an ordered collection of zero or more items.
type Static ¶
type Static struct {
BaseURI string
}
Static contains information that is available during static analysis of the expression, prior to its evaluation
type String ¶
type String struct {
// contains filtered or unexported fields
}
String is an item that is represents string data-type
type Type ¶
type Type string
Type represents Item Type
const ( NilType Type = "nil" ErrorType Type = "error" PholderType Type = "?" VarrefType Type = "$" SequenceType Type = "sequence" // function MapType Type = "map" ArrayType Type = "array" FuncType Type = "function" // node ErrorNodeType Type = "0" TextNodeType Type = "1" DocumentNodeType Type = "2" ElementNodeType Type = "3" CommentNodeType Type = "4" DoctypeNodeType Type = "5" RawNodeType Type = "6" AttributeNodeType Type = "7" // atomic DoubleType Type = "xs:double" DecimalType Type = "xs:decimal" IntegerType Type = "xs:integer" StringType Type = "xs:string" BooleanType Type = "xs:boolean" )
Item Types