OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: Datatype interface for RELAX NG

> > void check(String literal, ContextProvider context) throws
> > DataTypeException;
> >
> > This is like accept, except that it throws an exception for a literal
> > is not a member of the datatype.
> Do you mind if I change its signature to
> DataTypeException diagnose( String literal, ContextProvide context )
>                 [ throws UnsupportedOperationException ]
> I don't want to write try...catch close everytime I need a diagnosis
> message.
> ?

Why not?  Many users will want an exception to be thrown in this case.

> > I don't think DataType.displayName is necessary.
> I want this method for formatting error messages.

What exactly would it return?  What, for example, would it return for
xsd:string?  If it's "string", doesn't the application already know this?
If it's something else, don't you need a Locale parameter as well?

> > accept => allows/accepts or contains
> Just out of curiosity...   Why "allows" and not "allow"?  And why "check",
> not "checks"?

It reads better:

  if A contains B, then check C

contains is part of an assertion, check is a command.  Compare:





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC