[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Datatype interface extension
> There's an interaction with the other methods here. If the datatype is not > context-dependent, then the context arguments to checkValid, isValid and > createStreamingValidator methods should be allowed to be null. Otherwise a > null context argument should result in a NullPointerException. This > interaction makes it tricky to put the methods relating to the compatibility > spec on a separate interface, which would generally be a good thing. As you now know, I'm a lousy programmer but I can't see any problem in saying that the context parameter of the isValid/checkValid/createStreamingValidator methods can be null, but the datatype can throw ContextRequiredException (or something like NullPointerException or IllegalArgumentException ) regardless of its support of the DTD compatibility spec. > static final int ID_TYPE_NULL = 0; > static final int ID_TYPE_ID = 1; > static final int ID_TYPE_IDREF = 2; > static final int ID_TYPE_IDREFS = 3; > int getIdType(); > > While we're changing things, I think you should add > > String getBaseUri() > > to ValidationContext, since the spec explicitly includes a base URI in the > validation context. > > I would also suggest in the javadoc comments > > - Limiting line length to 80 chars > - Capitalizing the first character to a sentence. Will do. regards, -- Kohsuke KAWAGUCHI +1 650 786 0721 Sun Microsystems kohsuke.kawaguchi@sun.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC