Re: [docbook-apps] Embedding DocBook → PD F transformation in a Java web app

Paul Hoadley <[email protected]> Tue, 1 Aug 2023 15:21:52 +0930
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
--Apple-Mail=_145D0A78-6362-4233-BA5B-95783861040E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 1 Aug 2023, at 13:14, Paul Hoadley <[email protected]> wrote:

> While I suspect this will work eventually

I'm still holding out hope... I've now got a catalog.xml mapping every =
.xsl, .xml, .ent, and .dtd file to its 'classpath:' URI equivalent. =
(Another aside: given that's a really simple string manipulation, can I =
make my own resolver that doesn't need the catalog.xml? What would it =
extend, which method would I override, and how would I provide that to =
Saxon's Transformer?)

Anyway, now this:

Error at char 9 in expression in xsl:param/@select on line 18 column 57 =
of l10n.xsl:
  FODC0002  I/O error reported by XML parser processing
  file:///xsl/docbook-xsl-1.79.2/common/l10n.xsl. Caused by =
java.io.FileNotFoundException:
  /xsl/docbook-xsl-1.79.2/common/l10n.xsl (No such file or directory)
at parameter local.l10n.xml on line 18 column 57 of l10n.xsl:
     invoked by global parameter local.l10n.xml at =
file:///xsl/docbook-xsl-1.79.2/common/l10n.xsl#18

Where that line involves a call to document(''):

<xsl:param name=3D"local.l10n.xml" select=3D"document('')"/>

Looks like it's insisting on load itself from a file, and then =
(obviously) can't find it at that URI. How do we tell whoever is =
resolving calls to the document() function to use the classpath?


--=20
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/


--Apple-Mail=_145D0A78-6362-4233-BA5B-95783861040E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">On =
1 Aug 2023, at 13:14, Paul Hoadley &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:<div class=3D""><br =
class=3D""></div><div class=3D""><div><blockquote type=3D"cite" =
class=3D""><div class=3D""><div class=3D"" style=3D"caret-color: rgb(0, =
0, 0); font-family: LucidaGrande; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><div class=3D"">While I suspect this will work =
eventually</div></div></div></blockquote><div><br =
class=3D""></div><div>I'm still holding out hope... I've now got a =
catalog.xml mapping every .xsl, .xml, .ent, and .dtd file to its =
'classpath:' URI equivalent. (Another aside: given that's a really =
simple string manipulation, can I make my own resolver that doesn't need =
the catalog.xml? What would it extend, which method would I override, =
and how would I provide that to Saxon's Transformer?)</div><div><br =
class=3D""></div><div>Anyway, now this:</div><div><br =
class=3D""></div><div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 12px; line-height: normal; font-family: Menlo; color: =
rgb(255, 0, 0);" class=3D"">Error at char 9 in expression in =
xsl:param/@select on line 18 column 57 of l10n.xsl:</div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 12px; =
line-height: normal; font-family: Menlo; color: rgb(255, 0, 0);" =
class=3D"">&nbsp; FODC0002&nbsp; I/O error reported by XML parser =
processing</div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 12px; line-height: normal; font-family: Menlo; color: =
rgb(255, 0, 0);" class=3D"">&nbsp; <a =
href=3D"file:///xsl/docbook-xsl-1.79.2/common/l10n.xsl" =
class=3D"">file:///xsl/docbook-xsl-1.79.2/common/l10n.xsl</a>. Caused by =
<span style=3D"text-decoration: underline ; color: #0068da" =
class=3D"">java.io.FileNotFoundException</span>:</div><div =
style=3D"margin: 0px; font-stretch: normal; font-size: 12px; =
line-height: normal; font-family: Menlo; color: rgb(255, 0, 0);" =
class=3D"">&nbsp; /xsl/docbook-xsl-1.79.2/common/l10n.xsl (No such file =
or directory)</div><div style=3D"margin: 0px; font-stretch: normal; =
font-size: 12px; line-height: normal; font-family: Menlo; color: =
rgb(255, 0, 0);" class=3D"">at parameter local.l10n.xml on line 18 =
column 57 of l10n.xsl:</div><div style=3D"margin: 0px; font-stretch: =
normal; font-size: 12px; line-height: normal; font-family: Menlo; color: =
rgb(255, 0, 0);" class=3D"">&nbsp;&nbsp; &nbsp; invoked by global =
parameter local.l10n.xml at <a =
href=3D"file:///xsl/docbook-xsl-1.79.2/common/l10n.xsl#18" =
class=3D"">file:///xsl/docbook-xsl-1.79.2/common/l10n.xsl#18</a></div></di=
v><div><br class=3D""></div><div>Where that line involves a call to =
document(''):</div><div><br class=3D""></div><div><div style=3D"margin: =
0px; font-stretch: normal; font-size: 12px; line-height: normal; =
font-family: Menlo; color: rgb(42, 161, 152);" class=3D""><span =
style=3D"color: #000000" class=3D"">&lt;</span><span style=3D"color: =
#268bd2" class=3D"">xsl:param</span><span style=3D"color: #000000" =
class=3D""> </span><span style=3D"color: #93a1a1" =
class=3D"">name</span><span style=3D"color: #000000" =
class=3D"">=3D</span><span style=3D"color: #93a1a1" =
class=3D"">"</span>local.l10n.xml<span style=3D"color: #93a1a1" =
class=3D"">"</span><span style=3D"color: #000000" class=3D""> =
</span><span style=3D"color: #93a1a1" class=3D"">select</span><span =
style=3D"color: #000000" class=3D"">=3D</span><span style=3D"color: =
#93a1a1" class=3D"">"</span>document('')<span style=3D"color: #93a1a1" =
class=3D"">"</span><span style=3D"color: #000000" =
class=3D"">/&gt;</span></div><div class=3D""><span style=3D"color: =
#000000" class=3D""><br class=3D""></span></div><div class=3D""><span =
style=3D"color: #000000" class=3D"">Looks like it's insisting on load =
itself from a file, and then (obviously) can't find it at that URI. How =
do we tell whoever is resolving calls to the document() function to use =
the classpath?</span></div><div class=3D""><span style=3D"color: =
#000000" class=3D""><br class=3D""></span></div></div><div><br =
class=3D""></div></div><div class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><span class=3D"Apple-style-span" style=3D"border-collapse: =
separate; font-variant-ligatures: normal; font-variant-position: normal; =
font-variant-numeric: normal; font-variant-alternates: normal; =
font-variant-east-asian: normal; font-weight: normal; line-height: =
normal; border-spacing: 0px; -webkit-text-decorations-in-effect: =
none;"><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;" class=3D"">--&nbsp;<br class=3D"">Paul =
Hoadley<br class=3D""><a href=3D"https://logicsquad.net/" =
class=3D"">https://logicsquad.net/</a><br =
class=3D"">https://www.linkedin.com/company/logic-squad/</div><div =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;" class=3D""><br =
class=3D""></div></span></div></div></div></div></body></html>=

--Apple-Mail=_145D0A78-6362-4233-BA5B-95783861040E--