Re: [xsl] Getting a sequence of attribute names

Subject: Re: [xsl] Getting a sequence of attribute names
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Jul 2019 18:08:23 -0000
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.

Current Thread