unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
@ 2020-11-25 20:36 Vincent Lefevre
  2020-11-26 10:43 ` Lars Ingebrigtsen
  2020-11-29 12:42 ` Andy Moreton
  0 siblings, 2 replies; 8+ messages in thread
From: Vincent Lefevre @ 2020-11-25 20:36 UTC (permalink / raw)
  To: 44874


Create a file foo.xml containing: <root></root>

Then type "emacs -Q foo.xml", and in the XML menu,
Set Schema → File..., and select xhtml5.rnc, which
can be obtained here:

  https://github.com/emacsmirror/html5-schema

(described as "Add HTML5 schemas for use by nXML").
I get the following error:

Incorrect schema. Unknown datatype library http://whattf.org/datatype-draft


In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2020-11-08, modified by Debian built on x86-ubc-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Debian GNU/Linux bullseye/sid

Recent messages:
Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done
Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done
Loading /etc/emacs/site-start.d/50latexmk.el (source)...done
Loading /etc/emacs/site-start.d/50maxima-emacs.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done
Loading /etc/emacs/site-start.d/50why3.el (source)...done
Loading /home/vinc17/share/emacs/site-lisp/mutteditor.el (source)...done
Loading time...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-cairo
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs-6jKC2B/emacs-27.1+1=.
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LC_COLLATE: POSIX
  value of $LC_CTYPE: C.UTF-8
  value of $LC_TIME: en_DK.utf8
  value of $LANG: POSIX
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  display-time-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-3.5/tablegen-mode
/usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-3.5/llvm-mode
/usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-3.5/emacs
/usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-3.6/tablegen-mode
/usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-3.6/llvm-mode
/usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-3.6/emacs
/usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-3.7/tablegen-mode
/usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-3.7/llvm-mode
/usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-3.7/emacs
/usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-7/tablegen-mode
/usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-7/llvm-mode
/usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-7/emacs
/usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-8/tablegen-mode
/usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-8/llvm-mode
/usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-8/emacs
/usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-9/tablegen-mode
/usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-9/llvm-mode
/usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-9/emacs
/usr/share/emacs/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/27.1/lisp/language/thai-word

Features:
(shadow sort mail-extr warnings emacsbug message rmc puny dired
dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache
epa derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date subr-x seq byte-opt gv bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time cus-start cus-load paren cc-styles
cc-align cc-engine cc-vars cc-defs edmacro kmacro cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 68727 6543)
 (symbols 48 8993 1)
 (strings 32 22350 2450)
 (string-bytes 1 715680)
 (vectors 16 8360)
 (vector-slots 8 108969 6652)
 (floats 8 26 28)
 (intervals 56 260 0)
 (buffers 1000 12))





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-25 20:36 bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema Vincent Lefevre
@ 2020-11-26 10:43 ` Lars Ingebrigtsen
  2020-11-26 15:02   ` Vincent Lefevre
  2020-11-29 12:42 ` Andy Moreton
  1 sibling, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-26 10:43 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: 44874

Vincent Lefevre <vincent@vinc17.net> writes:

> Create a file foo.xml containing: <root></root>
>
> Then type "emacs -Q foo.xml", and in the XML menu,
> Set Schema → File..., and select xhtml5.rnc, which
> can be obtained here:
>
>   https://github.com/emacsmirror/html5-schema
>
> (described as "Add HTML5 schemas for use by nXML").
> I get the following error:
>
> Incorrect schema. Unknown datatype library http://whattf.org/datatype-draft

I'm unable to reproduce this bug in Emacs 27.2 and Emacs 28.

Here's what I did:

cd /tmp
git clone https://github.com/emacsmirror/html5-schema
emacs -Q foo.xml
M-x rng-set-schema-file RET /tmp/html5-schema/xhtml5.rnc RET

It asks me whether to save the location, and I answer "y", and I get no
error.

Do you have a more precise recipe for reproducing the error?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-26 10:43 ` Lars Ingebrigtsen
@ 2020-11-26 15:02   ` Vincent Lefevre
  2020-11-27  8:09     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Vincent Lefevre @ 2020-11-26 15:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44874

On 2020-11-26 11:43:17 +0100, Lars Ingebrigtsen wrote:
> Here's what I did:
> 
> cd /tmp
> git clone https://github.com/emacsmirror/html5-schema
> emacs -Q foo.xml
> M-x rng-set-schema-file RET /tmp/html5-schema/xhtml5.rnc RET
> 
> It asks me whether to save the location, and I answer "y", and I get no
> error.

OK, there seems to be a difference when doing that instead of using
the menu. BTW, after saving the location, if you quit and reopen
the file, you should now get the error message.

> Do you have a more precise recipe for reproducing the error?

If you don't get the error message, just make sure to validate
with "C-c C-v". This is what makes the error appear.

Note: After that, if I select Set Schema → Any Well-Formed XML
from the menu, I get "Using vacuous schema", which is fine.
But C-c C-v still gives the error "Incorrect schema. Unknown
datatype library http://whattf.org/datatype-draft"!

This is with Debian's GNU Emacs 27.1.

Note: it is possible to reproduce the issue from an empty XML file,
but after the schema is selected, one needs to type the beginning of
an element, e.g. "<r". Otherwise nXML knows that the file is invalid
without using the schema.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-26 15:02   ` Vincent Lefevre
@ 2020-11-27  8:09     ` Lars Ingebrigtsen
  2020-11-27  8:59       ` Vincent Lefevre
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-27  8:09 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: 44874

Vincent Lefevre <vincent@vinc17.net> writes:

> OK, there seems to be a difference when doing that instead of using
> the menu.

That sounds really odd, because the menu is just calling that command.

