On 24/10/2025 14:31, Mukul Gandhi wrote:
An implementation of xsl:mode declaration's following attributes is complete,

on-no-match? = "deep-copy" | "shallow-copy" | "deep-skip" |
"shallow-skip" | "text-only-copy" | "fail"
on-multiple-match? = "use-last" | "fail"
warning-on-no-match? = boolean
warning-on-multiple-match? = Boolean



I am getting a null pointer exception trying to use shallow-skip e.g.

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="3.0">

   <!-- XSL 3 stylesheet test case, to test xsl:mode instruction. -->

   <xsl:output method="xml" indent="yes"/>

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

</xsl:stylesheet>

with input

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

gives fatalError: java.lang.NullPointerException

as does the XSLT with a more meaningful use of shallow-skip

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="3.0">

   <!-- XSL 3 stylesheet test case, to test xsl:mode instruction. -->

   <xsl:output method="xml" indent="yes"/>

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

   <xsl:template match="data">
     <xsl:copy-of select="."/>
   </xsl:template>

</xsl:stylesheet>


Let me know whether you can reproduce this or whether you need a Jira issue, unfortunately a first technician was here to check on the internet connection but couldn't resolve it and it will at least take until tomorrow to get someone else to look into it; doing everything over the mobile connection works great but I am running out of quota.

Reply via email to