Regex, Mac OS X VM differences and a console message

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Regex, Mac OS X VM differences and a console message

Christian Roth-4
[Saxon 8.7]

Hi,

the essential problem I am confronted with is:

A transformation (making use of XSLT regular expressions) works
flawlessly when run under the Apple 1.5.0 JVM, but fails with a "Too
many nested apply-templates calls. The stylesheet may be looping." error
when run under Apple's 1.4.2 JVM.

Of course I don't expect Michael Kay to debug Apple's 1.4.2 JVM. But I
noticed the following console output in the failing JVM 1.4.2 case:

Input regex: data="(.*?)"
Output regex: data="((?:.|[\ud800-\udbff][\udc00-\udfff])*?)"
Input regex: "
Output regex: "
Input regex: >
Output regex: >
Input regex: <
Output regex: <

Is this output from Saxon? If so, can the circumstances be described in
which case this output might be generated? I'm just hoping to gain some
more info on this issue so that I may be able to create a reproducible,
but smaller testcase I can file with Apple against their JVM.

Running under the Sun JVM 1.4.2 under Windows, this problem does not
occur, so this really seems to be a Mac OS X JVM implementation issue only.

Thanks,
Christian




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: Regex, Mac OS X VM differences and a console message

Michael Kay
The console messages are the result of a build error: I've already logged
this as a bug. They occur only with JDK 1.4. Saxon (from 8.7) has different
paths here for JDK 1.4 and JDK 1.5 - but the JDK 1.4 code is largely what
was there before so there shouldn't be new problems in this case. (Ideally I
should actually find a way of switching these messages on at run-time, as
they can be quite useful in diagnosing regex problems.)

The "Too many apply-templates calls" is a bad attempt at diagnosing the
reasons for a stack overflow. I either need to improve the guesswork or
produce a more general error message.

It does look as if you've hit a JVM problem. It could be regex-related, or
that could be a red herring.

If the diagnostics hadn't been left switched on, incidentally, you could
still find out how Saxon is translating XPath regular expressions into JDK
1.4 regular expressions by running

java net.sf.saxon.regex.JDK14RegexTranslator your-xpath-regex xpath

(the other value for the second argument is "schema", because XML Schema
supports a slightly different regex dialect).

You might find some of my ramblings at
http://saxonica.blogharbor.com/blog/_archives/2006/2/3/1743544.html give
useful background.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Christian Roth
> Sent: 02 March 2006 14:21
> To: Saxon-Help Mailing List
> Subject: [saxon] Regex, Mac OS X VM differences and a console message
>
> [Saxon 8.7]
>
> Hi,
>
> the essential problem I am confronted with is:
>
> A transformation (making use of XSLT regular expressions) works
> flawlessly when run under the Apple 1.5.0 JVM, but fails with a "Too
> many nested apply-templates calls. The stylesheet may be
> looping." error
> when run under Apple's 1.4.2 JVM.
>
> Of course I don't expect Michael Kay to debug Apple's 1.4.2 JVM. But I
> noticed the following console output in the failing JVM 1.4.2 case:
>
> Input regex: data="(.*?)"
> Output regex: data="((?:.|[\ud800-\udbff][\udc00-\udfff])*?)"
> Input regex: "
> Output regex: "
> Input regex: >
> Output regex: >
> Input regex: <
> Output regex: <
>
> Is this output from Saxon? If so, can the circumstances be
> described in
> which case this output might be generated? I'm just hoping to
> gain some
> more info on this issue so that I may be able to create a
> reproducible,
> but smaller testcase I can file with Apple against their JVM.
>
> Running under the Sun JVM 1.4.2 under Windows, this problem does not
> occur, so this really seems to be a Mac OS X JVM
> implementation issue only.
>
> Thanks,
> Christian
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking
> scripting language
> that extends applications into web and mobile media. Attend
> the live webcast
> and join the prime developer group breaking into this new
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&
> dat=121642
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help