Menu

#20 DTD is invalid

CVS
open
5
2006-01-12
2006-01-12
No

The DTD isn't valid and consequently can't be used to
validate XML schema files.

* Several references to #CDATA, which doesn't exist
(should be #PCDATA)

* Syntax for the sql ATTLIST is totally wrong (commas
in, missing defaults)

* The document element of the DTD is defined as
'adodb_schema' when clearly the root is intended to be
'schema'.

I have corrected the DTD so that it can be used to
validate a schema file. The corrected version is
attached. It was based on the one from CVS.

Discussion

  • sam marshall (OU)

    Valid DTD

     
  • Laurens Holst

    Laurens Holst - 2007-07-02

    Logged In: YES
    user_id=798154
    Originator: NO

    I confirm this problem.

    Another issue that the attachment doesn’t take care of is that the DTD file is wrapped in:

    <?xml version="1.0"?>
    <!DOCTYPE schema [
    ...
    ]>

    Eclipse throws a fit over this, and I don’t think it is correct for a DTD to contain this, it would be a standalone document while the DTD is referenced with <!DOCTYPE schema SYSTEM "../adodb_lite/xmlschema.dtd">.

    ~Grauw

     
  • Laurens Holst

    Laurens Holst - 2007-07-02

    Logged In: YES
    user_id=798154
    Originator: NO

    I don’t seem to be able to attach files, so I can’t attach an updated version of sam marshall’s file. But to correct it, simply remove the mentioned first two and last line from the DTD file.

    Developer: it would be nice if you could check this in, with the mentioned modifications, so that it can find its way into ADOdb and ADOdb lite.

    Thanks.

    ~Grauw

     
  • Laurens Holst

    Laurens Holst - 2007-07-02

    Logged In: YES
    user_id=798154
    Originator: NO

    Also, the values for the field’s type attribute must be adjusted:

    Old: <!ATTLIST field name CDATA #REQUIRED type (C|C2|X|X2|B|D|T|L|I|F|N) #REQUIRED size CDATA #IMPLIED opts CDATA #IMPLIED>

    New: <!ATTLIST field name CDATA #REQUIRED type (C|C2|X|X2|XL|B|D|T|L|I|I1|I2|I4|I8|F|N) #REQUIRED size CDATA #IMPLIED opts CDATA #IMPLIED>

    ~Grauw

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.