Thanks Dmitry, that worked great. There are a couple of more issues, if you don't mind.
I added this to get all other nodes.
<xsl:template match="*">
<xsl:copy-of select="@*"/>
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
It works fine except for a couple of tags.
A tag with attributes but no elements,
<nj:Version major="6.0" minor="0.0"/>
becomes
<nj:Version/>
And this section, where dimension has one attribute and three elements,
<nj

ackageDimensions>
<nj:EstimatedDimensions UOM="inch">
<nj:Height>55</nj:Height>
<nj:Length>55</nj:Length>
<nj:Width>55</nj:Width>
</nj:EstimatedDimensions>
<nj:ActualDimensions UOM="inch">
<nj:Height>53</nj:Height>
<nj:Length>53</nj:Length>
<nj:Width>49</nj:Width>
</nj:ActualDimensions>
</nj

ackageDimensions>
becomes
<nj

ackageDimensions UOM="inch">
<nj:EstimatedDimensions>
<nj:Height>55</nj:Height>
<nj:Length>55</nj:Length>
<nj:Width>55</nj:Width>
</nj:EstimatedDimensions>
<nj:ActualDimensions>
<nj:Height>53</nj:Height>
<nj:Length>53</nj:Length>
<nj:Width>49</nj:Width>
</nj:ActualDimensions>
</nj

ackageDimensions>
Any ideas?
Thanks very much for your help,
Greg