[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dtd for eduml
Hey, I've been off and on this list for a while, and off for the last
three weeks. But, I just recieved an XML book for Christmas, and
wanted to try stuff out. So, this is a version of a DTD for the XML
document given by EDUML (XML) v0.6 (dec 13 1998). Version 0.6 was the
most recent version I was able to find in the mail archives. I'm sure
this DTD is not complete or even exactly accurate, but I wanted to
submit it to the list to see what you all thought. It's (sparsely!)
commented.
Notes:
+, ?, and * all retain their usual meanings. Same comment tags as
HTML. I wasn't sure how to handle the locale stuff, so I left it alone.
We need to look at what elements and information should be required.
Everything that doesn't have a ? or * by it is required.
I would have run them (the sample XML and the DTD) through a parser
myself, but I don't have access (unless you know of any that run on
Win3.1, the only computer I have easy access to). According to the
book I have, doing that is what is known as 'validating' the XML. In
this case, I'm sure it would point out areas of needed improvement in
the DTD as well.
Dan
-------------
<?XML version="1.0"?>
<!-- DTD v0.1 for eduml v0.6 Dan Moore 1/1/99 -->
<!ELEMENT edu (locale?,school,scale,issuer,library?)>
<!ELEMENT locale ANY>
<!-- I'm not quite sure how to deal with this. do we want to allow
any two letter country abbrevs to be attributes of a tag, and those
attribs to be followed by the translation of that tag into the
language? if so, I don't quite know how to represent it -->
<locale> // internationalization (optional)
<school fr="ecole" es="escuela" eo="lernejo"/>
<name fr="nom" es="nombre" eo="nomo"/>
<fax fr="facsimile" eo="faksimilo"/>
<phone fr="telephone" eo="telefono"/>
<snail en="address" fr="adresse" eo="posxto"/>
<contact eo="komuniko"/>
etc...
</locale>
<!ELEMENT school (name,contact+,learner+,course+,room+)>
<!-- a school contains exactly one name, and at least one contact,
learner, course and room -->
<!ATTLIST school schoolid ID> <!-- changed, because id ID seemed weird-->
<!ELEMENT name (#PCDATA)>
<!-- a name element contains only character data -->
<!ELEMENT contact (snail,fax,phone,email?,url?)>
<!ELEMENT snail (#PCDATA)>
<!ELEMENT fax (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT learner (password,id,name,contact,style*,stakeholder+,course+)>
<!-- a learner element contains one password, id, name, and contact
element. it also has any number of style elems, and at least
one stakeholder and course elem. -->
<!ELEMENT password (#PCDATA)>
<!ELEMENT id (#PCDATA)>
<!ATTLIST id type (national|provincial|school board|school)>
<!ELEMENT name (given,alias*,middle*,birthday,family,pronounce?)>
<!ELEMENT given (#PCDATA)>
<!ELEMENT alias (#PCDATA)>
<!ELEMENT middle (#PCDATA)>
<!ELEMENT birthday (#PCDATA)>
<!ELEMENT family (#PCDATA)>
<!ELEMENT pronounce (#PCDATA)>
<!ELEMENT contact (snail,fax,phone,email?,url?)>
<!ELEMENT snail (#PCDATA)>
<!ELEMENT fax (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT style (#PCDATA)>
<!ELEMENT stakeholder (name,note,contact)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT note (#PCDATA)>
<!ELEMENT contact (snail,phone,email?)>
<!ATTLIST contact when (night|day|emergency) where (home|work)>
<!ELEMENT snail (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT course (start,act,end)>
<!ATTLIST course id ID> <!-- ID is unique to doc, i think-->
<!ELEMENT start (#PCDATA)>
<!ELEMENT act (date,comment,scale,mark,time,marker)>
<!ATTLIST act id ID>
<!ELEMENT date (#PCDATA)>
<!ELEMENT comment (#PCDATA)>
<!ELEMENT scale (#PCDATA)>
<!ATTLIST scale id ID>
<!ELEMENT mark (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT marker (#PCDATA)>
<!ELEMENT end (#PCDATA)>
<!ELEMENT course (name, mentor,contact,path)>
<!ATTLIST course id ID>
<!ELEMENT name (#PCDATA)>
<!ELEMENT mentor (#PCDATA)>
<!ELEMENT contact (room,email?)>
<!ELEMENT room (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT path (plo)>
<!ATTLIST path id ID>
<!ELEMENT plo (high,weight)>
<!ATTLIST plo id ID>
<!ELEMENT high (#PCDATA)>
<!ELEMENT weight (#PCDATA)>
<!ATTLIST weight type (relative|absolute)>
<!ELEMENT room (name,contact,schedule)>
<!ATTLIST room id ID>
<!ELEMENT name (#PCDATA)>
<!ELEMENT contact (#PCDATA)>
<!ELEMENT schedule (course)>
<!ELEMENT course (#PCDATA)
<!ATTLIST course id ID> <!-- this might be a place to use IDREF-->
<!-- assessment -->
<!ELEMENT scale (description,high,list?)>
<!ATTLIST scale id ID>
<!ELEMENT description (#PCDATA)>
<!ELEMENT high (#PCDATA)>
<!ELEMENT mark (#PCDATA)>
<!ELEMENT issuer (name,contact,plo)>
<!ATTLIST issuer id ID>
<!ELEMENT name (#PCDATA)>
<!ELEMENT contact (email,snail,url?)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT snail (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT plo (plo,name,alias,act)>
<!ATTLIST plo id ID>
<!ELEMENT plo EMPTY>
<!ATTLIST plo id IDREF> <!-- I think this might do what we want
( refer back to the prereq or coreq? ) -->
<!ELEMENT name (#PCDATA)>
<!ELEMENT alias (#PCDATA)>
<!ELEMENT act (item+)> <!-- wouldn't you want the act to have
a tag to show markedness or unmarkedness?-->
<!ATTLIST act id ID>
<!ELEMENT item (style,listref,list,script)>
<!ATTLIST item type CDATA> <!-- can put anything but <, > and &-->
<!ELEMENT style (#PCDATA)>
<!ELEMENT listref (#PCDATA)>
<!ELEMENT list (#PCDATA)>
<!ELEMENT script (#PCDATA)>
<!ATTLIST script id (perl|tcl|python|shell|etc) library CDATA>
<!ELEMENT act (item+)>
<!ATTLIST act id ID>
<!ELEMENT item (style,script)>
<!ATTLIST item type CDATA>
<!ELEMENT style (#PCDATA)>
<!ELEMENT script (#PCDATA)>
<!ATTLIST script id (perl|tcl|python|shell|etc) library CDATA>
<!-- library catalog -->
<!ELEMENT library (catalogue_system,item+)>
<!ATTLIST library id ID>
<!ELEMENT catalogue_system (#PCDATA)>
<!ELEMENT item (catalogue_code,barcode,title,author,
subtitle?,date,cost,isbn,pub,notes?,loan+)>
<!ATTLIST item id ID>
<!ELEMENT catalogue_code (#PCDATA)>
<!ELEMENT barcode (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT subtitle (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT cost (#PCDATA)>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT notes (#PCDATA)>
<!ELEMENT loan (learner,start,duration,overdue,end)>
<!ELEMENT learner (#PCDATA)>
<!ELEMENT start (#PCDATA)>
<!ELEMENT duration (#PCDATA)>
<!ELEMENT overdue (#PCDATA)>
<!ELEMENT end (#PCDATA)>