[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Should lmi use an xml catalog resolver?
From: |
Greg Chicares |
Subject: |
Re: [lmi] Should lmi use an xml catalog resolver? |
Date: |
Fri, 16 Oct 2020 12:20:30 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 2020-10-15 20:51, Vadim Zeitlin wrote:
> On Wed, 14 Oct 2020 19:41:18 +0000 Greg Chicares <gchicares@sbcglobal.net>
> wrote:
>
> GC> Building libxslt produces 244 lines of diagnostics like these:
> GC>
> ^
> GC> I/O error : Attempt to load network entity
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> GC> EXSLT/bugs.html:2: warning: failed to load external entity
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
> GC> 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> GC>
> ^
> GC> EXSLT/bugs.html:3: validity error : Validation failed: no DTD found !
> GC> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta
> http-equiv="Content-Type"
> GC> ^
>
> Sorry but how exactly can I reproduce this? I don't see it when running
> install_xml_libraries.sh with LMI_TRIPLET=i686-w64-mingw32 and I don't see
> it when building libxslt natively neither.
The only reason I can guess is that I'm doing everything in a chroot,
which must lack some configuration file or daemon that lets these
external entities load in a host environment.
Examining my older logs
/srv/cache_for_lmi/logs[0]$grep --count 'external entity' lmi-log* |less -S
I see
lmi-log_20200528T1922Z:12
lmi-log_20200528T2204Z:12
...always 12, until this month there are 244...
lmi-log_20201013T2236Z:244
The 12 occurrences in older logs all pertain to
"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
but the 2020-October logs don't mention that XSL file--they fail only for
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
I do have both of those {xsl, dtd} files in the chroot:
/opt/lmi/src/lmi[0]$find /opt/lmi -name 'xhtml1-transitional.dtd'
/opt/lmi/src/lmi/third_party/libxml2/test/valid/dtds/xhtml1-transitional.dtd
/opt/lmi/src/lmi[0]$find /opt/lmi -name 'docbook.xsl'
/opt/lmi/third_party/src/boost/tools/boostbook/xsl/docbook.xsl <--this one's
boost
/opt/lmi/src/lmi/third_party/libxslt/tests/docbook/html/docbook.xsl
/opt/lmi/src/lmi/third_party/libxslt/tests/docbook/xhtml/docbook.xsl
/opt/lmi/src/lmi/third_party/libxslt/tests/docbook/fo/docbook.xsl
The first failure seems to occur in this makefile:
/opt/lmi/local/gcc_x86_64-pc-linux-gnu/xml-ad_hoc/libxslt/doc/Makefile
and copying a line from there lets me reproduce the failure at the command line:
/opt/lmi/src/lmi[0]$wine xmllint.exe --nonet --valid --noout
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html
I/O error : Attempt to load network entity
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:2: warning: failed to load
external entity "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
^
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:3: validity error :
Validation failed: no DTD found !
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type"
^
I had hoped to make it work by supplying an explicit '--path=', but
that didn't work:
/opt/lmi/src/lmi[0]$ls -l
/opt/lmi/src/lmi/third_party/libxml2/test/valid/dtds/xhtml1-transitional.dtd
-rw-rw-r-- 1 greg lmi 32289 Oct 13 22:50
/opt/lmi/src/lmi/third_party/libxml2/test/valid/dtds/xhtml1-transitional.dtd
/opt/lmi/src/lmi[0]$wine xmllint.exe --nonet --path
/opt/lmi/src/lmi/third_party/libxml2/test/valid/dtds/ --valid --noout
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html
I/O error : Attempt to load network entity
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
I/O error : Attempt to load network entity
http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
I/O error : Attempt to load network entity
http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent
I/O error : Attempt to load network entity
http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent
I also tried removing '--nonet' as an experiment:
/opt/lmi/src/lmi[0]$wine xmllint.exe --valid --noout
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html
but, after waiting a minute or two (to load from an overburdened w3.org
server, I imagine), that fails with:
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:3: element html: validity
error : No declaration for attribute xmlns of element html
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type"
^
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:3: element meta: validity
error : No declaration for attribute http-equiv of element meta
"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
^
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:3: element meta: validity
error : No declaration for attribute content of element meta
"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
^
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:3: element meta: validity
error : No declaration for element meta
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
^
/opt/lmi/src/lmi/third_party/libxslt/doc/news.html:3: element style: validity
error : No declaration for attribute type of element style
="Content-Type" content="text/html; charset=ISO-8859-1" /><style type="text/css"
^
[...output totalling 3786 lines]
I had hoped that there'd be some simple way to make this work in a chroot,
but if there isn't, we can live with 244 extra lines in a 15000-line build log.