Project

Profile

Help

Re_ [SaxonC - Bug #5562] strange error when calling transform_to_file in a loop - 2022-06-16T16_43_17Z.eml

Lou Burnard, 2022-06-16 18:43

 
X-He-Spam-Score: -1.9
Return-Path: <lou.burnard@retired.ox.ac.uk>
Delivered-To: dropbox@plan.io
Received: from m.launch.gmbh ([127.0.0.1])
by m.launch.gmbh with LMTP id OOWfOJBdq2JgCAAAJzdhvw
for <dropbox@plan.io>; Thu, 16 Jun 2022 18:42:56 +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,DMARC_NONE,
HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,
T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no
version=3.4.2
X-Spam-Report:
* 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was
* blocked. See
* http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
* for more information.
* [URIs: plan.io]
* -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at
* https://www.dnswl.org/, no trust
* [129.67.1.170 listed in list.dnswl.org]
* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
* [score: 0.0000]
* -0.1 SPF_PASS SPF check passed
* 0.1 DMARC_NONE DMARC record not found
* 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
* 0.0 HTML_MESSAGE BODY: HTML included in message
* -0.0 T_SCC_BODY_TEXT_LINE No description available.
X-Spam-Score: -1.9
Envelope-to: inbox+saxonica+f38e+saxon-c@plan.io
Authentication-Results: m.launch.gmbh; dmarc=none (p=none dis=none) header.from=retired.ox.ac.uk
Authentication-Results: m.launch.gmbh; spf=pass smtp.mailfrom=lou.burnard@retired.ox.ac.uk
Authentication-Results: m.launch.gmbh; dkim=none; dkim-atps=neutral
Received: from relay19.mail.ox.ac.uk (relay19.mail.ox.ac.uk [129.67.1.170])
(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 B6BA5802F5
for <inbox+saxonica+f38e+saxon-c@plan.io>; Thu, 16 Jun 2022 18:42:56 +0200 (CEST)
Received: from hub05.nexus.ox.ac.uk ([163.1.154.231] helo=Hub05.ad.oak.ox.ac.uk)
by relay19.mail.ox.ac.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256)
(Exim 4.92)
(envelope-from <lou.burnard@retired.ox.ac.uk>)
id 1o1sa7-0000Aa-C1
for inbox+saxonica+f38e+saxon-c@plan.io; Thu, 16 Jun 2022 17:42:55 +0100
Received: from GBR01-CWL-obe.outbound.protection.outlook.com (104.47.20.57) by
smtp.nexus.ox.ac.uk (163.1.154.231) with Microsoft SMTP Server (TLS) id
14.3.498.0; Thu, 16 Jun 2022 17:42:55 +0100
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=O288fI0NyJPuWzZhjJXk7l0g65vDd7rxHr8FfA2VqNqGGLNqR8vTdIOrHJTtaZ8r9KBmC98JUiIpbH9x7+QHgI8zipjPmKtqkKNfnJq0mjuKgMwge7jc2+pjDmHtW6PvqMVVHDnMCrmqCFSEs7zofNIxUMFyviKqPAeyTdx3HzqjK6AnDeNZ+IQb2lZqplaP1XxDzzEaLia+j5w/3ciRSm42aKxDH51a10qH5wJtgb7EoTXsUUEp9YRsD1XlSpq22hRPtS4tG9he03NbqZe2oeUmVEFzFboZNM+tA/B6zh3oKeIMHfd9+cZiSsRGlWTqyqdbPR0x/4ADHLod3NMaWw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=FQcNZ/RQ5lisnPV5jtAQOh6xNBwfWSWsdyX+NmXbgeY=;
b=IojLdUq4tSVRH/rwqdYtEQ3bBjm/MYDgTVqr7wPBrwOuDgAOFdcJlyn2IddgWFAKcNSq/Iq+etBh1L9/5niH3QYSGhosMXtVvuU7XL2G1O6ZUmuBpxbS1MCg0Ld1YbaKReUI5m+QkKfuXr4HK/fZYVzNLJqcKyjgmHsGJTJg49H0ehSDRz+j+7HQXEQzgJp8FBOq8BDRqCTvP1pBjaW1+tAESZFVAw7zlyK1VR5evA+pmkY/5AZBLURQyYMwEw6AhXFaLShtG8WNF2j+3IvPU9mGZLcOGk4UYYh3XA/eSRgTwDWkup58BVSoTXwLP4GHKkgKad29ggQjcxI76IoR4g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=retired.ox.ac.uk; dmarc=pass action=none
header.from=retired.ox.ac.uk; dkim=pass header.d=retired.ox.ac.uk; arc=none
Received: from CWXP265MB4107.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:132::8)
by CWXP265MB3911.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:fb::10) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.13; Thu, 16 Jun
2022 16:42:54 +0000
Received: from CWXP265MB4107.GBRP265.PROD.OUTLOOK.COM
([fe80::b825:f366:14f4:a10b]) by CWXP265MB4107.GBRP265.PROD.OUTLOOK.COM
([fe80::b825:f366:14f4:a10b%3]) with mapi id 15.20.5353.015; Thu, 16 Jun 2022
16:42:54 +0000
From: Lou Burnard <lou.burnard@retired.ox.ac.uk>
To: Saxonica Developer Community <inbox+saxonica+f38e+saxon-c@plan.io>
Subject: Re: [SaxonC - Bug #5562] strange error when calling transform_to_file
in a loop
Thread-Topic: [SaxonC - Bug #5562] strange error when calling
transform_to_file in a loop
Thread-Index: AQHYgZ/pyss3J7e270OPx/n3/sJR5g==
Date: Thu, 16 Jun 2022 16:42:54 +0000
Message-ID: <CWXP265MB41079FC7A6209EE1CDD7C73882AC9@CWXP265MB4107.GBRP265.PROD.OUTLOOK.COM>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
suggested_attachment_session_id: e94c3783-415b-eac3-c1ea-d2cb6262639a
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=retired.ox.ac.uk;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 277585c4-f2a8-43a6-1080-08da4fb742e4
x-ms-traffictypediagnostic: CWXP265MB3911:EE_
x-microsoft-antispam-prvs: <CWXP265MB3911D7B0FC6F1611CCD259E182AC9@CWXP265MB3911.GBRP265.PROD.OUTLOOK.COM>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: tY5y5sor9j2KAJvXhDCkWtRaUpZXIUuxgJVyOBoq3F06Ir+1qfSmqnD+kFSgT4YwV5loyHxYMtGa+gzAMvye7aWKrXtux7R7RrFX6XIHd2qERCgb+yp2PuhBNu4AEuJTJT9OEsvXstvt/y+9kOToYQkBgGgPG1q0mnz6wjO+Uov4O/BimW/RNRoJFzp2/szGjuoxcqPDxqb6qGqCrQJcpXt7bX1bTCotpWKyF3m81Kpalf24wR3cuAL1GTOiN0uU5a+vH068TvncG7hndgqJg/gugOqDFa6v2A7wDhG3fJ4FXdOSojl9WrJiZvBtvVuZwcJFGFjhiUSo7RCPXwJ6xHWAVvtGYwyLQavQBYsDNFHJADtvf7BODVR3Po/J6JHaJtnDekSTzQun3kc1qNDRSrAJaVKJaU7GYVGaagU+JkJZBqXmdsrZrTd+FwBxjZsyBp6z4INVBk/Z1A2lHIegAo0hQ3715ETXBpYANJVh9yuBxlNxLKX89OMTbKURHFfhGR4Ho15OGWY0DH75CBgvRqzF76PAcnZVrx1e1yLNE2xoa2dL4LuVRHui+X0nJXEqXP68xbJfdkrEZChTrDQHjJ7lNc7zKUrskGBC9rl8Cg0Ulcs2UPHxbhE1rfzO7rgngM3gr8dpcZ3avjKK/eC+SwQf5+vsnq8q8OWhOZS3NSXZVFBXOAcx2xjt53ZSz6sI0+uH8c3NtHBPqvbiFs8Cs3usN8kXhhYMQ448WkKbukVX7v5AP7eoDOeABSdB9AP2iqjkGltsTkY7ILzDKfiejtXlgNgkpdoO/+T7FsCQvUGLuPd5kiUl9vFqItsXlem5
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWXP265MB4107.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(366004)(33656002)(966005)(316002)(86362001)(786003)(52536014)(8936002)(71200400001)(186003)(9686003)(6506007)(91956017)(166002)(76116006)(38100700002)(122000001)(53546011)(64756008)(508600001)(66476007)(7696005)(8676002)(44832011)(5660300002)(2906002)(66556008)(66446008)(55016003)(83380400001)(19627405001)(66946007)(38070700005)(585924005);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?UCi7jlJ6UfAX5182clVtdEHrvapbH/sr6oglbRfJxb4wyt48VXPkJ+OJtW?=
=?iso-8859-1?Q?5Dg7j2pmWa3XpK5FLIZixQKlk3GXnN6rMfsWVjKr4tYRM1+v5U2T3N5wJq?=
=?iso-8859-1?Q?ERPe645ezLtJ+FEf830WnxwU58+XOg9YJ49Xyn2QXkXdtynNSd411FKL+e?=
=?iso-8859-1?Q?W589sdSWZENHTgukrSgPNrVbnHFaErn4Lo1ZoMAznuMcJwwKioSAh1xok9?=
=?iso-8859-1?Q?kRq6CMo3D0U88eRzHNdIhp69qzp/MLZEVFGyAOqYel/KNVGiTIhqBNzEXV?=
=?iso-8859-1?Q?iOYEg9amq56xYMKFCL2I8qdRyWcjojf3ddmIUmr4lU+8N3BLOKc9reUrRu?=
=?iso-8859-1?Q?SYLhnP7nmAtMDvmidndMZKiBTpRSIJJWrsY+D9aILdWJyIHd4ge0XhmerT?=
=?iso-8859-1?Q?bH0dSzohfBhl9tgGq4/6RZNXWhUqOS5dX/szx6VcitxaumbWwduS7nAvHl?=
=?iso-8859-1?Q?/nwGPYI1EQp7j4lt5+gC6RxuV+WtHGAVYec511evDJQ31hXhAiEUb+MdN8?=
=?iso-8859-1?Q?AqceoMEo7JsGaP4YFOs/25F/6HG948H0K3JtaXEE2frDrzbruwdr6wABP2?=
=?iso-8859-1?Q?PatmmP5t/KCJKSEwyKfNaE0gKvJN17a4YTUNvlMwq+lMTBlpVhJ9tQGYV6?=
=?iso-8859-1?Q?vMdY3XH/rA1ZRg2I3C6FXMlIambUqJoQiY9V4w4yytuNEdYNRyj/54rncE?=
=?iso-8859-1?Q?xFoYkcoXn1QA1K8t9dM0k2XXfnykh2e+i0zyV6Q3HN0oWyB9NfEhRL2Pdr?=
=?iso-8859-1?Q?mEVeT20FoeHt5tAtkvRM4A8T991FDPNzEmt7kw407NUxXwZAeBLkeaNBd0?=
=?iso-8859-1?Q?w3yc0RfazmIu6mraxDoztdHLk0+Ismkd0uyG7O/Cx7zPvecDn8T9pHKWWW?=
=?iso-8859-1?Q?D/kYPwwwRyVDaBbgRkzUCRK6BTwXRPyP7qUJgoN/jE9gcmhFHj/s4jijB/?=
=?iso-8859-1?Q?vpwu687wZ799ysvfdwYznubOEWfvIid/ZrpvuJpoHwTsuxehTixMiOyWfo?=
=?iso-8859-1?Q?U41PuWGbkx/bo7bjvJ1VGDQ5+ZAvmIxa+1c32gZtX8jfRhMJEEBjr9sXop?=
=?iso-8859-1?Q?qXLOxzehwl42I+FW5FgiqHvDQaCdfC/AE0W4I9Oun7skXHXoFT/LoPaDZ0?=
=?iso-8859-1?Q?TMGecq6thOuYIN5D38T858Uvi5opUfAED7769AHZFpaL/7Jz6rM2JIOhGn?=
=?iso-8859-1?Q?NTUjaENwy9c5D/GQl2silbuccYfmbE0zBLJUSo8ukVtez+aGObi7QqhKu6?=
=?iso-8859-1?Q?XKEbLD8y2oFUHPPAC+YjBjAJwA82DfobF8ZODO46EEyRK9/M2BLpkpAsLs?=
=?iso-8859-1?Q?Jhl38N1talRBsG0ekhM0gGUnQ8N8lSuASq9Tnvqr6fdsNr5bPZ24WwA/Kh?=
=?iso-8859-1?Q?chN5LV1IhYeTEAee0LoYR1jlUz82e5cMhvgrb9oILvfFCwaLaWZsqQPGcp?=
=?iso-8859-1?Q?NaI1wVN3LQxRqdmSZ4gkoFG18V2FbVhbQAzpMu/Z+lxt4FJYBK6g1/s/7f?=
=?iso-8859-1?Q?As1m9cnTFgPCxJQUptl0Mj5IsOgDj+iwRrnY6RL93KGb52+jFs6BLuDfpO?=
=?iso-8859-1?Q?Xz1IvvlR8zH7xdifzS396fpJHea40w46lS9NmwbHywImuqTHPVfG3P9w4X?=
=?iso-8859-1?Q?jldRfvitpaBIzzTIbEFhG8w9EDvSm7Rk3e7qviZV2a4KnPnVvuuqQJpd7e?=
=?iso-8859-1?Q?ZDcZu3+9SK6THP1bbJzpUwAcQ48WOkhia2ufxxFOezdTuT0jYDSXGwnI2L?=
=?iso-8859-1?Q?n7Bst7XOuoyyyHp/nmFMwR53eL08+fxwx9VOysYHyULUHLQx5JuAlUL4ZY?=
=?iso-8859-1?Q?uXXcxicYDc3oxDMz8rdRUhoxWUFjoZvkkWJhGD+cneUKiZuG1BS+?=
Content-Type: multipart/alternative;
boundary="_000_CWXP265MB41079FC7A6209EE1CDD7C73882AC9CWXP265MB4107GBRP_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CWXP265MB4107.GBRP265.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 277585c4-f2a8-43a6-1080-08da4fb742e4
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2022 16:42:54.5573
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: cc95de1b-97f5-4f93-b4ba-fe68b852cf91
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: xAD3owv788EKu6BucTkaFXnx3Ll00NwCzIKnxG+ImqXzedr5tv4UBjYR+jFstj5J
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWXP265MB3911
X-OriginatorOrg: retired.ox.ac.uk

--_000_CWXP265MB41079FC7A6209EE1CDD7C73882AC9CWXP265MB4107GBRP_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Sorry I forgot this query. The TEMP variable is explicitly set at the begin=
ning of the stylesheet I copied. It has an anodyne but genuine value like "=
temp.xml" .


________________________________
From: Saxonica Developer Community
Sent: Monday, June 13, 2022 11:19 AM
Subject: [SaxonC - Bug #5562] strange error when calling transform_to_file =
in a loop


--- In your reply, please do not write below this line ---

Issue #5562<https://saxonica.plan.io/issues/5562?pn=3D1#change-20965> has b=
een updated by Martin Honnen.
________________________________

Lou Burnard wrote in #note-6:

It would be nice to know why my original simple-minded attempt did not work=
though

I hope O'Neil investigates that during the week and let's you know.

________________________________
Bug #5562: strange error when calling transform_to_file in a loop<https://s=
axonica.plan.io/issues/5562?pn=3D1#change-20965> open

* Author: Lou Burnard
* Status: New
* Priority: Low
* Start date: 2022-06-11

I need to run a sequence of transforms, one after another, each one operati=
ng on the output of the preceding one. Here's the code I am currently tryin=
g:

with saxonc.PySaxonProcessor(license=3DFalse) as proc:
print(proc.version)
# Initialize the XSLT 3.0. processor
xsltproc =3D proc.new_xslt30_processor()
for i in (0,1,2,3,4) :
print(i)
SCRIPT=3DscriptRoot+"pt"+str(i)+".xsl"
TEMP=3DtempRoot+"temp-"+str(i+1)+".xml"
print("Running "+SCRIPT+" on "+FILE+" producing "+TEMP)
xsltproc.transform_to_file(source_file=3DFILE, stylesheet_file=3DSCR=
IPT, output_file=3DTEMP)
FILE=3DTEMP



First time round the loop this behaves as expected. But then I get an I/O e=
rror on the output file I am trying to create?!

SaxonC-HE 11.3 from Saxonica
0
Running /home/lou/Public/pdf2tei/pt0.xsl on /home/lou/Desktop/LacyWork/outg=
oing/0101Time/temp.xml
producing /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-1.xml
1
Running /home/lou/Public/pdf2tei/pt1.xsl on /home/lou/Desktop/LacyWork/outg=
oing/0101Time/temp/temp-1.xml
producing /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-2.xml
Error
I/O error reported by XML parser processing
/home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-2.xml: No such fil=
e or directory.
Caused by java.io.FileNotFoundException: No such file or directory


________________________________

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=
your notification preferences, please click here: https://saxonica.plan.io=
/my/account?tour=3Dmail_preferences

This notification was cheerfully delivered by<https://plan.io/>
[Planio]<https://plan.io/>

--_000_CWXP265MB41079FC7A6209EE1CDD7C73882AC9CWXP265MB4107GBRP_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Sorry I forgot this query. The TEMP variable is explicitly set at the begin=
ning of the stylesheet I copied. It has an anodyne but genuine value like &=
quot;temp.xml&quot; .
<br>
</div>
<div>
<div><br>
</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0);">
<br>
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%;">
<b>From:</b> Saxonica Developer Community<br>
<b>Sent:</b> Monday, June 13, 2022 11:19 AM<br>
<b>Subject:</b> [SaxonC - Bug #5562] strange error when calling transform_t=
o_file in a loop
<div><br>
</div>
</div>
<div class=3D"rps_e61d">
<div style=3D"font-family:&quot;ProximaNova-Regular&quot;,Helvetica,Arial,s=
ans-serif; font-size:14px; line-height:1.4em; color:#333434">
<table class=3D"x_planio_mail" style=3D"border-collapse:collapse; margin-bo=
ttom:1em; border:1px solid #bbb; padding:4px; border-spacing:0; margin-bott=
om:0; width:100%; border:none; padding:0" width=3D"100%" cellspacing=3D"0" =
cellpadding=3D"0">
<tbody>
<tr>
<td class=3D"x_planio_mail x_header" style=3D"border:1px solid #bbb; paddin=
g:4px; text-align:center; width:100%; font-family:MarketWeb,Helvetica,Arial=
,sans-serif; font-size:0.8em; color:#D7D7D7; border:none; padding:0">
<p>--- In your reply, please do not write below this line ---</p>
</td>
</tr>
<tr>
<td class=3D"x_planio_mail" style=3D"border:1px solid #bbb; padding:4px; bo=
rder:none; padding:0">
Issue <a href=3D"https://saxonica.plan.io/issues/5562?pn=3D1#change-20965" =
target=3D"_blank" rel=3D"noopener noreferrer" data-auth=3D"NotApplicable" s=
tyle=3D"color:#0088b7">
#5562</a> has been updated by Martin Honnen.
<hr style=3D"width:100%; height:1px; background:#ccc; border:0; margin:1.2e=
m 0">
<ul class=3D"x_journal x_details" style=3D"color:#959595; margin-bottom:1.5=
em">
</ul>
<p>Lou Burnard wrote in <a href=3D"#x_note-6" style=3D"color:#0088b7">#note=
-6</a>:</p>
<blockquote style=3D"margin:0 0 0 .8ex; border-left:1px #ccc solid; padding=
-left:1ex">
<p>It would be nice to know why my original simple-minded attempt did not w=
ork though</p>
</blockquote>
<p>I hope O'Neil investigates that during the week and let's you know.</p>
<hr style=3D"width:100%; height:1px; background:#ccc; border:0; margin:1.2e=
m 0">
<h1 style=3D"font-family:&quot;ProximaNova-Bold&quot;,Helvetica,Arial,sans-=
serif; font-weight:normal; margin:0px; font-size:1.3em; line-height:1.4em">
<a href=3D"https://saxonica.plan.io/issues/5562?pn=3D1#change-20965" target=
=3D"_blank" rel=3D"noopener noreferrer" data-auth=3D"NotApplicable" style=
=3D"color:#0088b7; text-decoration:none">Bug #5562: strange error when call=
ing transform_to_file in a loop</a>
<span class=3D"x_badge x_badge-status-open" style=3D"font-weight:bold; font=
-size:10px; bottom:2px; padding:1px 3px; margin-right:2px; margin-left:2px;=
border-radius:2px; text-transform:uppercase; text-decoration:none; color:#=
205D86; border:1px solid #205D86">
open</span> </h1>
<ul class=3D"x_details" style=3D"color:#959595; margin-bottom:1.5em">
<li><strong>Author: </strong>Lou Burnard</li><li><strong>Status: </strong>N=
ew</li><li><strong>Priority: </strong>Low</li><li><strong>Start date: </str=
ong>2022-06-11</li></ul>
<p>I need to run a sequence of transforms, one after another, each one oper=
ating on the output of the preceding one. Here's the code I am currently tr=
ying:</p>
<pre style=3D"font-family:Hack,Consolas,Menlo,&quot;Liberation Mono&quot;,C=
ourier,monospace; font-size:85%; background-color:#ececec; word-wrap:break-=
word; margin:1em 0; padding:8px; border:none; border-radius:3px; width:auto=
; overflow-x:auto; overflow-y:hidden"><code style=3D"font-family:Hack,Conso=
las,Menlo,&quot;Liberation Mono&quot;,Courier,monospace; font-size:85%; bac=
kground-color:#ececec; word-wrap:break-word; border-radius:3px; padding:0.2=
em; margin:0; padding:0">with saxonc.PySaxonProcessor(license=3DFalse) as p=
roc:=0A=
print(proc.version)=0A=
# Initialize the XSLT 3.0. processor=0A=
xsltproc =3D proc.new_xslt30_processor()=0A=
for i in (0,1,2,3,4) :=0A=
print(i)=0A=
SCRIPT=3DscriptRoot+&quot;pt&quot;+str(i)+&quot;.xsl&quot;=0A=
TEMP=3DtempRoot+&quot;temp-&quot;+str(i+1)+&quot;.xml&quot;=0A=
print(&quot;Running &quot;+SCRIPT+&quot; on &quot;+FILE+&quot; produ=
cing &quot;+TEMP)=0A=
xsltproc.transform_to_file(source_file=3DFILE, stylesheet_file=3DSCR=
IPT, output_file=3DTEMP)=0A=
FILE=3DTEMP=0A=
=0A=
</code></pre>
<p>First time round the loop this behaves as expected. But then I get an I/=
O error on the output file I am trying to create?!</p>
<pre style=3D"font-family:Hack,Consolas,Menlo,&quot;Liberation Mono&quot;,C=
ourier,monospace; font-size:85%; background-color:#ececec; word-wrap:break-=
word; margin:1em 0; padding:8px; border:none; border-radius:3px; width:auto=
; overflow-x:auto; overflow-y:hidden"><code style=3D"font-family:Hack,Conso=
las,Menlo,&quot;Liberation Mono&quot;,Courier,monospace; font-size:85%; bac=
kground-color:#ececec; word-wrap:break-word; border-radius:3px; padding:0.2=
em; margin:0; padding:0">SaxonC-HE 11.3 from Saxonica=0A=
0=0A=
Running /home/lou/Public/pdf2tei/pt0.xsl on /home/lou/Desktop/LacyWork/outg=
oing/0101Time/temp.xml =0A=
producing /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-1.xml=0A=
1=0A=
Running /home/lou/Public/pdf2tei/pt1.xsl on /home/lou/Desktop/LacyWork/outg=
oing/0101Time/temp/temp-1.xml =0A=
producing /home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-2.xml=0A=
Error =0A=
I/O error reported by XML parser processing=0A=
/home/lou/Desktop/LacyWork/outgoing/0101Time/temp/temp-2.xml: No such fil=
e or directory.=0A=
Caused by java.io.FileNotFoundException: No such file or directory=0A=
</code></pre>
<div itemscope=3D"itemscope" itemtype=3D"http://schema.org/EmailMessage">
<div itemscope=3D"itemscope" itemprop=3D"action" itemtype=3D"http://schema.=
org/ViewAction">
<link itemprop=3D"url" href=3D"https://saxonica.plan.io/issues/5562?pn=3D1#=
change-20965">
<meta itemprop=3D"name" content=3D"View Issue">
</div>
<meta itemprop=3D"description" content=3D"View this issue update on Planio"=
>
</div>
</td>
</tr>
<tr>
<td class=3D"x_planio_mail x_footer" style=3D"border:1px solid #bbb; paddin=
g:4px; font-size:0.8em; width:100%; border:none; padding:0">
<hr style=3D"width:100%; height:1px; background:#ccc; border:0; margin:1.2e=
m 0">
<p>You have received this notification because you have either subscribed t=
o or are involved in a project on Saxonica Developer Community site. To cha=
nge your notification preferences, please click here:
<a href=3D"https://saxonica.plan.io/my/account?tour=3Dmail_preferences" tar=
get=3D"_blank" rel=3D"noopener noreferrer" data-auth=3D"NotApplicable" clas=
s=3D"x_external" style=3D"color:#0088b7">
https://saxonica.plan.io/my/account?tour=3Dmail_preferences</a></p>
</td>
</tr>
<tr>
<td class=3D"x_planio_mail x_planio_footer" style=3D"border:1px solid #bbb;=
padding:4px; text-align:center; width:100%; font-family:MarketWeb,Helvetic=
a,Arial,sans-serif; font-size:1.2em; color:#D7D7D7; border:none; padding:0"=
>
<br>
<div><a href=3D"https://plan.io/" target=3D"_blank" rel=3D"noopener norefer=
rer" data-auth=3D"NotApplicable" style=3D"color:#0088b7; color:#D7D7D7; tex=
t-decoration:none">This notification was cheerfully delivered by</a></div>
</td>
</tr>
<tr>
<td class=3D"x_planio_mail x_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/" target=3D"_blank" rel=3D"noopener noreferrer" =
data-auth=3D"NotApplicable" title=3D"Planio" style=3D"color:#0088b7"><img a=
lt=3D"Planio" style=3D"vertical-align:middle; border:none" width=3D"102" he=
ight=3D"25" border=3D"0" src=3D"https://assets.plan.io/images/planio_logo_g=
ray_204x50.png"></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>

--_000_CWXP265MB41079FC7A6209EE1CDD7C73882AC9CWXP265MB4107GBRP_--
    (1-1/1)