You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Mukul Gandhi <ga...@gmail.com> on 2025/10/15 16:34:03 UTC

Xalan 3.0 beta release request

Hi all,
    I'm curious, whether anyone is interested to have a Xalan XSLT 3.0
beta release, at this moment?

Or, any other thoughts about work that Xalan team has done so far,
with respect to XSLT 3.0 specification implementation.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Martin,
    Thanks.

On Thu, Nov 27, 2025 at 11:06 PM Martin Honnen <ma...@gmx.de> wrote:
>
> One other essential thing missing is in my view is support for
> xsl:next-match

Hoping that, Xalan's XSLT 3 implementation may have, implementation of
xsl:next-instruction in the future.

> In general, next to running samples from the test suite, I think it
> might be worth by now to check how far your XSLT 3.0 branch works when
> run against existing real life XSLT 2 or XSLT 3 code, Schxslt 1 and
> Schxslt 2 being just one (but certainly important) example.

IMHO, I don't consider, Xalan's XSLT 3 implementation as *mine*. It
significantly reuses Xalan-J's XSLT 1.0 implementation.

> All meant as constructive input; congrats on the wide range of XPath 2
> and 3.1 functions and XSLT 3.0 declarations and instructions you have
> implemented so far.

I've very much enjoyed learning XSLT 3 and XPath 3.1 languages, during
Xalan's XSLT 3 implementation phase.

I'm taking little liberty, to copy this mail to Scott Boag, if he's
any comments on Xalan's XSLT 3.0 development work. Xalan's XSLT 3.0
latest code is located here,
https://github.com/apache/xalan-java/tree/xalan-j_xslt3.0_mvn.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
On 15/10/2025 18:34, Mukul Gandhi wrote:
> Hi all,
>      I'm curious, whether anyone is interested to have a Xalan XSLT 3.0
> beta release, at this moment?
>
> Or, any other thoughts about work that Xalan team has done so far,
> with respect to XSLT 3.0 specification implementation.

One other essential thing missing is in my view is support for 
xsl:next-match, it its, for example, kind of the working horse of the 
Schxslt XSLT 2 or XSLT 3 Schematron implementations.

Thus if you want your XSLT 3 Xalan processor to be usable/compatible 
with existing XSLT 2 or 3 stylesheets (like Schxslt 1 or 2) it needs 
support for xsl:next-match.

In general, next to running samples from the test suite, I think it 
might be worth by now to check how far your XSLT 3.0 branch works when 
run against existing real life XSLT 2 or XSLT 3 code, Schxslt 1 and 
Schxslt 2 being just one (but certainly important) example.

All meant as constructive input; congrats on the wide range of XPath 2 
and 3.1 functions and XSLT 3.0 declarations and instructions you have 
implemented so far.



Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Joe,
    Thanks.

On Wed, Oct 15, 2025 at 10:40 PM Joseph Kesselman via j-users
<j-...@xalan.apache.org> wrote:
>
> I'm interested in getting both the mavenized product and the beta released. Things have been a bit hectic again, but I may be able to tackle this early next month. I'll try.
>
>
> --
> Joe
>
> Car Talk has been advised that the staff opticians, C. F. Eyecare, are now under new management. It's Ike and Zeke Leary, now; Lorraine is gone.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Joseph Kesselman via j-users <j-...@xalan.apache.org>.
I'm interested in getting both the mavenized product and the beta released. Things have been a bit hectic again, but I may be able to tackle this early next month. I'll try.


--
Joe

Car Talk has been advised that the staff opticians, C. F. Eyecare, are now under new management. It's Ike and Zeke Leary, now; Lorraine is gone.
________________________________
From: Martin Honnen <ma...@gmx.de>
Sent: Wednesday, October 15, 2025 12:37:44 PM
To: j-users@xalan.apache.org <j-...@xalan.apache.org>
Subject: Re: Xalan 3.0 beta release request


On 15/10/2025 18:34, Mukul Gandhi wrote:
> Hi all,
>      I'm curious, whether anyone is interested to have a Xalan XSLT 3.0
> beta release, at this moment?
>
> Or, any other thoughts about work that Xalan team has done so far,
> with respect to XSLT 3.0 specification implementation.
>
I think if you are serious about having an XSLT 3.0 processor, you need
to implement xsl:mode; otherwise you make it very hard for users to test
their XSLT 3 code samples with your implementation, I would think that
most XSLT 3.0 code has usage of xsl:mode to set up the processing.



Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Martin,
    Thanks for thoughts.

