Project

Profile

Help

Support #4700 ยป Re_ [Saxon-JS - Bug #4700] Having severe Saxon-JS errors - 2020-09-01T16_04_32Z.eml

John Lumley, 2020-09-01 18:04

 
X-He-Spam-Score: -1.9
Return-Path: <john@saxonica.com>
Delivered-To: dropbox@plan.io
Received: from m.launch.gmbh ([127.0.0.1])
by m.launch.gmbh with LMTP id GM0rNfxwTl+iHgAAJzdhvw
for <dropbox@plan.io>; Tue, 01 Sep 2020 18:04:12 +0200
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on m.launch.gmbh
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,
MIME_QP_LONG_LINE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE
autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Report:
* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
* [score: 0.0000]
* 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3)
* [94.136.40.146 listed in wl.mailspike.net]
* 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
* 0.0 HTML_MESSAGE BODY: HTML included in message
* 0.0 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76
* chars
* 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
X-Spam-Score: -1.9
Envelope-to: inbox+saxonica+f38e+saxon-js@plan.io
Authentication-Results: m.launch.gmbh; dmarc=none (p=none dis=none) header.from=saxonica.com
Received: from mailex.mailcore.me (mailex.mailcore.me [94.136.40.146])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by m.launch.gmbh (Postfix) with ESMTPS id BB60F89C09
for <inbox+saxonica+f38e+saxon-js@plan.io>; Tue, 1 Sep 2020 18:04:12 +0200 (CEST)
Received: from host109-154-37-75.range109-154.btcentralplus.com ([109.154.37.75] helo=[192.168.1.118])
by smtp03.mailcore.me with esmtpa (Exim 4.92.3)
(envelope-from <john@saxonica.com>)
id 1kD8lX-0008Qi-3P
for inbox+saxonica+f38e+saxon-js@plan.io; Tue, 01 Sep 2020 17:04:12 +0100
Content-Type: multipart/alternative; boundary=Apple-Mail-B6121391-234A-4DAE-BC54-B3B4AC005D5A
Content-Transfer-Encoding: 7bit
From: John Lumley <john@saxonica.com>
Mime-Version: 1.0 (1.0)
Subject: Re: [Saxon-JS - Bug #4700] Having severe Saxon-JS errors
Date: Tue, 1 Sep 2020 17:04:09 +0100
Message-Id: <D46BC00F-5EFC-40C7-A014-203F381453DD@saxonica.com>
References: <redmine.journal-16146.20200901135007.de1637b6be444204@plan.io>
In-Reply-To: <redmine.journal-16146.20200901135007.de1637b6be444204@plan.io>
To: Saxonica Developer Community <inbox+saxonica+f38e+saxon-js@plan.io>
X-Mailer: iPad Mail (17G80)
X-Mailcore-Auth: 439400283
X-Mailcore-Domain: 1881035


--Apple-Mail-B6121391-234A-4DAE-BC54-B3B4AC005D5A
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

Are you perhaps using PowerShell? In such cases PowerShell preparses the arg=
uments/options, whereas xslt3 expects to do its own parsing, so quoting is n=
eeded. I thought I=E2=80=99d documented this somewhere but can=E2=80=99t fin=
d at present.

John Lumley
Sent from my iPad

> On 1 Sep 2020, at 14:50, Saxonica Developer Community <notifications@plan.=
io> wrote:
>=20
> =EF=BB=BF
> --- In your reply, please do not write below this line ---
>=20
> Issue #4700 has been updated by Michael Kay.
> Looking more closely at the actual error messages, and the corresponding c=
ode paths, we see both
>=20
> Command line option -xsl requires a value
>=20
> and
>=20
> Invalid command line input: test.xsl
>=20
> This suggests to me that the input -xsl:test.xsl has somehow reached Saxon=
as two separate arguments, -xsl and test.xsl. So perhaps the command line i=
nput is somehow being mangled before it reaches Saxon?
>=20
> Bug #4700: Having severe Saxon-JS errors
> Author: Kurt Cagle
> Status: New
> Priority: High
> Assignee:
> Category:
> Sprint/Milestone:
> Applies to JS Branch: 2.0
> Fix Committed on JS Branch:
> Fixed in JS Release:
> SEF Generated with:
> Company:
> Contact person:
> Additional contact persons:
> I had no problem with Saxon-JS until I upgraded to Node 14.8.0. I was able=
to use the xslt3 CLI tool to both generate SEFs and process XSLT directly. H=
owever, after reinstalling Saxon-JS I started getting the following errors:
>=20
> PS E:\Code\FBI\stor223\stor223-dev\NIEM-GJXDM\xslt> xslt3 -xsl:test.xsl -e=
xport:test.sef.json -nogo Error: Command line option -xsl requires a value a=
t d (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:5:297) a=
t C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:6:317 at Ar=
ray.forEach () at f.setActualOptions (C:\Users\kurtc\AppData\Roaming\npm\nod=
e_modules\xslt3\xslt3.js:5:449) at main$$module$temp$js$source$nodeJS$comman=
d (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:33:197) at=
Object. (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:41:=
201) at Object. (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3=
.js:41:383) at Module._compile (internal/modules/cjs/loader.js:1251:30) at O=
bject.Module._extensions..js (internal/modules/cjs/loader.js:1272:10) at Fun=
ction.Module._load (internal/modules/cjs/loader.js:962:14) at Function.execu=
teUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) Invalid c=
ommand line input: test.xsl Usage: see http://www.saxonica.com/saxon-js/docu=
mentation/index.html#!nodejs/command-line Options available: -?, -co, -debug=
, -export, -im, -it, -master, -nogo, -ns, -o, -s, -t, -tp, -xsl Use -XYZ:? f=
or details of option XYZ Params: param=3Dvalue Set stylesheet string paramet=
er +param=3Dfilename Set stylesheet document parameter ?param=3Dexpression S=
et stylesheet parameter using XPath !param=3Dvalue Set serialization paramet=
er (bindings and values containing punctuation may need to be quoted in some=
command shells, e.g. in PowerShell: "{NS}key=3Dval" ?range=3D"1 to 20" ) Us=
age: see http://www.saxonica.com/saxon-js/documentation/index.html#!nodejs/c=
ommand-line Options available: -?, -co, -debug, -export, -im, -it, -master, -=
nogo, -ns, -o, -s, -t, -tp, -xsl Params: param=3Dvalue Set stylesheet string=
parameter +param=3Dfilename Set stylesheet document parameter !param=3Dvalu=
e Set serialization parameter (bindings and values containing punctuation ma=
y need to be quoted in some command shells, e.g. in PowerShell: "{NS}key=3Dv=
al" ?range=3D"1 to 20" ) Missing '=3D' in parameter 'test.xsl' Internal erro=
r: bad input to string constructor #undefined Error at Object.a [as internal=
Error] (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\node_modules\s=
axon-js\SaxonJS2N.js:26:474) at new v (C:\Users\kurtc\AppData\Roaming\npm\no=
de_modules\xslt3\node_modules\saxon-js\SaxonJS2N.js:47:429) at Object.fromSt=
ring (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\node_modules\sax=
on-js\SaxonJS2N.js:77:356) at C:\Users\kurtc\AppData\Roaming\npm\node_module=
s\xslt3\xslt3.js:16:228 at getParams$$module$temp$js$source$nodeJS$command (=
C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:15:132) at ma=
in$$module$temp$js$source$nodeJS$command (C:\Users\kurtc\AppData\Roaming\npm=
\node_modules\xslt3\xslt3.js:34:7) at Object. (C:\Users\kurtc\AppData\Roamin=
g\npm\node_modules\xslt3\xslt3.js:41:201) at Object. (C:\Users\kurtc\AppData=
\Roaming\npm\node_modules\xslt3\xslt3.js:41:383) at Module._compile (interna=
l/modules/cjs/loader.js:1251:30) at Object.Module._extensions..js (internal/=
modules/cjs/loader.js:1272:10) at Module.load (internal/modules/cjs/loader.j=
s:1100:32) at Function.Module._load (internal/modules/cjs/loader.js:962:14) a=
t Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:=
72:12) at internal/main/run_main_module.js:17:47 Error SXJS0004
>=20
> I have tried with multiple variations of command line arguments and have b=
een getting errors consistently if I attempt to actually run XSLT3 with para=
meters.
>=20
> I have also discovered that I cannot get Oxygen 22.0 to build SEF.JSON fil=
es, though it generates the intermediate SEF.XML files. I had similar issues=
across both Windows and Ubuntu.
>=20
> I'm hoping to use saxonjs in a production system soon for a US government p=
roject so this is causing issues.
>=20
> You have received this notification because you have either subscribed to o=
r are involved in a project on Saxonica Developer Community site. To change y=
our notification preferences, please click here: https://saxonica.plan.io/my=
/account?tour=3Dmail_preferences
>=20
>=20
> This notification was cheerfully delivered by

--Apple-Mail-B6121391-234A-4DAE-BC54-B3B4AC005D5A
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">Are you perhaps using PowerShell? In such c=
ases PowerShell preparses the arguments/options, whereas xslt3 expects to do=
its own parsing, so quoting is needed. I thought I=E2=80=99d documented thi=
s somewhere but can=E2=80=99t find at present.<br><br>John Lumley<br><div di=
r=3D"ltr">Sent from my iPad</div><div dir=3D"ltr"><br><blockquote type=3D"ci=
te">On 1 Sep 2020, at 14:50, Saxonica Developer Community &lt;notifications@=
plan.io&gt; wrote:<br><br></blockquote></div><blockquote type=3D"cite"><div d=
ir=3D"ltr">=EF=BB=BF


<!--[if !mso]><!-- -->
<link href=3D"https://assets.plan.io/stylesheets/fonts.css" rel=3D"styleshee=
t" type=3D"text/css">
<!--<![endif]-->

<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8"><st=
yle>a:link{color:#0088b7}
a:visited{color:#0088b7}
a:hover{color:#0088b7}
a:active{color:#0088b7}</style>

<table class=3D"planio_mail" width=3D"100%" cellspacing=3D"0" cellpadding=3D=
"0" style=3D"border-collapse:collapse;margin-bottom:1em;border:1px solid #bb=
b;padding:4px;border-spacing:0;margin-bottom:0;width:100%;border:none;paddin=
g:0">
<tbody><tr><td class=3D"planio_mail header" style=3D"border:1px solid #bbb;p=
adding:4px;text-align:center;width:100%;font-family:MarketWeb, Helvetica, Ar=
ial, sans-serif;font-size:0.8em;color:#D7D7D7;border:none;padding:0"><p>--- I=
n your reply, please do not write below this line ---</p></td></tr>
<tr><td class=3D"planio_mail" style=3D"border:1px solid #bbb;padding:4px;bor=
der:none;padding:0">Issue <a href=3D"https://saxonica.plan.io/issues/4700?pn=
=3D1#change-16146" style=3D"color:#0088b7">#4700</a> has been updated by Mic=
hael Kay.
<hr style=3D"width:100%;height:1px;background:#ccc;border:0;margin:1.2em 0">=


<ul class=3D"journal details" style=3D"color:#959595;margin-bottom:1.5em">
</ul>

<p>Looking more closely at the actual error messages, and the corresponding c=
ode paths, we see both</p>
<p><em>Command line option -xsl requires a value</em></p>
<p>and</p>
<p><em>Invalid command line input: test.xsl</em></p>
<p>This suggests to me that the input <code style=3D"font-family:Hack, Conso=
las, Menlo, &quot;Liberation Mono&quot;, Courier, monospace;font-size:85%;ba=
ckground-color:#ececec;word-wrap:break-word;border-radius:3px;padding:0.2em;=
margin:0">-xsl:test.xsl</code> has somehow reached Saxon as two separate arg=
uments, <code style=3D"font-family:Hack, Consolas, Menlo, &quot;Liberation M=
ono&quot;, Courier, monospace;font-size:85%;background-color:#ececec;word-wr=
ap:break-word;border-radius:3px;padding:0.2em;margin:0">-xsl</code> and <cod=
e style=3D"font-family:Hack, Consolas, Menlo, &quot;Liberation Mono&quot;, C=
ourier, monospace;font-size:85%;background-color:#ececec;word-wrap:break-wor=
d;border-radius:3px;padding:0.2em;margin:0">test.xsl</code>. So perhaps the c=
ommand line input is somehow being mangled before it reaches Saxon?</p>
<hr style=3D"width:100%;height:1px;background:#ccc;border:0;margin:1.2em 0">=

<h1 style=3D"font-family:&quot;ProximaNova-Bold&quot;, Helvetica, Arial, san=
s-serif;font-weight:normal;margin:0px;font-size:1.3em;line-height:1.4em"><a h=
ref=3D"https://saxonica.plan.io/issues/4700?pn=3D1#change-16146" style=3D"co=
lor:#0088b7;text-decoration:none">Bug #4700: Having severe Saxon-JS errors</=
a></h1>

<ul class=3D"details" style=3D"color:#959595;margin-bottom:1.5em"><li><stron=
g>Author: </strong>Kurt Cagle</li>
<li><strong>Status: </strong>New</li>
<li><strong>Priority: </strong>High</li>
<li><strong>Assignee: </strong></li>
<li><strong>Category: </strong></li>
<li><strong>Sprint/Milestone: </strong></li>
<li><strong>Applies to JS Branch: </strong>2.0</li>
<li><strong>Fix Committed on JS Branch: </strong></li>
<li><strong>Fixed in JS Release: </strong></li>
<li><strong>SEF Generated with: </strong></li>
<li><strong>Company: </strong></li>
<li><strong>Contact person: </strong></li>
<li><strong>Additional contact persons: </strong></li></ul>

<p>I had no problem with Saxon-JS until I upgraded to Node 14.8.0. I was abl=
e to use the xslt3 CLI tool to both generate SEFs and process XSLT directly.=
However, after reinstalling Saxon-JS I started getting the following errors=
:</p>
<p>PS E:\Code\FBI\stor223\stor223-dev\NIEM-GJXDM\xslt&gt; xslt3 -xsl:test.xs=
l -export:test.sef.json -nogo
Error: Command line option -xsl requires a value
at d (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:5:297)
at C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:6:317
at Array.forEach ()
at f.setActualOptions (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3=
\xslt3.js:5:449)
at main$$module$temp$js$source$nodeJS$command (C:\Users\kurtc\AppData\Roamin=
g\npm\node_modules\xslt3\xslt3.js:33:197)
at Object. (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:4=
1:201)
at Object. (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:4=
1:383)
at Module._compile (internal/modules/cjs/loader.js:1251:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
at Function.Module._load (internal/modules/cjs/loader.js:962:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js=
:72:12)
Invalid command line input: test.xsl
Usage: see <a href=3D"http://www.saxonica.com/saxon-js/documentation/index.h=
tml#!nodejs/command-line" class=3D"external" style=3D"color:#0088b7">http://=
www.saxonica.com/saxon-js/documentation/index.html#!nodejs/command-line</a>
Options available: -?, -co, -debug, -export, -im, -it, -master, -nogo, -ns, -=
o, -s, -t, -tp, -xsl
Use -XYZ:? for details of option XYZ
Params:
param=3Dvalue Set stylesheet string parameter
+param=3Dfilename Set stylesheet document parameter
?param=3Dexpression Set stylesheet parameter using XPath
!param=3Dvalue Set serialization parameter
(bindings and values containing punctuation may need to be quoted in some co=
mmand shells,
e.g. in PowerShell: "{NS}key=3Dval" ?range=3D"1 to 20" )
Usage: see <a href=3D"http://www.saxonica.com/saxon-js/documentation/index.h=
tml#!nodejs/command-line" class=3D"external" style=3D"color:#0088b7">http://=
www.saxonica.com/saxon-js/documentation/index.html#!nodejs/command-line</a>
Options available: -?, -co, -debug, -export, -im, -it, -master, -nogo, -ns, -=
o, -s, -t, -tp, -xsl
Params:
param=3Dvalue Set stylesheet string parameter
+param=3Dfilename Set stylesheet document parameter
!param=3Dvalue Set serialization parameter
(bindings and values containing punctuation may need to be quoted in some co=
mmand shells,
e.g. in PowerShell: "{NS}key=3Dval" ?range=3D"1 to 20" )
Missing '=3D' in parameter 'test.xsl'
Internal error: bad input to string constructor #undefined
Error
at Object.a [as internalError] (C:\Users\kurtc\AppData\Roaming\npm\node_modu=
les\xslt3\node_modules\saxon-js\SaxonJS2N.js:26:474)
at new v (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\node_modules=
\saxon-js\SaxonJS2N.js:47:429)
at Object.fromString (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\=
node_modules\saxon-js\SaxonJS2N.js:77:356)
at C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:16:228
at getParams$$module$temp$js$source$nodeJS$command (C:\Users\kurtc\AppData\R=
oaming\npm\node_modules\xslt3\xslt3.js:15:132)
at main$$module$temp$js$source$nodeJS$command (C:\Users\kurtc\AppData\Roamin=
g\npm\node_modules\xslt3\xslt3.js:34:7)
at Object. (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:4=
1:201)
at Object. (C:\Users\kurtc\AppData\Roaming\npm\node_modules\xslt3\xslt3.js:4=
1:383)
at Module._compile (internal/modules/cjs/loader.js:1251:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
at Module.load (internal/modules/cjs/loader.js:1100:32)
at Function.Module._load (internal/modules/cjs/loader.js:962:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js=
:72:12)
at internal/main/run_main_module.js:17:47
Error SXJS0004</p>
<p>I have tried with multiple variations of command line arguments and have b=
een getting errors consistently if I attempt to actually run XSLT3 with para=
meters.</p>
<p>I have also discovered that I cannot get Oxygen 22.0 to build SEF.JSON fi=
les, though it generates the intermediate SEF.XML files. I had similar issue=
s across both Windows and Ubuntu.</p>
<p>I'm hoping to use saxonjs in a production system soon for a US government=
project so this is causing issues.</p>


<div itemscope=3D"itemscope" itemtype=3D"http://schema.org/EmailMessage"><di=
v itemscope=3D"itemscope" itemprop=3D"action" itemtype=3D"http://schema.org/=
ViewAction"><link itemprop=3D"url" href=3D"https://saxonica.plan.io/issues/4=
700?pn=3D1#change-16146"><meta itemprop=3D"name" content=3D"View Issue"></di=
v><meta itemprop=3D"description" content=3D"View this issue update on Planio=
"></div>

</td></tr>
<tr><td class=3D"planio_mail footer" style=3D"border:1px solid #bbb;padding:=
4px;font-size:0.8em;width:100%;border:none;padding:0"><hr style=3D"width:100=
%;height:1px;background:#ccc;border:0;margin:1.2em 0"><p>You have received t=
his notification because you have either subscribed to or are involved in a p=
roject on Saxonica Developer Community site.
To change your notification preferences, please click here: <a href=3D"https=
://saxonica.plan.io/my/account?tour=3Dmail_preferences" class=3D"external" s=
tyle=3D"color:#0088b7">https://saxonica.plan.io/my/account?tour=3Dmail_prefe=
rences</a></p></td></tr>
<tr><td class=3D"planio_mail planio_footer" style=3D"border:1px solid #bbb;p=
adding:4px;text-align:center;width:100%;font-family:MarketWeb, Helvetica, Ar=
ial, sans-serif;font-size:1.2em;color:#D7D7D7;border:none;padding:0"><br><di=
v><a href=3D"https://plan.io/" style=3D"color:#0088b7;color:#D7D7D7;text-dec=
oration:none">This notification was cheerfully delivered by</a></div></td></=
tr>
<tr><td class=3D"planio_mail planio_footer_logo" style=3D"border:1px solid #=
bbb;padding:4px;text-align:center;width:100%;border:none;padding:0"><a href=3D=
"https://plan.io/" title=3D"Planio" style=3D"color:#0088b7"><img src=3D"http=
s://assets.plan.io/images/planio_logo_gray_204x50.png" height=3D"25" width=3D=
"102" border=3D"0" alt=3D"Planio" style=3D"vertical-align:middle;border:none=
" data-unique-identifier=3D""></a></td></tr>
</tbody></table>


</div></blockquote></body></html>=

--Apple-Mail-B6121391-234A-4DAE-BC54-B3B4AC005D5A--
    (1-1/1)