On 4/19/05, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote:
> Hi Jochen, I was having some trouble with the default-value thing. The
> problem arises when default value handling fails (not parseable).
> Currently a SAXException is thrown, the problem is that it uses the
> following expression:
> 
> throw new LocSAXException(
>                     "Failed to convert string value to date instance: "
>                             + pValue, getLocator());
> 
> but getLocator() throws a IllegalStateException which states that the
> built-in type doesn't have a location (this is true for all primitive
> types I've tested).

If so, the method should possibly check, whether the locator can be
obtained in a try ... catch block and throw a simple SAXException
otherwise.


> Another problem I have is with hexBinary and base64. I don't know how to
> construct their initialization besides from the general method I
> proposed for AtomicTypeSG (using DatatypeConverter - i.e. runtime
> conversion).

Using the DatatypeConverter is, of course, fine.


> And last but not least is how to handle default values for
> enumerations... If TypedValue knew how to generate itself...

I suggest that you compare the default value with the EnumValue array.
That allows you
to pick up the name and return a reference to the generated constant.

Jochen


-- 
Outside of a dog, a book is man's best friend.
Inside of a dog, its too dark to read.
(Groucho Marx)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to