From my point of view, I think, with Xalan xsl:template match="..."
name="..." mode="abc" (an XSLT 1.0 syntax, also) works very well with
XSLT 3.0 stylesheets (that don't use xsl:mode instruction) as well.

But definitely, xsl:mode is a useful XSLT instruction, and Xalan
should try to implement that.

On Wed, Oct 15, 2025 at 10:07 PM Martin Honnen <ma...@gmx.de> wrote:

> I think if you are serious about having an XSLT 3.0 processor, you need
> to implement xsl:mode; otherwise you make it very hard for users to test
> their XSLT 3 code samples with your implementation, I would think that
> most XSLT 3.0 code has usage of xsl:mode to set up the processing.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
On 24/10/2025 14:31, Mukul Gandhi wrote:
> Xalan's XSLT 3.0 development code, now has implementation of xsl:mode
> declaration.


Congrats on that, I will sure test it and provide feedback. Currently 
bogged by Internet connection problems so it might take me a few days to 
get back to normal and pull and build Xalan.


Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
On 28/10/2025 18:06, Mukul Gandhi wrote:
> These, Xalan implementation issues, have been fixed within Xalan's
> XSLT 3.0 development code on the repos.


Great, thanks a lot.

To me, an XSLT processor doesn't really feel like a "real" XSLT 3.0 
processor if I can't set up my processing with xsl:mode, so nice you 
added support for xsl:mode.

Of course that is just a personal perception and opinion, and you have 
probably been busy enough getting all those other XPath 2 and 3 and XSLT 
2 and 3 features implemented.

Looking forward to a beta release.


Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Martin,

On Tue, Oct 28, 2025 at 6:45 PM Martin Honnen <ma...@gmx.de> wrote:
> in terms of shallow-copy, it seems you need to make sure that comment
> nodes and processing instruction nodes are copied as well, i.e.
> currently if I use xsl:mode on-no-match="shallow-copy" on
>
> <root>
>    <item>a</item>
>    <item>b</item>
>    <!-- need to add more items -->
>    <?pi test?>
> </root>
>
> the result with Xalan is
>
> <?xml version="1.0" encoding="UTF-8"?><root>
>    <item>a</item>
>    <item>b</item>
>
>
> </root>
>
> but should be
>
> <?xml version="1.0" encoding="UTF-8"?><root>
>    <item>a</item>
>    <item>b</item>
>    <!-- need to add more items -->
>    <?pi test?>
> </root>

These, Xalan implementation issues, have been fixed within Xalan's
XSLT 3.0 development code on the repos.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
Hi Mukul,

On 28/10/2025 13:39, Mukul Gandhi wrote:
> These issues, have been now fixed on Xalan's XSLT 3.0 development
> branch. You may please, verify whether the new fixes are correct or
> not.


in terms of shallow-copy, it seems you need to make sure that comment 
nodes and processing instruction nodes are copied as well, i.e. 
currently if I use xsl:mode on-no-match="shallow-copy" on

<root>
   <item>a</item>
   <item>b</item>
   <!-- need to add more items -->
   <?pi test?>
</root>

the result with Xalan is

<?xml version="1.0" encoding="UTF-8"?><root>
   <item>a</item>
   <item>b</item>


</root>

but should be

<?xml version="1.0" encoding="UTF-8"?><root>
   <item>a</item>
   <item>b</item>
   <!-- need to add more items -->
   <?pi test?>
</root>




Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Martin,
    Thanks for Xalan, implementation feedback.

On Mon, Oct 27, 2025 at 11:26 PM Martin Honnen <ma...@gmx.de> wrote:

> Thanks again for another fix.
>
> However, it appears that xsl:mode on-no-match="shallow-copy" now copies
> elements and text nodes, but it appears no attribute nodes are copied e.g.
>
> <root><section id="s1" title="section 1"><p>Test</p></section></root>
>
> run through xsl:mode on-no-match="shallow-copy" drops the attributes and
> outputs
>
> <root><section><p>Test</p></section></root>

These issues, have been now fixed on Xalan's XSLT 3.0 development
branch. You may please, verify whether the new fixes are correct or
not.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
Am 27.10.2025 um 13:02 schrieb Mukul Gandhi:
> These Xalan XSLT 3.0 xsl:mode instruction, issues have been fixed on
> Xalan's XSLT 3.0 code branch. You may verify, whether these fixes are
> ok or not.

Thanks again for another fix.

However, it appears that xsl:mode on-no-match="shallow-copy" now copies 
elements and text nodes, but it appears no attribute nodes are copied e.g.

<root><section id="s1" title="section 1"><p>Test</p></section></root>

run through xsl:mode on-no-match="shallow-copy" drops the attributes and 
outputs

<root><section><p>Test</p></section></root>




Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hello Martin,

On Mon, Oct 27, 2025 at 12:18 AM Martin Honnen <ma...@gmx.de> wrote:

> > 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:
> >
>
> Also visible in
> https://github.com/martin-honnen/xalan-java/commit/a37db539fe1a581939f6b6ff533034057133afb7#diff-6a4f3eba9b525ad0fc2d27a43b4ac08c881e94f42d7e9db5de3b5a493bd0db0f,
> with the initial implementation of xsl:mode and shallow-copy the result
> had a text node in e.g. the x, y and z element, with the changes of the
> last commit these elements are now empty.
>

These Xalan XSLT 3.0 xsl:mode instruction, issues have been fixed on
Xalan's XSLT 3.0 code branch. You may verify, whether these fixes are
ok or not.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
On 25/10/2025 21:14, Martin Honnen wrote:
>
>
> 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:
>

Also visible in 
https://github.com/martin-honnen/xalan-java/commit/a37db539fe1a581939f6b6ff533034057133afb7#diff-6a4f3eba9b525ad0fc2d27a43b4ac08c881e94f42d7e9db5de3b5a493bd0db0f, 
with the initial implementation of xsl:mode and shallow-copy the result 
had a text node in e.g. the x, y and z element, with the changes of the 
last commit these elements are now empty.


Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
On 25/10/2025 20:19, Mukul Gandhi wrote:
> Hi Martin,
>
> On Fri, Oct 24, 2025 at 8:19 PM Martin Honnen <ma...@gmx.de> 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.




Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Martin,

On Fri, Oct 24, 2025 at 8:19 PM Martin Honnen <ma...@gmx.de> 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.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hello Martin,

On Fri, Oct 24, 2025 at 8:19 PM Martin Honnen <ma...@gmx.de> wrote:

> 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.

Thanks for feedback, on Xalan's XSLT 3.0 xsl:mode instruction's
implementation. I'm able to reproduce this issue on my local, within
Xalan's XSLT 3.0 development code.

Hoping that, this issue shall get fixed within Xalan. I think, its
fine that we know about this Xalan's implementation issue, here on
this list.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
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.


Re: Xalan 3.0 beta release request

Posted by Mukul Gandhi <ga...@gmail.com>.
Hello Xalan users,

On Wed, Oct 15, 2025 at 10:07 PM Martin Honnen <ma...@gmx.de> wrote:
> I think if you are serious about having an XSLT 3.0 processor, you need
> to implement xsl:mode; otherwise you make it very hard for users to test
> their XSLT 3 code samples with your implementation, I would think that
> most XSLT 3.0 code has usage of xsl:mode to set up the processing.

Xalan's XSLT 3.0 development code, now has implementation of xsl:mode
declaration.

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

An xsl:stylesheet's attribute "default-mode" has also been implemented.

If anyone wishes to try using Xalan's XSLT 3.0 xsl:mode
implementation, that shall be great, and any feedbacks shall be useful
to further improve Xalan.


-- 
Regards,
Mukul Gandhi

Re: Xalan 3.0 beta release request

Posted by Martin Honnen <ma...@gmx.de>.
On 15/10/2025 18:34, Mukul Gandhi wrote:
> Hi all,
>      I'm curious, whether anyone is interested to have a Xalan XSLT 3.0
> beta release, at this moment?
>
> Or, any other thoughts about work that Xalan team has done so far,
> with respect to XSLT 3.0 specification implementation.
>
I think if you are serious about having an XSLT 3.0 processor, you need 
to implement xsl:mode; otherwise you make it very hard for users to test 
their XSLT 3 code samples with your implementation, I would think that 
most XSLT 3.0 code has usage of xsl:mode to set up the processing.