The oxy:allows-global-element() function allows you to check whether or not an element that matches the arguments of the function is valid for the current framework, according to the associated schema. It has the following signature:
oxy:allows-global-element($elementName, ($attributeName, $defaultAttributeValue,
$contains?)?)
elementNameoxy:allows-global-element("para")The above example verifies if the <para> element (of the
default namespace) is allowed in the current framework.
oxy:allows-global-element("*:para")The above example verifies if the <para> element (of any
namespace) is allowed in the current framework.
oxy:allows-global-element("prefix:para")The prefix is resolved in the context of the framework. The function
matches on the element with the para local name from the
previously resolved namespace. If the prefix is not resolved to a namespace, the
function returns a value of false.
oxy:allows-global-element("{namespaceURI}para")The namespaceURI is the namespace of the element. The above
example verifies if the <para> element (of the specified
namespace) is allowed in the current framework.
oxy:allows-global-element("*")The above function verifies if any element is allowed in the current framework.
attributeNameoxy:allows-global-element("*", "class", " topic/topic ")The above example verifies if an element with the class
attribute and the default value of this attribute (that contains the
topic/topic string) is allowed in the current
framework.
oxy:allows-global-element("*", "*:localname", " topic/topic ")oxy:allows-global-element("*", "prefix:localname", " topic/topic ")The prefix is resolved in the context of the framework. If the
prefix is not resolved to a namespace, the function returns a value of
false.
defaultAttributeValuecontainstrue. For the
true value, the default value of the attribute must contain the
defaultAttributeValue parameter. If the value is
false, the two values must be the same.