next up previous
Next: About this document ... Up: Building Bayesian Networks with Previous: Known Problems with the

Appendix B: DTD for XML Files

<!- Samuel Luckenbill, Yale University, 10/14/2001 ->
<!- DTD for Bayesian Networks for the BaySim application ->

<!- The Root of the Network ->
<!ELEMENT network (variables | structure | distributions)>
<!ATTLIST network type (bayesian|factor) "bayesian">

<!- The Random Variables in the Network ->
<!ELEMENT variables (variable)+>
<!ELEMENT variable (description | statename+)>
<!ATTLIST variable name CDATA #REQUIRED type (discrete|continuous)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT statename (#PCDATA)>
<!ATTLIST statename value CDATA #REQUIRED>

<!- The Strurcture of the Network ->
<!ELEMENT structure (connect)*>
<!ELEMENT connect EMPTY>
<!ATTLIST connect parent CDATA #REQUIRED child CDATA #REQUIRED>

<!- The Distributions for the Random Variables ->
<!ELEMENT distributions (distribution)+>
<!ELEMENT distribution (var | set? | probabilities)>
<!ATTLIST distribution type CDATA #REQUIRED>
<!ELEMENT var EMPTY> <!ATTLIST var name CDATA #REQUIRED>
<!ELEMENT set (element)+>
<!ELEMENT element EMPTY>
<!ATTLIST element index CDATA #REQUIRED name CDATA #REQUIRED>
<!ELEMENT probabilities (probability)+>
<!ELEMENT probability (#PCDATA)>
<!ATTLIST probability indeces CDATA #REQUIRED>



Samuel Luckenbill 2002-05-08