.. _functx_has-element-only-content: =============================== functx:has-element-only-content =============================== Whether an element has element-only content Description ~~~~~~~~~~~ The functx:has-element-only-content function returns true if the element has only child elements, with no direct textual (character data) content other than whitespace. Technically, when a schema is not in use, the spaces and line breaks used to pretty-print XML documents do count as text nodes. However, for convenience, this function ignores them. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - element:element() - the XML element to test Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:has-element-only-content($in-xml/a) - false * - functx:has-element-only-content($in-xml/b) - false * - functx:has-element-only-content($in-xml/c) - false * - functx:has-element-only-content($in-xml/d) - false * - functx:has-element-only-content($in-xml/e) - true * - functx:has-element-only-content($in-xml/f) - false * - functx:has-element-only-content($in-xml/g) - true * - functx:has-element-only-content($in-xml/h) - true * - functx:has-element-only-content($in-xml/i) - true See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_has-empty-content`. * :ref:`functx_has-mixed-content`. * :ref:`functx_has-simple-content`. * :ref:`functx_all-whitespace`.