functx:has-simple-content
Whether an element has simple content
Description
The functx:has-simple-content function returns true if the element has no child elements but does have some textual (character data) content, even if it is all whitespace.
Parameters |
Description |
---|---|
element:element() |
the XML element to test |
Examples
XPath |
Results |
---|---|
functx:has-simple-content($in-xml/a) |
false |
functx:has-simple-content($in-xml/b) |
false |
functx:has-simple-content($in-xml/c) |
true |
functx:has-simple-content($in-xml/d) |
true |
functx:has-simple-content($in-xml/e) |
false |
functx:has-simple-content($in-xml/f) |
false |