I notice there is also a related problem when mentioning a nested class type 
in a field definition, for example:

    <class name="com.syntricity.iserver.jdo.Lot"">
        ...
        <field name="parents" get-method="getParentLotList" 
                type="com.syntricity.iserver.jdo.Lot$LotList">
            <bind-xml name="parent-lots" node="element"/>
        ...
        </field>

    </class>
        ...
    <class name="com.syntricity.iserver.jdo.Lot$LotList">

        <field name="lots" type="string" collection="collection" 
            get-method="getLots">
            <bind-xml name="lot-id" node="element" />
        </field>

    </class>

will throw:
        ValidationException: "com.syntricity.iserver.jdo.Lot$LotList" is not a valid 
NMToken.; when first loading the mapping file.

Removing the "type" attribute in the "parents" field, however, (which I guess 
allows Castor to introspect) works fine and allows the inner class to be used 
as expected.

Gerry

On Thursday 09 May 2002 02:08 pm, Keith Visco wrote:
> It's not meant to be a regular expression, however the type is a string.
>
> The DTD says NMTOKEN, but it's wrong. It should be CDATA.
>
>
> The mapping.xsd (XML Schema) is correct:
>
>  <!-- Allows overriding the matching rule -->
>  <xsd:attribute name="matches" type="xsd:string" use="optional"/>
>
> You can use '*', or a space separated list of names.
>
> --Keith
>
> [EMAIL PROTECTED] wrote:
> > the "matches" attribute in the "bind-xml" element is specified to be of
> > type NMTOKEN
> >
> > should that not be a more generic type such as string?
> > NMTOKEN excludes characters such as '*' and '+' which are very useful in
> > regular expressions.
> > or was that the intended behaviour?
> >
> > -Tony
> >
> > -----------------------------------------------------------
> > 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

-- 
'Tis more blessed to give than receive; for example, wedding presents.
                -- H.L. Mencken

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

Reply via email to