- validation dtd and example of snapsot data

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@766 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
paolo 2006-07-15 11:23:05 +00:00
parent 6ea402f012
commit 8a43216527
2 changed files with 71 additions and 0 deletions

33
data/example-snaphot.xsgp Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<!DOCTYPE sgpem SYSTEM "sgpem.dtd">
<sgpem>
<resources>
<resource name="Resource 1" id="reskey2" arrival-time="0" how-many="1" pre-emptible="false"/>
<resource name="Invalid? Resource &lt;n&gt; 1" id="reskey3" arrival-time="0" how-many="1" pre-emptible="false"/>
</resources>
<schedulables>
<process name="Process 1" priority="2" arrival-time="0">
<threads>
<thread name="Process 1 - Thread 1" priority="6" arrival-delta="2" lasts-for="0">
<requests>
<request arrival-time="3">
<subrequest resource="2" how-many="2" lasts-for="5"/>
</request>
</requests>
</thread>
<thread name="Process 1 - Thread 2" priority="5" arrival-delta="3" lasts-for="0">
<requests/>
</thread>
</threads>
</process>
<process name="Process 2" priority="3" arrival-time="7">
<threads/>
</process>
<process name="Process 3" priority="1" arrival-time="9">
<threads/>
</process>
<process name="Invalid? &lt;process/&gt; &amp;3 or\4" priority="1" arrival-time="9">
<threads/>
</process>
</schedulables>
</sgpem>

38
data/sgpem.dtd Normal file
View File

@ -0,0 +1,38 @@
<!ELEMENT sgpem (resources, schedulables)>
<!ENTITY % text "#PCDATA">
<!ELEMENT schedulables (process)*>
<!ELEMENT process (threads)>
<!ATTLIST process
name CDATA #IMPLIED
priority CDATA #IMPLIED
arrival-time CDATA #REQUIRED >
<!-- <!ELEMENT threads (thread)+> -->
<!ELEMENT threads (thread)*>
<!ELEMENT thread (requests)>
<!ATTLIST thread
name CDATA #IMPLIED
priority CDATA #IMPLIED
arrival-delta CDATA #IMPLIED
lasts-for CDATA #REQUIRED >
<!ELEMENT resources (resource)*>
<!ELEMENT resource EMPTY>
<!ATTLIST resource
name CDATA #IMPLIED
id ID #REQUIRED
arrival-time CDATA #REQUIRED
how-many CDATA #IMPLIED
pre-emptible (true | false) "false" >
<!ELEMENT requests (request)*>
<!ELEMENT request (subrequest)+>
<!ATTLIST request
arrival-time CDATA #REQUIRED >
<!ELEMENT subrequest EMPTY>
<!ATTLIST subrequest
resource IDREF #REQUIRED
how-many CDATA #IMPLIED
lasts-for CDATA #REQUIRED >