Finds all ENames, in element names, attribute names, but also in element content and attribute values, using the given DocumentENameExtractor.
Finds all ENames, in element names, attribute names, but also in element content and attribute values, using the given DocumentENameExtractor. The element and all its descendants are taken into account.
The root element of the given indexed element must be the root element of the document.
Returns findAllENames(elem, documentENameExtractor).flatMap(_.namespaceUriOption)
.
Returns findAllENames(elem, documentENameExtractor).flatMap(_.namespaceUriOption)
.
That is, finds all namespaces used in the element and its descendants.
The root element of the given indexed element must be the root element of the document.
Finds the combined Scope of the entire element tree, without default namespace.
Finds the combined Scope of the entire element tree, without default namespace. In case of conflicts, Scopes of elements higher in the tree take precedence, and conflicting Scopes in sibling elements are combined by choosing one of the namespaces for the prefix in question.
Finds the ENames, in element name, attribute names, but also in element content and attribute values, using the given DocumentENameExtractor.
Finds the ENames, in element name, attribute names, but also in element content and attribute values, using the given DocumentENameExtractor. Only the element itself is taken into consideration, not its descendants.
The root element of the given indexed element must be the root element of the document.
Returns findENamesInElementItself(elem, documentENameExtractor).flatMap(_.namespaceUriOption)
.
Returns findENamesInElementItself(elem, documentENameExtractor).flatMap(_.namespaceUriOption)
.
That is, finds the namespaces used in the element itself, ignoring its descendants.
The root element of the given indexed element must be the root element of the document.
Pushes up prefixed namespace declarations as far to the root element as possible.
Pushes up prefixed namespace declarations as far to the root element as possible. Preferably all prefixed namespace declarations end up in the root element afterwards.
Note that a simple.Elem
does not explicitly store namespace declarations, but these are implicit
instead, as the difference between the Scope and the Scope of its parent element.
The function can be defined as:
elem.notUndeclaringPrefixes(findCombinedScopeWithoutDefaultNamespace(elem))
Therefore:
resolved.Elem.from(pushUpPrefixedNamespaces(elem)) == resolved.Elem.from(elem)
and the result contains no prefixed namespace undeclarations (not allowed in XML 1.0).
Returns an adapted copy (as simple Elem) where all unused namespaces have been removed from the Scopes (of the element and its descendants).
Returns an adapted copy (as simple Elem) where all unused namespaces have been removed from the Scopes (of the
element and its descendants). To determine the used namespaces, method findAllNamespaces
is called on the
element.
The root element of the given indexed element must be the root element of the document.
This method is very useful when retrieving and serializing a small fragment of an XML tree in which most namespace declarations in the root element are not needed for the retrieved fragment.
Utility for manipulating and finding namespaces.