On 25/10/2025 20:19, Mukul Gandhi wrote:
Hi Martin,

On Fri, Oct 24, 2025 at 8:19 PM Martin Honnen <[email protected]> wrote:
I am getting a null pointer exception trying to use shallow-skip
These issues have been fixed within Xalan's XSLT 3.0 development code.
If you wish, you may please verify.

Any other Xalan implementation feedback, shall be helpful.

Thanks, Mukul, for fixing the NullPointerException for shallow-skip.

However, I find an issue with shallow-copy and text nodes (don't know whether now after your fixes or whether today as I didn't test before with your recent xsl:mode implementation), it seems text nodes get lost:


XML:

<root>
  <div>
    <data>foo</data>
  </div>
</root>


XSLT:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="3.0"
  expand-text="yes">

  <xsl:mode on-no-match="shallow-copy"/>

  <xsl:template match="/">
    <xsl:copy>
      <xsl:apply-templates/>
      <xsl:comment>Run with {system-property('xsl:vendor')} at {current-dateTime()}</xsl:comment>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

Result e.g.

<?xml version="1.0" encoding="UTF-8"?><root><div><data/></div></root><!--Run with Apache Xalan at 2025-10-25T19:08:03.688Z-->

so the white space text nodes in the initial XML input and more importantly, the text node inside of the "data" element, don't seem to be shallow copied.



Reply via email to