Ben Collins-Sussman <sussman at newton.collab.net <mailto:sussman at
newton.collab.net>> wrote:
> OK, we have no formal DTD for the XML which "drives" our editor
> callbacks, but ...
Well then, perhaps we should have one. I'm no XML expert, so this is an
ideal opportunity for me to start learning about XML DTDs, hehe. Here
goes ...
Brane
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML DTD for Subversion's delta packages. -->
<!ELEMENT delta-pkg (tree-delta, text-delta*)>
<!-- Delta types. -->
<!ELEMENT prop-delta (set | delete)+>
<!ELEMENT text-delta (#PCDATA)>
<!ATTLIST text-delta
id CDATA #IMPLIED
>
<!ELEMENT text-delta-ref EMPTY>
<!ATTLIST text-delta-ref
id CDATA #REQUIRED
>
<!ELEMENT tree-delta (add | delete | replace)+>
<!-- Delta instructions. -->
<!ELEMENT add (dir | file)>
<!ATTLIST add
name CDATA #REQUIRED
>
<!ELEMENT delete EMPTY>
<!ATTLIST delete
name CDATA #REQUIRED
>
<!ELEMENT replace (dir | file)>
<!ATTLIST replace
name CDATA #REQUIRED
>
<!ELEMENT set (#PCDATA)>
<!ATTLIST set
name CDATA #REQUIRED
>
<!-- Delta targets. -->
<!ELEMENT dir ((prop-delta, tree-delta?) | (tree-delta, prop-delta?))?>
<!ATTLIST dir
ancestor CDATA #IMPLIED
ver CDATA #IMPLIED
>
<!ELEMENT file ((prop-delta, (text-delta | text-delta-ref)?) |
((text-delta | text-delta-ref), prop-delta?))?>
<!ATTLIST file
ancestor CDATA #IMPLIED
ver CDATA #IMPLIED
>
Received on Sat Oct 21 14:36:08 2006