Hi!
I'm working on a big XML document that I need to change slightly. I think it can be done with XSLT but I can't figure out how. The document is full of tags like these:
HTML Code:
<verse value="1" chapter="1">...some text...</verse>
I need to extract the numbers of the 'value' and 'chapter' attributes to add them in the text and style them separately. Something like this:

HTML Code:
<verse>
<chapter>1</chapter>
<value>1</value>
...some text...
</verse>
Can this be done with XSLT or is some other script solution better? I don't know XSLT and I tried to learn it just to solve this problem but I'm not doing very well. This is my attempt so far:

HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions">

<xsl:template match="verse[@value]">
	<xsl:value-of select="verse[@value]"/><xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>