# /research/projects/schematrans/seel/tutorial/seel-dtd.htm

originally: http://www.oclc.org/research/projects/schematrans/seel/tutorial/seel-dtd.htm

    <!ENTITY % seelnsprefix "seel">
    <!ENTITY % seelns "uri:ns:seel">

    <!--
      This is a DTD for version 0.1 of SEEL.
    -->

    <!ELEMENT translation (header, map+)>

    <!ELEMENT header (sourceschema, targetschema) >

    <!ELEMENT sourceschema EMPTY >
    <!ATTLIST sourceschema name CDATA #REQUIRED namespace CDATA #REQUIRED >

    <!ELEMENT targetschema EMPTY >
    <!ATTLIST targetschema name CDATA #REQUIRED namespace CDATA #REQUIRED >

    <!ELEMENT map (source, target)>
    <!ATTLIST map ID #REQUIRED >

    <!ELEMENT source (mainpath, context*, micro*)>

    <!ELEMENT target (mainpath, context*, micro*)>

    <!ELEMENT mainpath (trunk?, branch+)>

    <!ELEMENT trunk (step+) >

    <!ELEMENT branch (step+) >
    <!ATTLIST branch
    	bid CDATA #IMPLIED >

    <!ELEMENT step (value?) >
    <!ATTLIST step
    	name CDATA #IMPLIED
    	name_re CDATA #IMPLIED
    	namespace CDATA #IMPLIED
    	ns_re CDATA #IMPLIED
    	position CDATA #IMPLIED >

    <!ELEMENT value (#PCDATA | vmatch)* >
    <!ATTLIST value
    	scheme CDATA #IMPLIED
    	encoding CDATA #IMPLIED
    	language CDATA #IMPLIED
    	type CDATA #IMPLIED
    	transliteration CDATA #IMPLIED >

    <!ELEMENT vmatch EMPTY >
    <!ATTLIST vmatch
    	scheme CDATA #IMPLIED
    	encoding CDATA #IMPLIED
    	language CDATA #IMPLIED
    	type CDATA #IMPLIED
    	transliteration CDATA #IMPLIED
    	data CDATA #IMPLIED >

    <!ELEMENT path (step+) >
    <!ATTLIST path
    	for (source|target) #IMPLIED
    	place (under|after|before) #IMPLIED >

    <!ELEMENT transfer EMPTY >

    <!ELEMENT context (exists | equals | match)+ >
    <!ATTLIST context
    	bid CDATA #IMPLIED >

    <!ELEMENT exists (path) >

    <!ELEMENT equals ( (path, (path, transfer, value) ) | (value,transfer) ) >

    <!ELEMENT match ( transfer | path ) >
    <!ATTLIST match
    	negate CDATA #IMPLIED
    	regexp CDATA #IMPLIED >

    <!ELEMENT micro (add | remove | sub | trim)+>
    <!ATTLIST micro
    	bid CDATA #IMPLIED >

    <!ELEMENT add EMPTY>
    <!ATTLIST add
    	data CDATA #REQUIRED
    	side ( start | end ) #REQUIRED >

    <!ELEMENT remove EMPTY>
    <!ATTLIST remove
    	data CDATA #REQUIRED
    	side ( start | end ) #REQUIRED >

    <!ELEMENT sub EMPTY>
    <!ATTLIST sub
    	global CDATA #IMPLIED
    	regexp CDATA #REQUIRED
    	data CDATA #REQUIRED >

    <!ELEMENT trim EMPTY >