<?xml version='1.0' encoding="UTF-8"?>

<!-- root element -->
<!ELEMENT device-ident (device+) >

<!--
	device element is a container element for device identification units.

	Matching is based on a number of criteria and is defined through the match attribute
	on the device identification definition.  <code>match</code> defines combinations
	of identification units that result in a positive match for the device.  "all",
	"*" and "any" are predefined and  reserved where "all" is the default and "any"
	and "*" are equivalent.  <code>match</code> may also contain a list of identification
	unit "id" attribute value combinations.  Match "id" combinations are separated by the pipe
	character "|".  A combination can be built from one or more id attribute values
	from the contained identification units (separated by commas).  If an identification unit
	doesn't have an "id" attribute value set a pseudo id value will be assigned based on it's
	index in the identification set (base 1 index).

	    Examples:
	    1.  Same as match="all".  Only a positive match on all the
		identification units result in a positive match on the device.
		This is the default.
	    <device name="xxx">
		<http-req-header name="AAA" value="aaa" />
		<http-req-param name="BBB" value="bbb" />
	    </device>

	    2.  A positive match on any of the identification units result in a positive
		match on the device.  match="*" is equivalent to match="any".
	    <device name="xxx" match="any">
		<http-req-header name="AAA" value="aaa" />
		<http-req-param name="BBB" value="bbb" />
	    </device>

	    3.  A positive match on identification units (1) or (2 and 3) or (3 and 4)
		result in a poitive match on the device.
	    <device name="xxx" match="1|2,3|3,4">
		<http-req-header id="1" name="AAA" value="aaa" />
		<http-req-header id="2" name="BBB" value="bbb" />
		<http-req-header id="3" name="CCC" value="ccc" />
		<http-req-param id="4" name="DDD" value="ddd" />
	    </device>
-->
<!ELEMENT device ((http-req-header+) | (http-req-param+) | (http-req-header+, http-req-param+) | (http-req-param+, http-req-header+)) >
<!ATTLIST device
	name 	CDATA 		#REQUIRED
	match 	CDATA 		#IMPLIED
>

<!-- identification unit base attributes -->
<!ENTITY % identunit
	"id 	CDATA 		#IMPLIED
     name 	CDATA 		#REQUIRED
	 value 	CDATA 		#REQUIRED"
>

<!-- HTTP request header identification unit. -->
<!ELEMENT http-req-header EMPTY >
<!ATTLIST http-req-header %identunit; >

<!-- HTTP request parameter identification unit. -->
<!ELEMENT http-req-param EMPTY >
<!ATTLIST http-req-param %identunit; >
