Here comes the DTD (along with some minor fixes)
git-svn-id: https://svn.apache.org/repos/asf/httpd/test/trunk/flood@100574 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/examples/flood.dtd b/examples/flood.dtd
new file mode 100644
index 0000000..54a751b
--- /dev/null
+++ b/examples/flood.dtd
@@ -0,0 +1,110 @@
+<?xml version="1.0" ?>
+
+<!--
+
+ This is a DTD for flood configuration files.
+ With this file, validating XML software and
+ heading line:
+
+ <!DOCTYPE flood SYSTEM "flood.dtd">
+
+ ...you can make sure your flood configuration
+ is valid (in contrast to just "well-formed").
+
+-->
+
+<!ELEMENT flood (urllist+,profile+,farmer+,farm+,seed?)>
+
+<!-- urllist -->
+<!ELEMENT urllist (name,description?,baseurl?,(url|sequence)+)>
+
+<!ELEMENT name (#PCDATA)>
+<!ELEMENT description (#PCDATA)>
+<!ELEMENT baseurl (#PCDATA)>
+
+<!ELEMENT url (#PCDATA)>
+
+<!ATTLIST url method (GET | POST | HEAD) #IMPLIED>
+<!ATTLIST url payload CDATA #IMPLIED>
+<!ATTLIST url payloadparam CDATA #IMPLIED>
+<!ATTLIST url payloadparamcount CDATA #IMPLIED>
+<!ATTLIST url payloadtemplate CDATA #IMPLIED>
+<!ATTLIST url responsename CDATA #IMPLIED>
+<!ATTLIST url responsetemplate CDATA #IMPLIED>
+<!ATTLIST url requesttemplate CDATA #IMPLIED>
+<!ATTLIST url requestparamcount CDATA #IMPLIED>
+<!ATTLIST url predelay CDATA #IMPLIED>
+<!ATTLIST url predelayprecision CDATA #IMPLIED>
+<!ATTLIST url postdelay CDATA #IMPLIED>
+<!ATTLIST url postdelayprecision CDATA #IMPLIED>
+<!ATTLIST url user CDATA #IMPLIED>
+<!ATTLIST url password CDATA #IMPLIED>
+
+<!ELEMENT sequence (url+)>
+
+<!ATTLIST sequence sequencename CDATA #REQUIRED>
+<!ATTLIST sequence sequencelist CDATA #REQUIRED>
+
+<!-- profile -->
+
+<!ENTITY % profile.events "(profile_init?,get_next_url?,create_req?,postprocess?,loop_condition?,profile_destroy?)+">
+<!ENTITY % socket.events "(socket_init?,begin_conn?,send_req?,recv_resp?,end_conn?,request_destroy?,response_destroy?,socket_destroy?)+">
+<!ENTITY % report.events "(report_init?,process_stats?,report_stats?,destroy_report?)+">
+
+<!-- FIXME: this declaration doesn't exactly cover the flexibility of profile -->
+
+<!ELEMENT profile (name,(description)?,useurllist,
+ (profiletype|%profile.events;),
+ (socket|%socket.events;),
+ verify_resp,
+ (report|%report.events;))>
+
+<!ELEMENT useurllist (#PCDATA)>
+<!ELEMENT profiletype (#PCDATA)>
+<!ELEMENT socket (#PCDATA)>
+<!ELEMENT verify_resp (#PCDATA)>
+<!ELEMENT report (#PCDATA)>
+
+<!ELEMENT profile_init (#PCDATA)>
+<!ELEMENT get_next_url (#PCDATA)>
+<!ELEMENT create_req (#PCDATA)>
+<!ELEMENT postprocess (#PCDATA)>
+<!ELEMENT loop_condition (#PCDATA)>
+<!ELEMENT profile_destroy (#PCDATA)>
+
+<!ELEMENT report_init (#PCDATA)>
+<!ELEMENT process_stats (#PCDATA)>
+<!ELEMENT report_stats (#PCDATA)>
+<!ELEMENT destroy_report (#PCDATA)>
+
+<!ELEMENT socket_init (#PCDATA)>
+<!ELEMENT begin_conn (#PCDATA)>
+<!ELEMENT send_req (#PCDATA)>
+<!ELEMENT recv_resp (#PCDATA)>
+<!ELEMENT end_conn (#PCDATA)>
+<!ELEMENT request_destroy (#PCDATA)>
+<!ELEMENT response_destroy (#PCDATA)>
+<!ELEMENT socket_destroy (#PCDATA)>
+
+<!-- farmer -->
+
+<!ELEMENT farmer (name,description?,(count|time),useprofile)>
+
+<!ELEMENT count (#PCDATA)>
+<!ELEMENT time (#PCDATA)>
+<!ELEMENT useprofile (#PCDATA)>
+
+<!-- farm -->
+
+<!ELEMENT farm (name,description?,usefarmer)>
+
+<!ELEMENT usefarmer (#PCDATA)>
+
+<!ATTLIST usefarmer count CDATA #IMPLIED>
+<!ATTLIST usefarmer startcount CDATA #IMPLIED>
+<!ATTLIST usefarmer startdelay CDATA #IMPLIED>
+
+<!-- seed -->
+
+<!ELEMENT seed (#PCDATA)>
+
diff --git a/examples/round-robin-dynamic.xml b/examples/round-robin-dynamic.xml
index 670b8b0..1a5c8d3 100644
--- a/examples/round-robin-dynamic.xml
+++ b/examples/round-robin-dynamic.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file. -->
<flood>
<!-- A urllist describes which hosts and which methods we want to hit. -->
diff --git a/examples/round-robin-example.xml b/examples/round-robin-example.xml
index 32be7d3..4802183 100644
--- a/examples/round-robin-example.xml
+++ b/examples/round-robin-example.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file. -->
<flood>
<!-- A urllist describes which hosts and which methods we want to hit. -->
diff --git a/examples/round-robin-keepalive.xml b/examples/round-robin-keepalive.xml
index 95f5210..3b38294 100644
--- a/examples/round-robin-keepalive.xml
+++ b/examples/round-robin-keepalive.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file.
This is a keepalive-enabled profile. -->
<flood>
diff --git a/examples/round-robin-relative-reports.xml b/examples/round-robin-relative-reports.xml
index f10b1ce..9d2a977 100644
--- a/examples/round-robin-relative-reports.xml
+++ b/examples/round-robin-relative-reports.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file. -->
<flood>
<!-- A urllist describes which hosts and which methods we want to hit. -->
@@ -22,10 +24,10 @@
<profiletype>round_robin</profiletype>
<!-- Specifies that we will use generic socket logic -->
<socket>generic</socket>
- <!-- Specifies that we will use the "easy" report generation -->
- <report>relative_times</report>
<!-- Specifies that we will use verify_200 for response verification -->
<verify_resp>verify_200</verify_resp>
+ <!-- Specifies that we will use the "easy" report generation -->
+ <report>relative_times</report>
</profile>
diff --git a/examples/round-robin-ssl.xml b/examples/round-robin-ssl.xml
index ffa9919..4460cbf 100644
--- a/examples/round-robin-ssl.xml
+++ b/examples/round-robin-ssl.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<flood>
<urllist>
<name>Test Hosts</name>
diff --git a/examples/round-robin-timed.xml b/examples/round-robin-timed.xml
index 0e3ac5d..6d26010 100644
--- a/examples/round-robin-timed.xml
+++ b/examples/round-robin-timed.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file. -->
<flood>
<!-- A urllist describes which hosts and which methods we want to hit. -->
@@ -22,10 +24,10 @@
<profiletype>round_robin</profiletype>
<!-- Specifies that we will use generic socket logic -->
<socket>generic</socket>
- <!-- Specifies that we will use the "easy" report generation -->
- <report>easy</report>
<!-- Specifies that we will use verify_200 for response verification -->
<verify_resp>verify_200</verify_resp>
+ <!-- Specifies that we will use the "easy" report generation -->
+ <report>easy</report>
</profile>
diff --git a/examples/round-robin.xml b/examples/round-robin.xml
index a71a4d0..103a458 100644
--- a/examples/round-robin.xml
+++ b/examples/round-robin.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file. They call me "round-robin.xml"
I am an example of a "round-robin" configuration. All of the URLs in
the urllist "Test Hosts" will be hit in sequential order.
@@ -63,15 +65,15 @@
We also have "keepalive" as an option - this option indicates that
we should attempt to use HTTP Keepalive when available. -->
<socket>generic</socket>
+ <!-- Specifies that we will use verify_200 for response verification
+ This verification step ensures that we received a 2xx or 3xx
+ status code from the server. -->
+ <verify_resp>verify_200</verify_resp>
<!-- Specifies that we will use the "relative_times" report generation
We also have "easy" - this option is similar to "relative_times",
but the times posted are absolute instead of relative to the start
of the request. -->
<report>relative_times</report>
- <!-- Specifies that we will use verify_200 for response verification
- This verification step ensures that we received a 2xx or 3xx
- status code from the server. -->
- <verify_resp>verify_200</verify_resp>
</profile>