Project

Profile

Help

Bug #5916 ยป is absent_ - 2023-03-12T18_27_59Z.eml

John Lumley, 2023-03-12 19:27

 
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 kKFsFp8ZDmT8WgAAJzdhvw
for <dropbox@plan.io>; Sun, 12 Mar 2023 19:27:43 +0100
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,DMARC_NONE,
HTML_MESSAGE,MIME_QP_LONG_LINE,SPF_HELO_NONE,SPF_PASS autolearn=no
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.1 DMARC_NONE DMARC record not found
* -0.1 SPF_PASS SPF check passed
* 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
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
Authentication-Results: m.launch.gmbh; spf=pass smtp.mailfrom=john@saxonica.com
Authentication-Results: m.launch.gmbh; dkim=none; dkim-atps=neutral
Received: from saxonica.positive-dedicated.net (saxonica.positive-dedicated.net [185.27.21.106])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by m.launch.gmbh (Postfix) with ESMTPS id 2490A8020D
for <inbox+saxonica+f38e+saxon-js@plan.io>; Sun, 12 Mar 2023 19:27:43 +0100 (CET)
Received: from smtpclient.apple (host86-135-207-6.range86-135.btcentralplus.com [86.135.207.6])
by saxonica.positive-dedicated.net (Postfix) with ESMTPSA id 34BF3203FC
for <inbox+saxonica+f38e+saxon-js@plan.io>; Sun, 12 Mar 2023 18:27:41 +0000 (GMT)
Content-Type: multipart/alternative; boundary=Apple-Mail-C19CD578-173D-439E-B331-9A0219A85877
Content-Transfer-Encoding: 7bit
From: John Lumley <john@saxonica.com>
Mime-Version: 1.0 (1.0)
Subject: Re: [SaxonJS - Bug #5916] Using xsl:merge with xsl:merge-source for-each-source="'input1.xml'" select="some-xpath" gives error XPDY0002 "Focus for / is absent"
Date: Sun, 12 Mar 2023 18:27:40 +0000
Message-Id: <471D38FE-6D03-4D0F-BF65-692980C835EC@saxonica.com>
References: <redmine.journal-23220.20230312182110.223@plan.io>
In-Reply-To: <redmine.journal-23220.20230312182110.223@plan.io>
To: Saxonica Developer Community <inbox+saxonica+f38e+saxon-js@plan.io>
X-Mailer: iPad Mail (19H307)


--Apple-Mail-C19CD578-173D-439E-B331-9A0219A85877
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

Could be an interesting problem to make it asynchronous=E2=80=A6..

Sent from my iPad

> On 12 Mar 2023, at 18:21, Saxonica Developer Community <notifications@plan=
.io> wrote:
>=20
> =EF=BB=BF
> --- In your reply, please do not write below this line ---
>=20
> Issue #5916 has been updated by Norm Tovey-Walsh.
> I can't say off the top of my head, but creating this bug has no doubt imp=
roved the chances!
>=20
> Bug #5916: Using xsl:merge with xsl:merge-source for-each-source=3D"'input=
1.xml'" select=3D"some-xpath" gives error XPDY0002 "Focus for / is absent" O=
PEN
> Author: Martin Honnen
> Status: New
> Priority: Normal
> Category: XSLT Conformance
> Sprint/Milestone: SaxonJS 2.5
> Start date: 2023-03-12
> Applies to JS Branch: 2
> Company:
> Contact person:
> Additional contact persons:
> I have tried to run an XSLT 3 example using XSLT 3's new xsl:merge through=
SaxonJS 2.5's xslt3 command line tool under Windows 11 with Node 16, a simp=
le example using e.g.
>=20
> <xsl:template name=3D"xsl:initial-template">
> <list>
> <xsl:merge>
> <xsl:merge-source name=3D"master" for-each-source=3D"'input1.x=
ml'" sort-before-merge=3D"yes" select=3D"/list/item">
> <xsl:merge-key select=3D"@id" order=3D"ascending"/>
> </xsl:merge-source>
> gives an error
>=20
> Transformation failure: Error XPDY0002 at sheet1.xsl#7
> Focus for / is absent
> Error XPDY0002 at sheet1.xsl#7
> Focus for / is absent
> The code runs fine through Saxon HE 11.5 Java.
>=20
> Full files attached; command line xslt3 -t -it -xsl:sheet1.xsl gives outpu=
t
>=20
> SaxonJS 2.5 from Saxonica
> Node.js version v16.17.1
> Compiling stylesheet C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by=
-example\nested-merge\sheet1.xsl
> Stylesheet compilation time: 0.342s
> Initial template: Q{http://www.w3.org/1999/XSL/Transform}initial-template
> Asynchronous transform with options: stylesheetText=3D{"N":"package","vers=
ion":"30",(string), stylesheetBaseURI=3Dfile://C:/Users/marti/OneDrive(strin=
g), stylesheetParams=3D[object Object](string), outputProperties=3D[object O=
bject](string), extraOptions=3D[object Object](string), destination=3Dstdout=
(string), baseOutputURI=3Dfile://C:/Users/marti/OneDrive(string), logLevel=3D=
2(string), initialTemplate=3DQ{http://www.w3.org/1999/XSL/T(string),
> SEF generated by SaxonJS 2.5 at 2023-03-12T13:32:13.485+01:00
> Transformation failure: Error XPDY0002 at sheet1.xsl#7
> Focus for / is absent
> Error XPDY0002 at sheet1.xsl#7
> Focus for / is absent
> Files
> input1.xml (269 Bytes)
> input2.xml (225 Bytes)
> sheet1.xsl (3.18 KB)
> 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
>=20

--Apple-Mail-C19CD578-173D-439E-B331-9A0219A85877
Content-Type: multipart/mixed;
boundary=Apple-Mail-1BC3DF2E-A190-4978-B3C9-A9102BF6D8E9
Content-Transfer-Encoding: 7bit


--Apple-Mail-1BC3DF2E-A190-4978-B3C9-A9102BF6D8E9
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">Could be an interesting problem to make it a=
synchronous=E2=80=A6..<br><br><div dir=3D"ltr">Sent from my iPad</div><div d=
ir=3D"ltr"><br><blockquote type=3D"cite">On 12 Mar 2023, at 18:21, Saxonica D=
eveloper Community &lt;notifications@plan.io&gt; wrote:<br><br></blockquote>=
</div><blockquote type=3D"cite"><div dir=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: rgb(0, 136, 183); }
a:visited { color: rgb(0, 136, 183); }
a:hover { color: rgb(0, 136, 183); }
a:active { color: rgb(0, 136, 183); }</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/5916?pn=
=3D1#change-23220" style=3D"color:#0088b7">#5916</a> has been updated by Nor=
m Tovey-Walsh.
<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>I can't say off the top of my head, but creating this bug has no doubt im=
proved the chances!</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 href=3D"https://saxonica.plan.io/issues/5916?pn=3D1#change-23220" style=
=3D"color:#0088b7;text-decoration:none">Bug #5916: Using xsl:merge with xsl:=
merge-source for-each-source=3D"'input1.xml'" select=3D"some-xpath" gives er=
ror XPDY0002 "Focus for / is absent"</a>
<span class=3D"badge badge-status-open" style=3D"position:relative;font-we=
ight:bold;font-size:10px;bottom:2px;padding:1px 3px;margin-right:2px;margin-=
left:2px;border-radius:2px;text-transform:uppercase;text-decoration:none;col=
or:#205D86;border:1px solid #205D86">open</span>
</h1>

<ul class=3D"details" style=3D"color:#959595;margin-bottom:1.5em"><li><stron=
g>Author: </strong>Martin Honnen</li>
<li><strong>Status: </strong>New</li>
<li><strong>Priority: </strong>Normal</li>
<li><strong>Category: </strong>XSLT Conformance</li>
<li><strong>Sprint/Milestone: </strong>SaxonJS 2.5</li>
<li><strong>Start date: </strong>2023-03-12</li>
<li><strong>Applies to JS Branch: </strong>2</li>
<li><strong>Company: </strong></li>
<li><strong>Contact person: </strong></li>
<li><strong>Additional contact persons: </strong></li></ul>

<p>I have tried to run an XSLT 3 example using XSLT 3's new xsl:merge throug=
h SaxonJS 2.5's <code style=3D"font-family:Hack, Consolas, Menlo, &quot;Libe=
ration Mono&quot;, Courier, monospace;font-size:85%;background-color:#ececec=
;word-wrap:break-word;border-radius:3px;padding:0.2em;margin:0">xslt3</code>=
command line tool under Windows 11 with Node 16, a simple example using e.g=
.</p>
<pre style=3D"font-family:Hack, Consolas, Menlo, &quot;Liberation Mono&quot;=
, Courier, monospace;font-size:85%;background-color:#ececec;word-wrap:break-=
word;margin:1em 0;padding:8px;border:none;border-radius:3px;width:auto;overf=
low-x:auto;overflow-y:hidden"><code class=3D"xml syntaxhl" data-language=3D"=
xml" style=3D"font-family:Hack, Consolas, Menlo, &quot;Liberation Mono&quot;=
, Courier, monospace;font-size:85%;background-color:#ececec;word-wrap:break-=
word;border-radius:3px;padding:0.2em;margin:0;padding:0"> <span class=3D"nt=
">&lt;xsl:template</span> <span class=3D"na">name=3D</span><span class=3D"s"=
>"xsl:initial-template"</span><span class=3D"nt">&gt;</span>
<span class=3D"nt">&lt;list&gt;</span>
<span class=3D"nt">&lt;xsl:merge&gt;</span>
<span class=3D"nt">&lt;xsl:merge-source</span> <span class=3D"na=
">name=3D</span><span class=3D"s">"master"</span> <span class=3D"na">for-eac=
h-source=3D</span><span class=3D"s">"'input1.xml'"</span> <span class=3D"na"=
>sort-before-merge=3D</span><span class=3D"s">"yes"</span> <span class=3D"na=
">select=3D</span><span class=3D"s">"/list/item"</span><span class=3D"nt">&g=
t;</span>
<span class=3D"nt">&lt;xsl:merge-key</span> <span class=3D"na=
">select=3D</span><span class=3D"s">"@id"</span> <span class=3D"na">order=3D=
</span><span class=3D"s">"ascending"</span><span class=3D"nt">/&gt;</span>
<span class=3D"nt">&lt;/xsl:merge-source&gt;</span>
</code></pre>
<p>gives an error</p>
<pre style=3D"font-family:Hack, Consolas, Menlo, &quot;Liberation Mono&quot;=
, Courier, monospace;font-size:85%;background-color:#ececec;word-wrap:break-=
word;margin:1em 0;padding:8px;border:none;border-radius:3px;width:auto;overf=
low-x:auto;overflow-y:hidden"><code style=3D"font-family:Hack, Consolas, Men=
lo, &quot;Liberation Mono&quot;, Courier, monospace;font-size:85%;background=
-color:#ececec;word-wrap:break-word;border-radius:3px;padding:0.2em;margin:0=
;padding:0">Transformation failure: Error XPDY0002 at sheet1.xsl#7
Focus for / is absent
Error XPDY0002 at sheet1.xsl#7
Focus for / is absent
</code></pre>
<p>The code runs fine through Saxon HE 11.5 Java.</p>
<p>Full files attached; command line <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">xslt3 -t -it -xsl:sheet1.xsl</code> gives output</p>
<pre style=3D"font-family:Hack, Consolas, Menlo, &quot;Liberation Mono&quot;=
, Courier, monospace;font-size:85%;background-color:#ececec;word-wrap:break-=
word;margin:1em 0;padding:8px;border:none;border-radius:3px;width:auto;overf=
low-x:auto;overflow-y:hidden"><code style=3D"font-family:Hack, Consolas, Men=
lo, &quot;Liberation Mono&quot;, Courier, monospace;font-size:85%;background=
-color:#ececec;word-wrap:break-word;border-radius:3px;padding:0.2em;margin:0=
;padding:0">SaxonJS 2.5 from Saxonica
Node.js version v16.17.1
Compiling stylesheet C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-e=
xample\nested-merge\sheet1.xsl
Stylesheet compilation time: 0.342s
Initial template: Q{http://www.w3.org/1999/XSL/Transform}initial-template
Asynchronous transform with options: stylesheetText=3D{"N":"package","versio=
n":"30",(string), stylesheetBaseURI=3Dfile://C:/Users/marti/OneDrive(string)=
, stylesheetParams=3D[object Object](string), outputProperties=3D[object Obj=
ect](string), extraOptions=3D[object Object](string), destination=3Dstdout(s=
tring), baseOutputURI=3Dfile://C:/Users/marti/OneDrive(string), logLevel=3D2=
(string), initialTemplate=3DQ{http://www.w3.org/1999/XSL/T(string),
SEF generated by SaxonJS 2.5 at 2023-03-12T13:32:13.485+01:00
Transformation failure: Error XPDY0002 at sheet1.xsl#7
Focus for / is absent
Error XPDY0002 at sheet1.xsl#7
Focus for / is absent
</code></pre>

<fieldset class=3D"attachments" style=3D"border:solid #ccc;border-width:1p=
x 0 0 0"><legend>Files</legend>
<a href=3D"https://saxonica.plan.io/attachments/download/63846/input1.xm=
l" style=3D"color:#0088b7">input1.xml</a>
(269 Bytes)<br>
<a href=3D"https://saxonica.plan.io/attachments/download/63847/input2.xm=
l" style=3D"color:#0088b7">input2.xml</a>
(225 Bytes)<br>
<a href=3D"https://saxonica.plan.io/attachments/download/63848/sheet1.xs=
l" style=3D"color:#0088b7">sheet1.xsl</a>
(3.18 KB)<br>
</fieldset>

<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/5=
916?pn=3D1#change-23220"><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=
"></a></td></tr>
</tbody></table>


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

--Apple-Mail-1BC3DF2E-A190-4978-B3C9-A9102BF6D8E9
Content-Type: application/octet-stream;
name=signature.asc;
x-apple-part-url=DC3F0865-4F21-4CB5-A51C-7329ABF6ED45
Content-Disposition: attachment;
filename=signature.asc
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqs9guKelnXMVOAqgfVdarNfNPL4FAmQOGBcACgkQfVdarNfN
PL6b8A//SO4+3kufRYgMgwbsMIjq1GBuDHw9Gtoo0EXfK19ry9XLUB0CCENIUv3t
lp5B5nuXcU+xRmq/CdhxAJOFIHGxtThKZWDmZHMwhUjWUNiA0i6+cZQSjPKSfNqa
m9PI7ZDJ//EEWhRwHzopzH1PH1hEASNFtjlzOvTUDAHl/bq/Kgsgnh+hDP8fZ1I3
RoaxNBe8E3Vx7nniiZItiF1UdVbT0mcGJb6p5M7RuGXeLirQSWAD0SH1w+N+fW9I
jryIkeF/g2YdcQE98SuGhCQHthaB3IUeKd6w7gHGlXB5j3ayMS2SUKDXrH8HEyYU
AK1aT8rkSmpesJ/l1hF8wngxH3mAmVsrgkC18IGlGV7QBlBoM6h8XwultrrI8Y6J
C1UW2o0AjN4ljjiFa0S0zUxVSAE+X6JqJB69BmgKeTxHluakQMfQFXTgIGCxL4Rl
1NCVgJvQsBIGICxExxXNWoHZtWCr5nhSRb3+BGnZvl1+gfGeMZiaIVPIAE5HwP4V
ItapJkQSnm88ymEqWTdv9w32NfypoppCyFhvlorQ2DQ9G5VGdkh5yELuEICHUXYB
PPIo9pYronAO0Bhs0VViQANiNjpZUDLofgEOWs/DcYDcks0aoBsCdNiwZ/1JJCG1
n65ga7psJbCCN9T8Mk3odHN3txpxlcIKZpX+9o5lKI4ufwg5K28=
=kPck
-----END PGP SIGNATURE-----

--Apple-Mail-1BC3DF2E-A190-4978-B3C9-A9102BF6D8E9
Content-Type: text/html;
charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body dir="auto"><blockquote type="cite"><div dir="ltr"></div></blockquote></body></html>
--Apple-Mail-1BC3DF2E-A190-4978-B3C9-A9102BF6D8E9--

--Apple-Mail-C19CD578-173D-439E-B331-9A0219A85877--
    (1-1/1)