xpath

package
v0.0.0-...-fa1654f Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDPE mainQueryType = iota
	NUDPE
)
View Source
const (
	Undefined customBool = iota
	False
	True
)

Custom boolean values which comprises the 'Undefined' value

View Source
const (
	FPE udpeType = iota
	RPE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	// contains filtered or unexported fields
}

func NewAttribute

func NewAttribute(key, value string) *Attribute

func (*Attribute) String

func (a *Attribute) String() string

type CloseTagSemanticValue

type CloseTagSemanticValue struct {
	// contains filtered or unexported fields
}

func NewCloseTagSemanticValue

func NewCloseTagSemanticValue(id string, startPos int, endPos int) *CloseTagSemanticValue

type Element

type Element struct {
	// contains filtered or unexported fields
}

func (*Element) SetFromExtremeTags

func (e *Element) SetFromExtremeTags(openTag OpenTagSemanticValue, closeTag CloseTagSemanticValue)

func (*Element) SetFromSingleTag

func (e *Element) SetFromSingleTag(openCloseTag OpenCloseTagSemanticValue)

func (*Element) String

func (e *Element) String() string

type ExecutorCommand

type ExecutorCommand interface {
	Execute(xpathQuery string) ExecutorCommand
	Against(source []byte) ExecutorCommand
	WithNumberOfThreads(numberOfThreads int) ExecutorCommand
	Run(runner *gopapageno.Runner) (results []Position, err error)
	InVerboseMode() ExecutorCommand
}

ExecutorCommand represents a command that can be made by a client to execute a XPath query

func Execute

func Execute(xpathQuery string) ExecutorCommand

Execute specify the XPath query to be executed

func WithNumberOfThreads

func WithNumberOfThreads(numberOfThreads int) ExecutorCommand

WithNumberOfThreads specify the number of threads to be used to execute the XPath query

type Logger

type Logger interface {
	Printf(string, ...interface{})
}

type NonTerminal

type NonTerminal interface {
	SetExecutionTable(execTab executionTable) NonTerminal
	SetNode(n interface{}) NonTerminal
	Children() []NonTerminal
	SetDirectChildAndInheritItsChildren(NonTerminal) NonTerminal
	ExecutionTable() executionTable
	Node() interface{}
	Position() Position
}

NonTerminal represents a unique non terminal inside the syntax tree representing the XML document

func NewNonTerminal

func NewNonTerminal() NonTerminal

type OpenCloseTagSemanticValue

type OpenCloseTagSemanticValue struct {
	OpenTagSemanticValue
}

func NewOpenCloseTagSemanticValue

func NewOpenCloseTagSemanticValue(id string, attributes []*Attribute, startPos int, endPos int) *OpenCloseTagSemanticValue

type OpenTagSemanticValue

type OpenTagSemanticValue struct {
	// contains filtered or unexported fields
}

func NewOpenTagSemanticValue

func NewOpenTagSemanticValue(id string, attributes []*Attribute, startPos int, endPos int) *OpenTagSemanticValue

type Position

type Position interface {
	Extremes() (start, end int)
	Start() int
	End() int
}

Position represents the Position of some information inside a document in terms of number of characters from the beginning of the document.

type Reduction

type Reduction struct {
	// contains filtered or unexported fields
}

func (*Reduction) Handle

func (r *Reduction) Handle()

func (*Reduction) Reset

func (r *Reduction) Reset()

func (*Reduction) Setup

func (r *Reduction) Setup(reducedNT, generativeNT, wrappedNT NonTerminal)

type Text

type Text struct {
	// contains filtered or unexported fields
}

Text node

func (*Text) SetFromText

func (t *Text) SetFromText(tsv TextSemanticValue)

func (*Text) String

func (t *Text) String() string

type TextSemanticValue

type TextSemanticValue struct {
	// contains filtered or unexported fields
}

func NewTextSemanticValue

func NewTextSemanticValue(data string, startPos int, endPos int) *TextSemanticValue

Jump to

Keyboard shortcuts

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