Install a dtd in /usr/share/glib-2.0/schemas/gschema.dtd
authorMatthias Clasen <mclasen@redhat.com>
Mon, 19 Apr 2010 18:04:42 +0000 (14:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 Apr 2010 18:04:42 +0000 (14:04 -0400)
gio/Makefile.am
gio/gschema.dtd [new file with mode: 0644]

index 0c3cace..0698d2a 100644 (file)
@@ -473,6 +473,7 @@ EXTRA_DIST +=                       \
        abicheck.sh             \
        pltcheck.sh             \
        gio.rc.in               \
+       gschema.dtd             \
        $(NULL)
 
 BUILT_EXTRA_DIST =             \
@@ -512,6 +513,9 @@ gschema_compile_SOURCES = \
        gvdb/gvdb-builder.c             \
        gschema-compile.c
 
+schemadir = $(datadir)/glib-2.0/schemas
+dist_schema_DATA = gschema.dtd
+
 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
        files='$(BUILT_EXTRA_DIST)'; \
        for f in $$files; do \
diff --git a/gio/gschema.dtd b/gio/gschema.dtd
new file mode 100644 (file)
index 0000000..9f7bcd7
--- /dev/null
@@ -0,0 +1,40 @@
+<!ELEMENT schemalist (schema*) >
+<!ATTLIST schemalist gettext-domain #IMPLIED >
+
+<!ELEMENT schema (key|child)* >
+<!ATTLIST schema id             CDATA #REQUIRED
+                 path           CDATA #IMPLIED
+                 gettext-domain CDATA #IMPLIED >
+
+<!ELEMENT key (default|summary?|description?|range?|choices?) >
+<!-- name can only contain lowercase letters, numbers and '-' -->
+<!-- type must be a GVariant type string -->
+<!ATTLIST key name CDATA #REQUIRED
+              type CDATA #REQUIRED >
+
+<!-- the default value is specified a a serialized GVariant,
+     i.e. you have to include the quotes when specifying a string -->
+<!ELEMENT default (#PCDATA) >
+<!-- the presence of the l10n attribute marks a default value for
+     translation, its value is the gettext category to use -->
+<!-- if context is present, it specifies msgctxt to use -->
+<!ATTLIST default l10n    (messages|time) #IMPLIED
+                  context CDATA           #IMPLIED >
+
+<!ELEMENT summary (#PCDATA) >
+<!ELEMENT description (#PCDATA) >
+
+<!ELEMENT range (min,max)  >
+<!ELEMENT min (#PCDATA) >
+<!ELEMENT max (#PCDATA) >
+
+<!ELEMENT choices (choice+) >
+<!ELEMENT choice (alias?) >
+<!ATTLIST choice value CDATA #REQUIRED >
+<!ELEMENT choice (alias?) >
+<!ELEMENT alias EMPTY >
+<!ATTLIST alias value CDATA #REQUIRED >
+
+<!ELEMENT child EMPTY >
+<!ATTLIST child name   CDATA #REQUIRED
+                schema CDATA #REQUIRED >