Re: [xsl] How to give an attribute a QName value, with the appropriate prefix?

Subject: Re: [xsl] How to give an attribute a QName value, with the appropriate prefix?
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Mon, 27 Aug 2012 22:51:38 +0200
Ok, next try:

<xsl:attribute name="type" select="concat(prefix-from-QName(node-name(.)), ':anySimpleType')" />

Input:

<foo xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <xsd:attribute name="test">bar</xsd:attribute>
</foo>

Output:

<foo xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <xsd:attribute name="test" type="xsd:anySimpleType">bar</xsd:attribute>
</foo>

Current Thread