On Tue, 10 Nov 2015 09:53:08 +1000 Peter Hutterer <peter.hutte...@who-t.net> wrote:
> Embed the wayland.dtd protocol data into the scanner binary so we can validate > external protocol files without requiring makefile changes. Hat-tip to Pekka > Paalanen for the embedding trick. > The embedding trick doesn't work well if the to-be-embedded file is in a > different location than the source file, so copy/link it during configure and > then build it in from the local directory. > > The current expat parser is not a validating parser, moving scanner.c to > another parser has the risk of breaking compatibility. This patch adds libxml2 > as extra (optional) dependency, but that also requires parsing the input > twice. > > If the protocol fails validation a warning is printed but no error is returned > otherwise. > > Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> > --- > Changes to v1: > - move the dtddata.S to SOURCES and add AM_PROG_AS to configure. This fixes > distcheck > - handle explicit input files, rather than just stdin > - changed the warning to refer to a built-in dtd > > Makefile.am | 11 ++++++--- > configure.ac | 13 +++++++++++ > src/dtddata.S | 40 +++++++++++++++++++++++++++++++++ > src/scanner.c | 71 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 132 insertions(+), 3 deletions(-) > create mode 100644 src/dtddata.S Hi Peter, this patch R-b me, and so the whole 4-patch series pushed: c7bada0..f66e2d5 master -> master This causes some noise in Weston as there are some protocols with unexpected order of XML elements, but those are trivial to fix. xdg-shell.xml uses some doc text that is not according to the DTD and I'm not sure the scanner picks it up either, that will need a bit more. It's about per-entry docs in enums. I think I'll just push the desktop-shell.xml fix soon to Weston. Hmm, or maybe after Jason's wayland-protocol migration series, as it renames desktop-shell.xml. Thanks, pq
signature.asc
Description: PGP signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel