Potential wrong output when dealing conflict template with same priority
hi all, I think the following output seems suspicious, @nwellnhof it would be very apprciated if this issue get reply. version: libxslt-1.1.37
step to reproduce:
reverse.xslt
<?xml version="1.0" encoding="UTF-8"?>
<!-- transformation of the calloutlist element -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">
</xsl:template>
</xsl:stylesheet>
in.xml
<?xml version="1.0" encoding="UTF-8"?>
<winelist>
<wine grape="Chardonnay">
<winery>Benziger</winery>
<product>Carneros</product>
</wine>
</winelist>
actual output:
<?xml version="1.0"?>
<winelist><wine><winery/><product/></wine></winelist>`
expected ouput:
<?xml version="1.0"?>
<winelist>
<wine>
<winery/>
<product/>
</wine>
</winelist>
produced by https://www.freeformatter.com/xsl-transformer.html#before-output
my expected ouput(maybe wrong):
<?xml version="1.0"?>
<winelist>
<wine>
<winery><winery/>
<produce><product/>
</wine>
</winelist>
Thanks for answering!
Edited by Ziyang Chen