get.namespace.prefix

get.namespace.prefix — Obtain namespace prefix for an element identified by a string containing qualified name

Synopsis

<xsl:template name="get.namespace.prefix">
<xsl:param name="element.name"/>
  ...
</xsl:template>

Description

This template interprets a string containing a qualified name of an element and returns the namespace prefix, if any.

Element name could be an XPath expression starting with the element name; this template will first determine if the occurrence of a colon is preceded by a valid NCName, assuming only ASCII characters.