> BTW, after saving the location, if you quit and reopen
> the file, you should now get the error message.
>
>> Do you have a more precise recipe for reproducing the error?
>
> If you don't get the error message, just make sure to validate
> with "C-c C-v". This is what makes the error appear.

Ah, yes, now I'm able to reproduce the problem -- the missing piece for
reproduction here was that the .xml file couldn't be empty.

But isn't the problem here that these .rnc files are just old and
outdated, and refers to datatype libraries that no longer exists?

As https://bugs.launchpad.net/nxhtml/+bug/1194670 says:

> That link to the datatype-draft doesn't exist anymore. I get the feeling
> these .rnc files are pretty old.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-27  8:09     ` Lars Ingebrigtsen
@ 2020-11-27  8:59       ` Vincent Lefevre
  2020-11-29 10:07         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Vincent Lefevre @ 2020-11-27  8:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44874

On 2020-11-27 09:09:12 +0100, Lars Ingebrigtsen wrote:
> But isn't the problem here that these .rnc files are just old and
> outdated, and refers to datatype libraries that no longer exists?

No, it appears that these libraries have never existed:

  https://web.archive.org/web/20130901000000*/http://whattf.org/datatype-draft

says

  Not Found

  The requested URL /whattf/datatype-draft was not found on this server.

  Additionally, a 404 Not Found error was encountered while trying to
  use an ErrorDocument to handle the request.

for any archive date from 2013 to 2020. It seems rather like an
identifier or something used via a catalog, which is no longer
in nXML. And I assume that if other data were needed, they would
have been put in the repository.

The fact that I still get an error after switching the schema to
the vacuous one is also strange.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-27  8:59       ` Vincent Lefevre
@ 2020-11-29 10:07         ` Lars Ingebrigtsen
  2020-11-29 13:48           ` Vincent Lefevre
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-29 10:07 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: 44874

Vincent Lefevre <vincent@vinc17.net> writes:

> On 2020-11-27 09:09:12 +0100, Lars Ingebrigtsen wrote:
>> But isn't the problem here that these .rnc files are just old and
>> outdated, and refers to datatype libraries that no longer exists?
>
> No, it appears that these libraries have never existed:
>
>   https://web.archive.org/web/20130901000000*/http://whattf.org/datatype-draft
>
> says
>
>   Not Found
>
>   The requested URL /whattf/datatype-draft was not found on this server.

Well, archive.org doesn't have anything resembling a complete archive of
the net, so that doesn't really mean that much.

In any case, this means that the .rnc files your using are invalid, so
is this a bug in Emacs?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-25 20:36 bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema Vincent Lefevre
  2020-11-26 10:43 ` Lars Ingebrigtsen
@ 2020-11-29 12:42 ` Andy Moreton
  1 sibling, 0 replies; 8+ messages in thread
From: Andy Moreton @ 2020-11-29 12:42 UTC (permalink / raw)
  To: 44874

On Wed 25 Nov 2020, Vincent Lefevre wrote:

> Create a file foo.xml containing: <root></root>
>
> Then type "emacs -Q foo.xml", and in the XML menu,
> Set Schema → File..., and select xhtml5.rnc, which
> can be obtained here:
>
>   https://github.com/emacsmirror/html5-schema
>
> (described as "Add HTML5 schemas for use by nXML").
> I get the following error:
>
> Incorrect schema. Unknown datatype library http://whattf.org/datatype-draft

That repo contains html5-schema.el which appears to do some nXML setup
for those datatypes. Did you try using that to configure things ?

    AndyM






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema
  2020-11-29 10:07         ` Lars Ingebrigtsen
@ 2020-11-29 13:48           ` Vincent Lefevre
  0 siblings, 0 replies; 8+ messages in thread
From: Vincent Lefevre @ 2020-11-29 13:48 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44874

On 2020-11-29 11:07:27 +0100, Lars Ingebrigtsen wrote:
> Vincent Lefevre <vincent@vinc17.net> writes:
> 
> > On 2020-11-27 09:09:12 +0100, Lars Ingebrigtsen wrote:
> >> But isn't the problem here that these .rnc files are just old and
> >> outdated, and refers to datatype libraries that no longer exists?
> >
> > No, it appears that these libraries have never existed:
> >
> >   https://web.archive.org/web/20130901000000*/http://whattf.org/datatype-draft
> >
> > says
> >
> >   Not Found
> >
> >   The requested URL /whattf/datatype-draft was not found on this server.
> 
> Well, archive.org doesn't have anything resembling a complete archive of
> the net, so that doesn't really mean that much.

The fact that archive.org isn't complete is irrelevant here. The point
is that it checked the http://whattf.org/datatype-draft URL over the
years from 2013 (probably because it was first referenced at that time)
to 2020, and each time, it got a 404 Not Found error, which explicitly
means that the document at this URL did not exist.

> In any case, this means that the .rnc files your using are invalid,
> so is this a bug in Emacs?

Since this schema was working in the past with nXML (while
http://whattf.org/datatype-draft did not exist) and was designed
for nXML, why would it be invalid?

Note: this is also referenced there:

  https://elpa.gnu.org/packages/html5-schema.html

where there is the same issue with

  https://elpa.gnu.org/packages/html5-schema-0.1.tar

(but I suppose that the .rnc files are the same).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-29 13:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 20:36 bug#44874: 27.1; nXML: error when setting the xhtml5.rnc schema Vincent Lefevre
2020-11-26 10:43 ` Lars Ingebrigtsen
2020-11-26 15:02   ` Vincent Lefevre
2020-11-27  8:09     ` Lars Ingebrigtsen
2020-11-27  8:59       ` Vincent Lefevre
2020-11-29 10:07         ` Lars Ingebrigtsen
2020-11-29 13:48           ` Vincent Lefevre
2020-11-29 12:42 ` Andy Moreton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).