Excellent, Martin, thank you! I was trying local-name(@*), which didn't
work. Thank you for the fast response.
From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
On 17.07.2019 20:03, Rick Quatro rick@xxxxxxxxxxxxxx wrote:
> For each of the <em> elements, I am trying to get a space-delimited
> list (or string) of attribute names. For example, the first one would
> be "italic" and the second would be "italic bold". My output would be
> similar to this:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <root>
>
> <p>
>
> <em class="italic">first paragraph</em>
>
> </p>
>
> <p>
>
> <em class="italic bold">second paragraph</em>
>
> </p>
>
> </root>
<xsl:template match="em[@*]">
<em class="{@*/name()}">
<xsl:apply-templates/>
</em>
</xsl:template>
should do.
|