Summary: | app-emacs/nxml-gentoo-schemas-20111129 incorrectly marking elements as invalid | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ulrich Müller <ulm> |
Component: | Current packages | Assignee: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emacs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch for Makefile |
Description
Ulrich Müller
2014-11-21 19:50:30 UTC
I've investigated a little further. The first observation is that xmllint reports the same error as rng-validate-mode in Emacs. For example, if I verify app-editors/emacs/metadata.xml: $ trang /usr/share/emacs/etc/nxml-gentoo-schemas/metadata.rnc /tmp/metadata.rng $ xmllint --relaxng /tmp/metadata.rng metadata.xml >/dev/null metadata.xml:3: element pkgmetadata: Relax-NG validity error : Did not expect element pkgmetadata there metadata.xml fails to validate It doesn't help if I generate the rng file from the dtd file directly, i.e. xmllint still reports the same error after I did this: $ trang /usr/portage/metadata/dtd/metadata.dtd /tmp/metadata.rng The second observation is that I can work around the problem if I patch /usr/share/emacs/etc/nxml-gentoo-schemas/metadata.rnc as follows: -start = catmetadata | packages +start = catmetadata | packages | pkgmetadata Created attachment 402014 [details, diff] Patch for Makefile Trang documentation says: "Trang assumes that all elements that are defined but never referenced are allowed as document elements." This fails for pkgmetadata because it is referenced from the packages element. A workaround is to suppress generation of a start element with "-i no-generate-start" and then add one manually. See attached patch for the Makefile. I can roll a new tarball myself if you prefer. (I'd also update the distfile to be in tar.xz format then.) (In reply to Ulrich Müller from comment #0) > [...] IIRC it used to work at least with Emacs 23 at some point. Seems unlikely. I guess it has never worked for pkgmetadata. Fixed in nxml-gentoo-schemas-20150428. |