Versions in this module Expand all Collapse all v1 v1.0.0 Jun 9, 2017 Changes in this version + func ClarkName(uri, local string) string + func CompileFunc(impl func(args []interface{}) interface{}) func(f *Function, args []Expr) Expr + func Literals(exprs ...Expr) bool + func Node2Number(n dom.Node) float64 + func Node2String(n dom.Node) string + func Parent(n dom.Node) dom.Node + func String2Number(s string) float64 + func Value2Boolean(v interface{}) bool + func Value2Number(v interface{}) float64 + func Value2String(v interface{}) string + type Arg int + func Mandatory(t DataType) Arg + func Optional(t DataType) Arg + func Variadic(t DataType) Arg + type ArgCountError string + func (e ArgCountError) Error() string + type Args []Arg + func (a Args) Valid() bool + type Compiler struct + Functions Functions + Namespaces map[string]string + func (c *Compiler) Compile(str string) (x *XPath, err error) + type Context struct + Node dom.Node + Pos int + Size int + Vars Variables + func (ctx *Context) Document() *dom.Document + type ContextExpr struct + func (ContextExpr) Eval(ctx *Context) interface{} + func (ContextExpr) Returns() DataType + type ConversionError struct + Src DataType + Target DataType + func (e ConversionError) Error() string + type DataType int + const Any + const Boolean + const NodeSet + const Number + const String + func TypeOf(v interface{}) DataType + func (r DataType) String() string + type Expr interface + Eval func(ctx *Context) interface{} + Returns func() DataType + func Simplify(e Expr) Expr + func Value2Expr(v interface{}) Expr + type Function struct + Args Args + Compile func(f *Function, args []Expr) Expr + Returns DataType + type FunctionMap map[string]*Function + func (fm FunctionMap) Resolve(function string) *Function + type Functions interface + Resolve func(function string) *Function + type InvalidValueError struct + func (e InvalidValueError) Error() string + type Iterator interface + Next func() dom.Node + func AncestorAxis(n dom.Node) Iterator + func AncestorOrSelfAxis(n dom.Node) Iterator + func AttributeAxis(n dom.Node) Iterator + func ChildAxis(n dom.Node) Iterator + func DescendantAxis(n dom.Node) Iterator + func DescendantOrSelfAxis(n dom.Node) Iterator + func FollowingAxis(n dom.Node) Iterator + func FollowingSiblingAxis(n dom.Node) Iterator + func NamespaceAxis(n dom.Node) Iterator + func ParentAxis(n dom.Node) Iterator + func PrecedingAxis(n dom.Node) Iterator + func PrecedingSiblingAxis(n dom.Node) Iterator + func SelfAxis(n dom.Node) Iterator + type SignatureError string + func (e SignatureError) Error() string + type UnresolvedFunctionError string + func (e UnresolvedFunctionError) Error() string + type UnresolvedPrefixError string + func (e UnresolvedPrefixError) Error() string + type UnresolvedVariableError string + func (e UnresolvedVariableError) Error() string + type VarMustBeNodeSet string + func (e VarMustBeNodeSet) Error() string + type VariableMap map[string]interface + func (vm VariableMap) Eval(variable string) interface{} + type Variables interface + Eval func(variable string) interface{} + type XPath struct + func (x *XPath) Eval(n dom.Node, vars Variables) (r interface{}, err error) + func (x *XPath) EvalBoolean(n dom.Node, vars Variables) (bool, error) + func (x *XPath) EvalNodeSet(n dom.Node, vars Variables) ([]dom.Node, error) + func (x *XPath) EvalNumber(n dom.Node, vars Variables) (float64, error) + func (x *XPath) EvalString(n dom.Node, vars Variables) (string, error) + func (x *XPath) IsStatic() bool + func (x *XPath) Returns() DataType + func (x *XPath) String() string