<!ELEMENT drs (diagram) >
<!ATTLIST drs 
   xmlns:drs CDATA #FIXED "http://projects.gnome.org/dia/dia-render-script.dtd" >

<!ELEMENT diagram (meta|layer)* >
   
<!ELEMENT layer (object)*>
<!ATTLIST layer
   name CDATA #REQUIRED
   visible (true|false) #REQUIRED 
   active (true|false) #IMPLIED>

<!ELEMENT object (object|
		  set-linewidth|set-linecaps|set-linejoin|set-linestyle|set-dashlength|set-fillstyle|set-font|
		  line|polyline|rounded-polyline|polygon|
		  rect|rounded-rect|
		  arc|ellipse|
		  bezier|
		  string|image)* >
<!ATTLIST object
	type CDATA #IMPLIED >


<!ELEMENT set-linewidth EMPTY >
<!ATTLIST set-linewidth
	width CDATA #REQUIRED >

<!ELEMENT set-linecaps EMPTY >
<!ATTLIST set-linecaps
	mode (butt|round|projecting) #REQUIRED >

<!ELEMENT set-linejoin EMPTY >
<!ATTLIST set-linejoin
	mode (miter|round|bevel) #REQUIRED >

<!ELEMENT set-linestyle EMPTY >
<!ATTLIST set-linestyle
	mode (solid|dashed|dash-dot|dash-dot-dot|dotted) #REQUIRED >

<!ELEMENT set-dashlength EMPTY >
<!ATTLIST set-dashlength
	length CDATA #REQUIRED >

<!ELEMENT set-fillstyle EMPTY >
<!ATTLIST set-fillstyle
	mode (solid) #REQUIRED >

<!ELEMENT set-font EMPTY >
<!ATTLIST set-font
	family CDATA #REQUIRED
	height CDATA #REQUIRED
	description CDATA #IMPLIED
	slant CDATA #IMPLIED
	size CDATA #IMPLIED
	weight CDATA #IMPLIED>

<!ELEMENT line EMPTY >
<!ATTLIST line
	start CDATA #REQUIRED
	end CDATA #REQUIRED
	stroke CDATA #IMPLIED>

<!ELEMENT polyline EMPTY >
<!ATTLIST polyline
	points CDATA #REQUIRED
	stroke CDATA #IMPLIED>

<!ELEMENT rounded-polyline EMPTY >
<!ATTLIST rounded-polyline
	points CDATA #REQUIRED
	r CDATA #REQUIRED
	stroke CDATA #IMPLIED>

<!ELEMENT polygon EMPTY >
<!ATTLIST polygon
	points CDATA #REQUIRED
	stroke CDATA #IMPLIED
	fill CDATA #IMPLIED>

<!ELEMENT rect EMPTY >
<!ATTLIST rect
	lefttop CDATA #REQUIRED
	rightbottom CDATA #REQUIRED
	stroke CDATA #IMPLIED
	fill CDATA #IMPLIED>

<!ELEMENT rounded-rect EMPTY >
<!ATTLIST rounded-rect
	lefttop CDATA #REQUIRED
	rightbottom CDATA #REQUIRED
	r CDATA #REQUIRED
	stroke CDATA #IMPLIED
	fill CDATA #IMPLIED>

<!ELEMENT arc EMPTY >
<!ATTLIST arc
	center CDATA #REQUIRED
	width CDATA #REQUIRED
	height CDATA #REQUIRED
	angle1 CDATA #REQUIRED
	angle2 CDATA #REQUIRED
	stroke CDATA #IMPLIED
	fill CDATA #IMPLIED>

<!ELEMENT ellipse EMPTY >
<!ATTLIST ellipse
	center CDATA #REQUIRED
	width CDATA #REQUIRED
	height CDATA #REQUIRED
	stroke CDATA #IMPLIED
	fill CDATA #IMPLIED>

<!ELEMENT bezier EMPTY >
<!ATTLIST bezier
	bezpoints CDATA #REQUIRED
	stroke CDATA #IMPLIED
	fill CDATA #IMPLIED>

<!ELEMENT string ANY >
<!ATTLIST string
	pos CDATA #IMPLIED
	fill CDATA #IMPLIED
	alignment (left|right|center) #IMPLIED >

<!ELEMENT image EMPTY >
<!ATTLIST image
	point CDATA #REQUIRED
	width CDATA #REQUIRED
	height CDATA #REQUIRED
	uri CDATA #IMPLIED >
