You should be able to use something like this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/*">
<results>
<xsl:apply-templates select="Esri/DataProperties/lineage"/>
</results>
</xsl:template>
</xsl:stylesheet>
or more simply (since you're not modifying anything in lineage
):
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no" />
<xsl:template match="/*">
<results>
<xsl:copy-of select="Esri/DataProperties/lineage"/>
</results>
</xsl:template>
</xsl:stylesheet>
It's currently wrapping the output in results
, but you can change that or remove it completely if there is only one lineage
.
I'm also surprised that ESRI isn't using a namespace in this XML. If you have any problems, add a sample input and output as suggested by Lingamurthy CS.