Skip to main content

Module types

Module types 

Source
Expand description

XPath 1.0 Runtime Types (§25).

Internal Rust representation of XPath values: node-sets, strings, numbers, booleans, and conversions between them.

§UPSTREAM-PARITY

XPath 1.0 type system with exact IEEE 754 floating-point semantics: NaN, infinity, negative zero, rounding behavior.

§Courts

XPATH-TYPES-*

Structs§

NodeSet
An XPath node-set.
XPathNode
A node in a node-set, identified by pointer.

Enums§

XPathType
XPath type.
XPathValue
XPath runtime value.

Functions§

compare_document_order
Compare two nodes in document order.
node_string_value
Get the string value of a node (XPath 1.0 §5.1).
number_to_string
Convert a number to a string (XPath 1.0 §4.7.2) — a faithful port of upstream xmlXPathCastNumberToString / xmlXPathFormatNumber (xpath.c, R-000166): the integer shortcut, the 1e9/1e-5 scientific threshold, and the DBL_DIG=15 fraction-digit computation reproduce the oracle’s exact digits, including exponent formatting (e+20, e-05) and trailing-zero trimming.
string_bytes_to_number
Port of upstream xpath.c xmlXPathStringEvalNumber (R-000166): the oracle accumulates digits directly (ret = ret * 10 + d), caps the fraction at MAX_FRAC=20 digits after any leading zeros, applies the exponent with pow(10.0, exp) (underflowing to 0 below the smallest subnormal, e.g. 5e-324), accepts XML whitespace around the number, and returns NaN for anything else — including a leading ‘+’.
string_to_number
Convert a string to a number (XPath 1.0 §4.7.1) — upstream xmlXPathStringEvalNumber semantics.