.. _functx_name-test: ================ functx:name-test ================ Whether a name matches a list of names or name wildcards Description ~~~~~~~~~~~ The functx:name-test function tests a name against a list of names or name wildcards. Valid name wildcards are: *, which matches all names *:x, where x is a local name, which matches all names with that local name, in any namespace p:*, where p is a prefix, which matches all names in the namespace associated with that prefix. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - testname:string() - the name to test * - names:string() - the list of names or name wildcards Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:name-test(name($in-xml),('*')) - true * - functx:name-test(name($in-xml),('pre:*')) - true * - functx:name-test(name($in-xml),('*:a')) - true * - functx:name-test(name($in-xml),('pre:a','pre:b')) - true * - functx:name-test(name($in-xml),('a','b','c')) - false Depends On ~~~~~~~~~~ * :ref:`functx_substring-after-if-contains`.