Thanks Rhett,

That is indeed the problem.  When I made the change to the dtd locally from
a NMTOKEN to a CDATA my validation was fine.  And it looks as though Castor
does no type of validation of the mapping xml file at load time, correct?
Otherwise, my mapping file would not work since it points to a DTD that
would fail validation.  Is the DTD in place more as a development aid to
make sure you have correct syntax?  

Anyone know if there is anything that I can do to help get this into a
defect/bug/enhancement list?  Or actually fix the problem?  The change that
needs to be made is in the http://castor.exolab.org/mapping.dtd:

from this:

<!ELEMENT sql EMPTY>
<!ATTLIST sql
    name        NMTOKENS  #IMPLIED
    type        NMTOKENS  #IMPLIED
    many-key    NMTOKENS  #IMPLIED
    many-table  NMTOKEN  #IMPLIED
    read-only   ( true | false )  "false"
    dirty  ( check | ignore )  "check">


to this:

<!ELEMENT sql EMPTY>
<!ATTLIST sql
    name        NMTOKENS  #IMPLIED
    type        CDATA    #IMPLIED     <---note change here.
    many-key    NMTOKENS  #IMPLIED
    many-table  NMTOKEN  #IMPLIED
    read-only   ( true | false )  "false"
    dirty  ( check | ignore )  "check">

thanks,
chad.


Hi,

On Wednesday, November 27, 2002, at 10:49  AM, Chad Small wrote:
> Could this be a problem with the DTD 
> (http://castor.exolab.org/mapping.dtd)?
> Not recognizing the "char[NY]" syntax for the "type" attribute?  If 
> so, is
> there a way that this can be resolved or put on a defect list?

Yes, the problem is that brackets are not allowed in NMTOKENs (see 
http://www.w3.org/TR/REC-xml#sec-common-syn ).  The DTD should probably 
be changed to use CDATA instead of NMTOKENS.

Rhett
=====================================================
| Rhett Sutphin
| Research Assistant (Software)
| Coordinated Laboratory for Computational Genomics
|   and the Center for Macular Degeneration
| University of Iowa - Iowa City, IA 52242 - USA
| 4111 MEBRF - email: [EMAIL PROTECTED]
=====================================================


> thanks,
> chad.
>
> -----Original Message-----
> From: Chad Small [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 3:54 PM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] type="char[NY]" validation error
>
>
> I have this these mapping elements:
>
>       <field name="deleted" type="boolean" required="false" direct="false"
> lazy="false">
>          <sql name="is_deleted" type="char[NY]" dirty="ignore"/>
>
> that gives a validation error of:
>       Error:  line (21) Attribute value "char[NY]" of type NMTOKENS must
> be one or more name tokens.
>
> What is wrong?  It functions fine, but doesn't validate against the
> "http://castor.exolab.org/mapping.dtd";?
>
> thanks,
> chad.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to