XPathConfiguration class
Static configuration for XPath evaluation.
Constructors
-
XPathConfiguration({Map<
String, Object?> ? variables, Map<XmlName, XPathFunctionItem> ? functions, String? namespaceUri, Map<String, String> ? namespaceUris, Map<String, XmlNode> ? documents, Map<String, List< ? collections, Map<XmlNode> >String, String> ? environment, String? baseUri, XPathUnparsedTextLoader? unparsedTextLoader, XPathTraceCallback? onTraceCallback}) -
Creates a static context extending the standard configuration.
factory
-
XPathConfiguration.raw({Map<
String, XPathSequence> variables = const {}, Map<XmlName, XPathFunctionItem> functions = const {}, String? namespaceUri, Map<String, String> namespaceUris = const {}, Map<String, XmlNode> documents = const {}, Map<String, List< collections = const {}, Map<XmlNode> >String, String> environment = const {}, String? baseUri, XPathUnparsedTextLoader? unparsedTextLoader, XPathTraceCallback? onTraceCallback}) -
Creates a static configuration from scratch without any of the
standard functions or namespaces.
const
- XPathConfiguration.standard()
-
Creates a standard static configuration.
factory
Properties
- baseUri → String?
-
Static base URI.
final
-
collections
→ Map<
String, List< XmlNode> > -
Collection definitions.
final
-
documents
→ Map<
String, XmlNode> -
Document definitions.
final
-
environment
→ Map<
String, String> -
Environment variable definitions.
final
-
functions
→ Map<
XmlName, XPathFunctionItem> -
Function definitions.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- namespaceUri → String?
-
Default namespace URI for function lookups.
final
-
namespaceUris
→ Map<
String, String> -
Namespace mapping from prefix to URIs.
final
- onTraceCallback → XPathTraceCallback?
-
Callback to trace evaluation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unparsedTextLoader → XPathUnparsedTextLoader?
-
Unparsed text loader.
final
-
variables
→ Map<
String, XPathSequence> -
Variable definitions.
final
Methods
-
context(
[Object item = XPathSequence.empty]) → XPathContext -
Creates an evaluation context from this configuration, optionally
with a provided context
item. -
copy(
{Map< String, Object?> ? variables, Map<XmlName, XPathFunctionItem> ? functions, String? namespaceUri, Map<String, String> ? namespaceUris, Map<String, XmlNode> ? documents, Map<String, List< ? collections, Map<XmlNode> >String, String> ? environment, String? baseUri, XPathUnparsedTextLoader? unparsedTextLoader, XPathTraceCallback? onTraceCallback}) → XPathConfiguration - Creates a modified copy of the static context.
-
getFunction(
XmlName name, [int? arity]) → XPathFunctionItem -
Looks up an XPath function with the given
nameand optionalarity. -
getFunctionByString(
String name, [int? arity]) → XPathFunctionItem -
Looks up an XPath function by
name(string) and optionalarity. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited