|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Semantics of deep-equal function
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








