You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jared Davis <ja...@davisprogramming.com> on 2023/01/31 17:12:54 UTC
Source of regular expression jar in Xalan 2.7.3 RC9
Hi,
I've noticed an error in the regular expression jar that is included with Xalan 2.7.3 RC9.
import org.apache.regexp.RE;
public class ReBroken {
public static void main(String[] args) throws Exception {
RE re = new RE("a[A-CDE-G]");
String test = "ABCDEFG";
for (int ndx=0; ndx < test.length();ndx++) {
if (!re.match("a" + test.substring(ndx, ndx + 1))) {
System.out.println("ERROR Failed to match on " + test.substring(ndx, ndx + 1));
} else {
System.out.println(" OK match on " + test.substring(ndx, ndx + 1));
}
}
}
}
ouputs
OK match on A
OK match on B
OK match on C
ERROR Failed to match on D
OK match on E
OK match on F
OK match on G
It should match on the D case.
If I use jakarta-regexp-1.5.jar instead of the Xalan jar it works correctly.
OK match on A
OK match on B
OK match on C
OK match on D
OK match on E
OK match on F
OK match on G
Is this the correct list to report this issue?
Re: Source of regular expression jar in Xalan 2.7.3 RC9
Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
One advantage of not using Maven to build is that we can simply drop
this jar completely. It's just a jar that we're carrying around for no
obvious reason. It doesn't seem to be a dependency. Delete it and
forget it.
On Thu, Apr 13, 2023 at 7:15 AM Mukul Gandhi <mu...@apache.org> wrote:
>
> Hi Jared,
>
> On Thu, Apr 13, 2023 at 4:31 AM Jared Davis <ja...@davisprogramming.com> wrote:
>
> > What is the best way to have the next release of Xalan include an updated regular expression library?
> >
> > The one used has known errors as the sample program below shows.
> >
> > This error was fixed in version 1.4.
> >
> > https://bz.apache.org/bugzilla/show_bug.cgi?id=2121
> >
> > https://bz.apache.org/bugzilla/show_bug.cgi?id=19329
> >
> > My workaround is to remove the classes in package org.apache.regexp from the jar and add jar jakarta-regexp-1.5.jar to the project.
>
> I cannot find, any usages of Java package org.apache.regexp
> (distributed by XalanJ 2.7.3, within jar file regexp.jar), anywhere
> within XalanJ implementation and tests codebases. We included the jar
> file regexp.jar, within XalanJ 2.7.3, because this jar file was
> available with XalanJ 2.7.2 as well.
>
> For what, is the jar file regexp.jar currently used within XalanJ?
>
>
> --
> Regards,
> Mukul Gandhi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
> For additional commands, e-mail: dev-help@xalan.apache.org
>
--
Elliotte Rusty Harold
elharo@ibiblio.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
Re: Source of regular expression jar in Xalan 2.7.3 RC9
Posted by Mukul Gandhi <mu...@apache.org>.
Hi Stanimir,
On Thu, Apr 13, 2023 at 1:43 PM Stanimir Stamenkov
<s7...@netscape.net.invalid> wrote:
> > For what, is the jar file regexp.jar currently used within XalanJ?
>
> Could be it was once meant to support the EXSLT Regular Expressions module:
>
> * http://exslt.github.io/regexp/index.html
>
> but I couldn't find traces of Xalan ever implementing it.
I think, going forward, when XalanJ might implement XPath 3.1 and XSLT
3.0 regex support as defined by these specs, XalanJ probably might not
need support of regex library regexp.jar and we could drop this jar
file from future XalanJ distributions.
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
Re: Source of regular expression jar in Xalan 2.7.3 RC9
Posted by Stanimir Stamenkov <s7...@netscape.net.INVALID>.
Thu, 13 Apr 2023 12:44:29 +0530, /Mukul Gandhi/:
> I cannot find, any usages of Java package org.apache.regexp
> (distributed by XalanJ 2.7.3, within jar file regexp.jar), anywhere
> within XalanJ implementation and tests codebases. We included the jar
> file regexp.jar, within XalanJ 2.7.3, because this jar file was
> available with XalanJ 2.7.2 as well.
>
> For what, is the jar file regexp.jar currently used within XalanJ?
Could be it was once meant to support the EXSLT Regular Expressions module:
* http://exslt.github.io/regexp/index.html
but I couldn't find traces of Xalan ever implementing it. Then in now
deleted "regexp.README.txt"
<https://github.com/apache/xalan-java/blob/d5a5302bfed/lib/regexp.README.txt#L4>
I'm reading (possibly outdated):
> Used By: BCEL.jar which is used by XSLTC component of xml-xalan/java
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
Re: Source of regular expression jar in Xalan 2.7.3 RC9
Posted by Mukul Gandhi <mu...@apache.org>.
Hi Jared,
On Thu, Apr 13, 2023 at 4:31 AM Jared Davis <ja...@davisprogramming.com> wrote:
> What is the best way to have the next release of Xalan include an updated regular expression library?
>
> The one used has known errors as the sample program below shows.
>
> This error was fixed in version 1.4.
>
> https://bz.apache.org/bugzilla/show_bug.cgi?id=2121
>
> https://bz.apache.org/bugzilla/show_bug.cgi?id=19329
>
> My workaround is to remove the classes in package org.apache.regexp from the jar and add jar jakarta-regexp-1.5.jar to the project.
I cannot find, any usages of Java package org.apache.regexp
(distributed by XalanJ 2.7.3, within jar file regexp.jar), anywhere
within XalanJ implementation and tests codebases. We included the jar
file regexp.jar, within XalanJ 2.7.3, because this jar file was
available with XalanJ 2.7.2 as well.
For what, is the jar file regexp.jar currently used within XalanJ?
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org
Re: Source of regular expression jar in Xalan 2.7.3 RC9
Posted by Jared Davis <ja...@davisprogramming.com>.
Hi,
What is the best way to have the next release of Xalan include an updated regular expression library?
The one used has known errors as the sample program below shows.
This error was fixed in version 1.4.
https://bz.apache.org/bugzilla/show_bug.cgi?id=2121 <https://bz.apache.org/bugzilla/show_bug.cgi?id=2121>
https://bz.apache.org/bugzilla/show_bug.cgi?id=19329 <https://bz.apache.org/bugzilla/show_bug.cgi?id=19329>
My workaround is to remove the classes in package org.apache.regexp from the jar and add jar jakarta-regexp-1.5.jar to the project.
Thanks,
Jared
> On Jan 31, 2023, at 12:12 PM, Jared Davis <ja...@davisprogramming.com> wrote:
>
> Hi,
>
> I've noticed an error in the regular expression jar that is included with Xalan 2.7.3 RC9.
>
> import org.apache.regexp.RE;
> public class ReBroken {
> public static void main(String[] args) throws Exception {
> RE re = new RE("a[A-CDE-G]");
> String test = "ABCDEFG";
> for (int ndx=0; ndx < test.length();ndx++) {
> if (!re.match("a" + test.substring(ndx, ndx + 1))) {
> System.out.println("ERROR Failed to match on " + test.substring(ndx, ndx + 1));
> } else {
> System.out.println(" OK match on " + test.substring(ndx, ndx + 1));
> }
> }
> }
> }
>
> ouputs
>
> OK match on A
> OK match on B
> OK match on C
> ERROR Failed to match on D
> OK match on E
> OK match on F
> OK match on G
>
> It should match on the D case.
>
> If I use jakarta-regexp-1.5.jar instead of the Xalan jar it works correctly.
>
> OK match on A
> OK match on B
> OK match on C
> OK match on D
> OK match on E
> OK match on F
> OK match on G
>
>
> Is this the correct list to report this issue?
>
Re: Source of regular expression jar in Xalan 2.7.3 RC9
Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
Please file an issue about this in Jira, ideally with a reference to
the canonical regular expression spec we should be using here.
On Tue, Jan 31, 2023 at 12:13 PM Jared Davis
<ja...@davisprogramming.com> wrote:
>
> Hi,
>
> I've noticed an error in the regular expression jar that is included with Xalan 2.7.3 RC9.
>
> import org.apache.regexp.RE;
> public class ReBroken {
> public static void main(String[] args) throws Exception {
> RE re = new RE("a[A-CDE-G]");
> String test = "ABCDEFG";
> for (int ndx=0; ndx < test.length();ndx++) {
> if (!re.match("a" + test.substring(ndx, ndx + 1))) {
> System.out.println("ERROR Failed to match on " + test.substring(ndx, ndx + 1));
> } else {
> System.out.println(" OK match on " + test.substring(ndx, ndx + 1));
> }
> }
> }
> }
>
> ouputs
>
> OK match on A
> OK match on B
> OK match on C
> ERROR Failed to match on D
> OK match on E
> OK match on F
> OK match on G
>
> It should match on the D case.
>
> If I use jakarta-regexp-1.5.jar instead of the Xalan jar it works correctly.
>
> OK match on A
> OK match on B
> OK match on C
> OK match on D
> OK match on E
> OK match on F
> OK match on G
>
>
> Is this the correct list to report this issue?
>
--
Elliotte Rusty Harold
elharo@ibiblio.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xalan.apache.org
For additional commands, e-mail: dev-help@xalan.apache.org