I am playing with deep-equal function of XSLT 2.0 using Saxon 8.4.. I
have written following XML and XSLT so far:
XML file -
<?xml version="1.0"?>
<root>
<x>
<a>1</a>
<p>2</p>
</x>
<y>
<a>1</a>
<p>2</p>
</y>
</root>
XSLT file -
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="text" />
<xsl:template match="/root">
<xsl:if test="deep-equal(x/node(),y/node())">
Equal
</xsl:if>
<xsl:if test="not(deep-equal(x/node(),y/node()))">
Not Equal
</xsl:if>
</xsl:template>
</xsl:stylesheet>
The results are as expected. It seems deep-equal considers white
spaces significant. Is there any way I can do deep equals comparison
ignoring the white spaces?
Regards,
Mukul
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--