.. _functx_has-empty-content: ======================== functx:has-empty-content ======================== Whether an element has empty content Description ~~~~~~~~~~~ The functx:has-empty-content function returns true if the element has no content at all (not even whitespace.) This is in contrast to the fn:empty function, which will return true for any element regardless of whether it has any content. To test whether an element has any content besides whitespace, see the functx:all-whitespace function. .. 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-empty-content($in-xml/a) - true * - functx:has-empty-content($in-xml/b) - true * - functx:has-empty-content($in-xml/c) - false * - functx:has-empty-content($in-xml/d) - false * - functx:has-empty-content($in-xml/e) - false * - functx:has-empty-content($in-xml/f) - false * - functx:has-empty-content($in-xml/g) - false See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`empty`. * :ref:`functx_has-mixed-content`. * :ref:`functx_has-element-only-content`. * :ref:`functx_has-simple-content`. * :ref:`functx_all-whitespace`.