Re: [xsl] XSLT3 deep-equal() question

Subject: Re: [xsl] XSLT3 deep-equal() question
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Mar 2020 16:50:23 -0000
On 27.03.2020 17:43, Alan Painter alan.painter@xxxxxxxxx wrote:
> Hello XSLT Community,
>
> I'm Using XSLT3 (Saxon 9.9 HE).
>
> I'm wondering if it's reasonable to expect deep-equal() to always
> return true in the following scenario.B  I suspect "yes" but wondering
> what corner cases that I might encounter.
>
> We'll be pushing some data-oriented source documents, with no external
> entities, through templates which are all in a mode defined from
> "shallow-copy" similar to the below.
>
> What I'm wondering under what conditions of source documents that the
> following stylesheet would return "false" rather than "true".B  (Again,
> excluding external entities.) I'm hoping that the list of conditions
> is nil or very small.
>
> Thanks for any help.
>
> <xsl:stylesheet
> B  B  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> B  B  xmlns:xs="http://www.w3.org/2001/XMLSchema";
> B  B  version="3.0">
>
> B  <xsl:mode name="a" on-no-match="shallow-copy"/>
>
> B  <xsl:output method="text" />
>
> B  <xsl:template match="/" >
> B  B  B  <xsl:variable name="afterApply">
> B  B  B  B  B  <xsl:apply-templates select="/" mode="a"/>
> B  B  B  </xsl:variable>
> B  B  B  <xsl:sequence select="deep-equal(/, $afterApply) => string()" />
> B  </xsl:template>
>
> </xsl:stylesheet>
>

Are there any templates other than the built-in ones for the mode "a"?

Current Thread