<!-- BoCA component XML description DTD -->

<!ENTITY % BoCA.Version "-//DTD BoCA 1.0 Draft//EN">

<!ELEMENT component (name, version, id, type, require*, replace*, conflict*, precede*, succeed*, format*, input*, tagspec*, external*, parameters?)>

	<!ELEMENT name (#PCDATA)>

	<!ELEMENT version (#PCDATA)>
	<!ATTLIST version debug (true|false) "false">

	<!ELEMENT id (#PCDATA)>

	<!ELEMENT type (#PCDATA)>
	<!ATTLIST type threadSafe (true|false) "true">

	<!ELEMENT require (#PCDATA)>
	<!ELEMENT replace (#PCDATA)>
	<!ELEMENT conflict (#PCDATA)>
	<!ELEMENT precede (#PCDATA)>
	<!ELEMENT succeed (#PCDATA)>

	<!ELEMENT format (name, lossless?, extension+, companion*, tag*)>

		<!ELEMENT lossless (#PCDATA)>
		<!ELEMENT extension (#PCDATA)>
		<!ELEMENT companion (#PCDATA)>

		<!ELEMENT tag (#PCDATA)>
		<!ATTLIST tag id   NMTOKEN		  #REQUIRED
			      mode (prepend|append|other) #REQUIRED>

	<!ELEMENT input EMPTY>
	<!ATTLIST input float	 (true|false) "false"
			signed	 (true|false) "true"
			bits	 CDATA #IMPLIED
			channels CDATA #IMPLIED
			rate	 CDATA #IMPLIED>

	<!ELEMENT tagspec (name, coverart?, encodings?)>
	<!ATTLIST tagspec default (true|false) "true">

		<!ELEMENT coverart (#PCDATA)>
		<!ATTLIST coverart supported (true|false) "false"
				   default   (true|false) "true">

		<!ELEMENT prependzero (#PCDATA)>
		<!ATTLIST prependzero allowed (true|false) "false"
				      default (true|false) "false">

		<!ELEMENT encodings (encoding*)>
		<!ATTLIST encodings free (true|false) "false">

			<!ELEMENT encoding (#PCDATA)>
			<!ATTLIST encoding default (true|false) #IMPLIED>

	<!ELEMENT external (command, arguments, mode, (informat?, outformat?), parameters?)>

		<!ELEMENT command (#PCDATA)>
		<!ATTLIST command ignoreExitCode (true|false) "false">

		<!ELEMENT arguments (#PCDATA)>
		<!ELEMENT mode (#PCDATA)>
		<!ELEMENT informat (#PCDATA)>
		<!ELEMENT outformat (#PCDATA)>

		<!ELEMENT parameters (switch | selection | range)*>

			<!ELEMENT switch (requires*, depends*)>
			<!ATTLIST switch name	  CDATA	#REQUIRED
					 argument CDATA	#REQUIRED
					 enabled  (true|false) "false"
					 hidden	  (true|false) "false">

			<!ELEMENT selection (requires*, depends*, option+)>
			<!ATTLIST selection name     CDATA   #REQUIRED
					    argument CDATA   #REQUIRED
					    enabled  (true|false) "false"
					    default  NMTOKEN #IMPLIED
					    hidden   (true|false) "false">

				<!ELEMENT option (#PCDATA)>
				<!ATTLIST option alias CDATA #IMPLIED>

			<!ELEMENT range (requires*, depends*, min, max)>
			<!ATTLIST range name	 CDATA	 #REQUIRED
					argument CDATA	 #REQUIRED
					enabled	 (true|false) "false"
					default	 NMTOKEN #IMPLIED
					step	 NMTOKEN #IMPLIED
					hidden	 (true|false) "false">

				<!ELEMENT min (#PCDATA)>
				<!ATTLIST min alias CDATA #IMPLIED>

				<!ELEMENT max (#PCDATA)>
				<!ATTLIST max alias CDATA #IMPLIED>

			<!ELEMENT requires (#PCDATA)>
			<!ATTLIST requires option CDATA #IMPLIED
					   args   CDATA #IMPLIED
					   stream (stdout|stderr) "stdout">

			<!ELEMENT depends (#PCDATA)>
			<!ATTLIST depends setting CDATA	#REQUIRED
					  state	  (enabled|disabled) "enabled"
					  value	  CDATA #IMPLIED>

		<!ELEMENT md5 (#PCDATA)>
		<!ATTLIST md5 stream  (stdout|stderr) "stdout"
			      require CDATA #IMPLIED
			      prefix  CDATA #IMPLIED>
