I passed a few of the searches through XMLSpy's DTD generator, and came up
with a DTD that I /think/ covers the searches definition.

Basically, in english, a search must have a name, description, category,
link, and script.  It may also contain one contributor, one email, and any
number of forms.

A description contains tables, divs and brs.

A table contains trs, a tr contains tds.

A form contains zero or more inputs.

There are a bunch of attributes too, but basically what I want confirmation
of is that I've covered all the bases.  I validated gg.xml against the dtd,
and it passed with flying colours - I assume it's the most complex of the
searches, though since I know it didn't have the email tag, there may be
other optional tags that I've missed.

I'll paste the text here, since I can't access CVS from work:

--- PASTE BEGIN ---
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT br EMPTY>
<!ELEMENT category (#PCDATA)>
<!ELEMENT contributor (#PCDATA)>
<!ELEMENT description (#PCDATA | br | div | table)*>
<!ELEMENT div (#PCDATA)>
<!ATTLIST div
        class CDATA #REQUIRED
>
<!ELEMENT email (#PCDATA)>
<!ELEMENT form (input+)>
<!ATTLIST form
        name CDATA #REQUIRED
        method CDATA #REQUIRED
        action CDATA #REQUIRED
>
<!ELEMENT input EMPTY>
<!ATTLIST input
        type CDATA #REQUIRED
        name CDATA #REQUIRED
        value CDATA #IMPLIED
>
<!ELEMENT link (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT script (#PCDATA)>
<!ELEMENT search (name, description, category, link, contributor?, email?,
form*, script)>
<!ATTLIST search
        function CDATA #REQUIRED
>
<!ELEMENT table (tr)*>
<!ATTLIST table
        class CDATA #REQUIRED
>
<!ELEMENT td (#PCDATA)>
<!ELEMENT tr (td)*>
--- PASTE END ---





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to