DNA DTD file

<?xml version="1.0"?> <!-- -*-coding: utf-8;-*- -->

<!-- DTD for DNA RPC XML.
Dave Love <d.love@dl.ac.uk>
Copyright (C) 2001 Daresbury Laboratory
License: GNU GPL.

$Revision: 1.1.1.1 $, $Date: 2003/01/31 14:57:19 $
-->

<!-- Entities potentially abstracting types.
Here's yet another reason (the abstraction attempt) for avoiding
attributes. -->
<!ENTITY % CDATA "(#PCDATA)" > <!-- Can't use CDATA content in XML elements -->
<!ENTITY % NUMBER "CDATA" > <!-- ... or NUMBER in attributes -->
<!ENTITY % Ang "%CDATA;"> <!-- resolution or wavelength in -->
<!ENTITY % ANG "CDATA"> <!-- resolution or wavelength (attribute) -->
<!ENTITY % angle "%CDATA;"> <!-- angle in degrees (what convention?) -->
<!ENTITY % ANGLE "CDATA"> <!-- angle (attribute) -->
<!ENTITY % integer "%CDATA;" >
<!ENTITY % mm "%CDATA;"> <!-- distance in mm -->
<!ENTITY % MM "CDATA"> <!-- distance in mm (attribute) -->
<!ENTITY % time "%CDATA;"> <!-- time in seconds (real number) -->

<!-- The set of RPCs -->
<!ELEMENT input (collect_start | collect_end | index_start)+ >

<!-- Start collection procedure -->
<!ELEMENT collect_start (data_set+) >
<!-- & grouping isn't allowed in XML :-( -->
<!ELEMENT data_set (resolution, exposure_time, phi_start,
phi_end, oscillation_range, no_passes,
wavelength, directory,
filename_template, first_image_number,
slit?) >
<!ATTLIST data_set id %NUMBER; #REQUIRED >

<!ELEMENT resolution %Ang; >
<!ELEMENT wavelength %Ang; >
<!ELEMENT directory %CDATA; >
<!ELEMENT filename_template %CDATA; >
<!ELEMENT first_image_number %integer; >
<!ELEMENT exposure_time %time; >
<!ELEMENT phi_start %angle; >
<!ELEMENT phi_end %angle; >
<!ELEMENT oscillation_range %angle; >
<!ELEMENT no_passes %integer; >

<!-- End collection procedure -->
<!ELEMENT collect_end EMPTY >

<!-- Indexing procedure -->
<!ELEMENT index_start (project, fileinfo, image+, detector?,
beamline?, data_collection?, cell?, symmetry?) >
<!-- Pseudo-keyworded stuff with empty elements, sigh. -->
<!ELEMENT project EMPTY >
<!-- id2 was required in the minuted example, but making it optional
seems better. Fixme: How many option ids should there actually be? -->
<!ATTLIST project
id1 CDATA #REQUIRED
id2 CDATA #IMPLIED
id3 CDATA #IMPLIED
id4 CDATA #IMPLIED >
<!ELEMENT fileinfo EMPTY >
<!ATTLIST fileinfo
directory CDATA #REQUIRED
filename_template CDATA #REQUIRED >
<!ELEMENT image EMPTY >
<!ATTLIST image
no %NUMBER; #REQUIRED
phi_start %ANGLE; #IMPLIED >
<!ELEMENT detector EMPTY >
<!-- type should probably be enumerated -->
<!ATTLIST detector
type CDATA #REQUIRED
gain CDATA #REQUIRED
x_pixelsize %MM; #REQUIRED
y_pixelsize %MM; #REQUIRED >
<!ELEMENT beamline EMPTY >
<!ATTLIST beamline
divergence CDATA #REQUIRED
polarization CDATA #REQUIRED >
<!ELEMENT data_collection EMPTY >
<!ATTLIST data_collection
wavelength %ANG; #REQUIRED
distance %MM; #REQUIRED
phi_range %ANGLE; #REQUIRED
x_beam %MM; #REQUIRED
y_beam %MM; #REQUIRED >
<!ELEMENT cell EMPTY >
<!ATTLIST cell
a %ANG; #REQUIRED
b %ANG; #REQUIRED
c %ANG; #REQUIRED
alpha %ANGLE; #REQUIRED
beta %ANGLE; #REQUIRED
gamma %ANGLE; #REQUIRED >
<!ELEMENT symmetry EMPTY >
<!ATTLIST symmetry sym CDATA #REQUIRED >

<!-- Collection result -->
<!ELEMENT collect_output (status, data_set_id, error_message) >
<!ELEMENT status %CDATA; > <!-- Fixme: type? -->
<!ELEMENT data_set_id %CDATA; >
<!ELEMENT error_message %CDATA; >

<!-- Indexing result
Fixme: I'm not sure I understand how this should be. -->
<!ELEMENT index_output (project, status, solution+) >
<!ELEMENT solution (symmetry?, cell, orientation_matrix) >
<!ATTLIST solution
no_reflections_used %NUMBER; #REQUIRED
no_reflections_rejected %NUMBER; #REQUIRED
rms_spot_deviation %MM; #REQUIRED
x_beam_updated %MM; #REQUIRED
y_beam_updated %MM; #REQUIRED
laue_group CDATA #REQUIRED
penalty CDATA #IMPLIED >
<!ELEMENT orientation_matrix EMPTY >
<!-- Fixme: enumerate type -->
<!ATTLIST orientation_matrix
type CDATA #REQUIRED
program (mosflm | denzo | dps | dtrek) #REQUIRED
e11 CDATA #REQUIRED
e12 CDATA #REQUIRED
e13 CDATA #REQUIRED
e21 CDATA #REQUIRED
e22 CDATA #REQUIRED
e23 CDATA #REQUIRED
e31 CDATA #REQUIRED
e32 CDATA #REQUIRED
e33 CDATA #REQUIRED >

<!-- I think the following would be better: -->
<![IGNORE[
<!ELEMENT solution (reflections_used, reflections_rejected, 
rms_spot_deviation, x_beam, y_beam, laue_group, 
penalty, cell, orientation_matrix, symmetry?) >
<!ELEMENT reflections_used %integer; >
<!ELEMENT reflections_rejected %integer; >
<!ELEMENT rms_spot_deviation %mm; >
<!-- No need to distinguish updated x and y. -->
<!ELEMENT laue_group %CDATA; >
<!ELEMENT penalty %CDATA; >
]]>


Last Updated: 5-October-2001 by Steve Kinder