driinfo: add DTD to allow the xml to be validated

This DTD can be used to validate the output and make sure any parsers
out there can handle it:
$ xmllint --noout --valid driinfo.xml

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Eric Engestrom 2019-01-22 16:49:29 +00:00 committed by Eric Engestrom
parent 9646750822
commit a213b927f2

View file

@ -42,6 +42,22 @@
/** \brief Begin __driConfigOptions */
#define DRI_CONF_BEGIN \
"<?xml version=\"1.0\" standalone=\"yes\"?>" \
"<!DOCTYPE driinfo [" \
" <!ELEMENT driinfo (section*)>" \
" <!ELEMENT section (description+, option+)>" \
" <!ELEMENT description (enum*)>" \
" <!ATTLIST description lang CDATA #REQUIRED" \
" text CDATA #REQUIRED>" \
" <!ELEMENT option (description+)>" \
" <!ATTLIST option name CDATA #REQUIRED" \
" type (bool|enum|int|float) #REQUIRED" \
" default CDATA #REQUIRED" \
" valid CDATA #IMPLIED>" \
" <!ELEMENT enum EMPTY>" \
" <!ATTLIST enum value CDATA #REQUIRED" \
" text CDATA #REQUIRED>" \
"]>" \
"<driinfo>\n"
/** \brief End __driConfigOptions */