Commit cad97408 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar

actually validate the XML with the DTD

parent d826d629
...@@ -26,5 +26,6 @@ noinst_HEADERS = test_dr.h test_dr_cmp.h ...@@ -26,5 +26,6 @@ noinst_HEADERS = test_dr.h test_dr_cmp.h
EXTRA_DIST=dr.dtd dr.xml dr.xsl EXTRA_DIST=dr.dtd dr.xml dr.xsl
test_dr.c: dr.dtd dr.xml dr.xsl test_dr.c: dr.dtd dr.xml dr.xsl
xmllint --noout --valid dr.xml
xsltproc -o test_dr.c dr.xsl dr.xml xsltproc -o test_dr.c dr.xsl dr.xml
<!ELEMENT dr (descriptor*)> <!ELEMENT dr (descriptor*)>
<!ELEMENT descriptor (integer | boolean | insert | array)*> <!ELEMENT descriptor (integer | boolean | insert | array | carray)*>
<!ELEMENT integer EMPTY> <!ELEMENT integer EMPTY>
...@@ -8,25 +8,30 @@ ...@@ -8,25 +8,30 @@
<!ELEMENT array EMPTY> <!ELEMENT array EMPTY>
<!ELEMENT carray EMPTY>
<!ELEMENT insert (begin? | check? | end?)> <!ELEMENT insert (begin? | check? | end?)>
<!ELEMENT begin (#PCDATA)> <!ELEMENT begin (#PCDATA)>
<!ELEMENT check (#PCDATA)> <!ELEMENT check (#PCDATA)>
<!ATTLIST descriptor name CDATA #IMPLIED> <!ATTLIST descriptor name CDATA #REQUIRED>
<!ATTLIST descriptor sname CDATA #IMPLIED> <!ATTLIST descriptor sname CDATA #REQUIRED>
<!ATTLIST descriptor msuffix CDATA #IMPLIED> <!ATTLIST descriptor msuffix CDATA "0">
<!ATTLIST descriptor gen_args CDATA #IMPLIED> <!ATTLIST descriptor gen_args CDATA "0">
<!ATTLIST integer name CDATA #IMPLIED> <!ATTLIST integer name CDATA #REQUIRED>
<!ATTLIST integer bitcount CDATA #IMPLIED> <!ATTLIST integer bitcount CDATA #REQUIRED>
<!ATTLIST integer default CDATA #IMPLIED> <!ATTLIST integer default CDATA #REQUIRED>
<!ATTLIST boolean name CDATA #IMPLIED> <!ATTLIST boolean name CDATA #REQUIRED>
<!ATTLIST boolean default CDATA #IMPLIED> <!ATTLIST boolean default CDATA #REQUIRED>
<!ATTLIST array name CDATA #IMPLIED> <!ATTLIST array name CDATA #REQUIRED>
<!ATTLIST array len_name CDATA #IMPLIED> <!ATTLIST array len_name CDATA #REQUIRED>
<!ATTLIST array min_size CDATA #IMPLIED> <!ATTLIST array min_size CDATA #REQUIRED>
<!ATTLIST array max_size CDATA #IMPLIED>
<!ATTLIST array type CDATA #IMPLIED> <!ATTLIST array type CDATA #IMPLIED>
<!ATTLIST carray name CDATA #REQUIRED>
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment