[PATCH wayland 1/3] Revert "Remove protocol/wayland.dtd"

Peter Hutterer peter.hutterer at who-t.net
Sun Nov 8 20:14:59 PST 2015


This reverts commit 06fb8bd371403d43bc192577abd6b0a0c8b29c59.

Having a DTD hooked up gives an indication of what we expect the protocol to
be, which is a clearer documentation than the current "whatever scanner.c
manages to parse".

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Makefile.am          |  4 ++--
 protocol/wayland.dtd | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 protocol/wayland.dtd

diff --git a/Makefile.am b/Makefile.am
index 4c57ecf..9114d98 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,8 +16,8 @@ dist_aclocal_DATA = wayland-scanner.m4
 
 dist_pkgdata_DATA =				\
 	wayland-scanner.mk			\
-	protocol/wayland.xml
-
+	protocol/wayland.xml			\
+	protocol/wayland.dtd
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA =
diff --git a/protocol/wayland.dtd b/protocol/wayland.dtd
new file mode 100644
index 0000000..b8b1573
--- /dev/null
+++ b/protocol/wayland.dtd
@@ -0,0 +1,29 @@
+<!ELEMENT protocol (copyright?, interface+)>
+  <!ATTLIST protocol name CDATA #REQUIRED>
+<!ELEMENT copyright (#PCDATA)>
+<!ELEMENT interface (description?,(request|event|enum)+)>
+  <!ATTLIST interface name CDATA #REQUIRED>
+  <!ATTLIST interface version CDATA #REQUIRED>
+<!ELEMENT request (description?,arg*)>
+  <!ATTLIST request name CDATA #REQUIRED>
+  <!ATTLIST request type CDATA #IMPLIED>
+  <!ATTLIST request since CDATA #IMPLIED>
+<!ELEMENT event (description?,arg*)>
+  <!ATTLIST event name CDATA #REQUIRED>
+  <!ATTLIST event since CDATA #IMPLIED>
+<!ELEMENT enum (description?,entry*)>
+  <!ATTLIST enum name CDATA #REQUIRED>
+  <!ATTLIST enum since CDATA #IMPLIED>
+<!ELEMENT entry (description?)>
+  <!ATTLIST entry name CDATA #REQUIRED>
+  <!ATTLIST entry value CDATA #REQUIRED>
+  <!ATTLIST entry summary CDATA #IMPLIED>
+  <!ATTLIST entry since CDATA #IMPLIED>
+<!ELEMENT arg (description?)>
+  <!ATTLIST arg name CDATA #REQUIRED>
+  <!ATTLIST arg type CDATA #REQUIRED>
+  <!ATTLIST arg summary CDATA #IMPLIED>
+  <!ATTLIST arg interface CDATA #IMPLIED>
+  <!ATTLIST arg allow-null CDATA #IMPLIED>
+<!ELEMENT description (#PCDATA)>
+  <!ATTLIST description summary CDATA #REQUIRED>
-- 
2.4.3



More information about the wayland-devel mailing list