eu.cdevreeze.yaidom.utils

NamespaceUtils

object NamespaceUtils

Utility for manipulating and finding namespaces.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. NamespaceUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def findAllENames(elem: Elem, documentENameExtractor: DocumentENameExtractor): Set[EName]

    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.

  10. def findAllNamespaces(elem: Elem, documentENameExtractor: DocumentENameExtractor): Set[String]

    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.

  11. def findCombinedScopeWithoutDefaultNamespace(elem: Elem): Scope

    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.

  12. def findENamesInElementItself(elem: Elem, documentENameExtractor: DocumentENameExtractor): Set[EName]

    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.

  13. def findNamespacesInElementItself(elem: Elem, documentENameExtractor: DocumentENameExtractor): Set[String]

    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.

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def pushUpPrefixedNamespaces(elem: Elem): Elem

    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(pushUpPrefixedNamespaces(elem)) == resolved.Elem(elem)

    and the result contains no prefixed namespace undeclarations (not allowed in XML 1.0).

  21. def stripUnusedNamespaces(elem: Elem, documentENameExtractor: DocumentENameExtractor): Elem

    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.

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped