// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! The XPath data model: a document as a tree of nodes with parents, document //! order, and expanded names. //! //! zxml is a pull parser that hands out borrowed slices and never builds a //! tree, which is exactly right for reading a feed once and exactly wrong for //! XSLT. A template pattern such as `foo[@id='3']/../bar` asks for the parent //! axis; `xsl:sort` reorders a node-set and then asks for document order back; //! a key indexes every node in the document before the first template runs. //! None of that is answerable from a stream, so this module reads the stream //! once and builds the tree those questions need. //! //! The same tree is also what a transformation *produces*. An XSLT result is //! not written straight to a writer because `xsl:variable` with content builds //! a result tree fragment that `xsl:copy-of` can later copy whole, and because //! choosing how to serialize an element (an HTML `
` has no end tag, a //! `