Это короткое и полное преобразование основано на самом базовом шаблоне проектирования XSLT: переопределение правила идентификации :
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://www.portal.nv.gov/FinalCorporationDetails">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[1]/ns0:NVBusinessId">
<xsl:copy>
<xsl:apply-templates select="/*/*/*/ns0:NVBusinessId/text()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="ns0:FinalBusinessIdDetails[position() >1]"/>
</xsl:stylesheet>
при применении к предоставленному документу XML :
<FinalBusinessDetails>
<BusinessIdDetails xmlns:ns0="http://www.portal.nv.gov/FinalCorporationDetails" xmlns="http://www.portal.nv.gov/FinalCorporationDetails">
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV0511201142</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV0511201143</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV20111227759</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV20111227763</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV20111227763</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV20111227759</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV20111227802</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
</BusinessIdDetails>
</FinalBusinessDetails>
желаемый, правильный результат получается :
<FinalBusinessDetails>
<BusinessIdDetails xmlns="http://www.portal.nv.gov/FinalCorporationDetails" xmlns:ns0="http://www.portal.nv.gov/FinalCorporationDetails">
<ns0:FinalBusinessIdDetails>
<ns0:NVBusinessId>:NV0511201142:NV0511201143:NV20111227759:NV20111227763:NV20111227763:NV20111227759::NV20111227802</ns0:NVBusinessId>
</ns0:FinalBusinessIdDetails>
</BusinessIdDetails>
</FinalBusinessDetails>