Minimal API for Documents, having a type parameter for the element type.
This is the foundation of the yaidom uniform query API.
API and implementation trait for elements as containers of elements, as element nodes in a node tree.
Trait partly implementing the contract for elements that have a EName, as well as attributes with EName keys.
Trait defining the contract for elements that have a EName, as well as attributes with EName keys.
Implementation trait for elements that can be asked for the ancestor elements, if any.
API trait for elements that can be asked for the ancestor elements, if any.
Trait defining the contract for elements that have a QName, as well as attributes with QName keys.
Trait defining the contract for elements that have a stored Scope.
Trait partly implementing the contract for elements as text containers.
Trait defining the contract for elements as text containers.
API and implementation trait for elements that can be navigated using paths.
This trait offers Path-based navigation support.
Shorthand for ElemApi[E] with HasENameApi with HasQNameApi with HasScopeApi with HasTextApi
with some additional methods that
use the scope for resolving QName-valued text and attribute values.
Partial implementation of ScopedElemApi
.
Extension to ElemApi that makes querying for sub-types of the element type easy.
Default implementation of SubtypeAwareElemApi.
This is the element transformation part of the yaidom query and update API.
API and implementation trait for transformable elements.
This is the functional update part of the yaidom uniform query API.
API and implementation trait for functionally updatable elements.
This companion object offers some convenience factory methods for "element predicates", that can be used in yaidom queries.
This package contains the query API traits. It contains both the purely abstract API traits as well as the partial implementation traits.
This package depends only on the core package in yaidom, but many other packages do depend on this one.
Notes on migration from yaidom 1.0 to 1.1 and later
When migrating from yaidom 1.0 to 1.1 or later, there are many breaking changes in the query API traits to deal with. Not only was the query API moved to its own package, but also was the inheritance hierarchy (of 1.0) abandoned, and were some traits renamed. The most important renaming was from
ParentElemApi
toElemApi
, where the 1.0ElemApi
becameElemApi with HasENameApi
(where theHasENameApi
companion object contains an implicit class converting ENames to element predicates).Also, trait
PathAwareElemApi
has been removed. Typically, "indexed elements" are more powerful.The query API traits in 1.1 and later are more orthogonal (after all, the inheritance hierarchy is no longer there). We can even simulate the 1.0 query API traits by combining 1.1 traits, keeping renaming in mind:
ParentElemApi
(1.0) ==>ElemApi
(1.1)ElemApi
(1.0) ==>ElemApi with HasENameApi
(1.1)NavigableElemApi
(1.0) ==>ElemApi with HasENameApi with IsNavigableApi
(1.1)UpdatableElemApi
minusPathAwareElemApi
(1.0) ==>ElemApi with HasENameApi with UpdatableElemApi
(1.1)TransformableElemApi
(1.0) ==>TransformableElemApi
(1.1)SubtypeAwareParentElemApi
(1.0) ==>SubtypeAwareElemApi
(1.1)The fact that the 1.0 query API traits can be simulated by (combinations of) 1.1 query API traits shows how orthogonality of the query API has improved in version 1.1.