users@jaxb.java.net

Re: Datatype conversion problem

From: Marcus Walls <marcus.walls_at_aspective.com>
Date: Fri, 06 Jun 2003 18:25:36 +0100

Kohsuke Kawaguchi wrote:

>Since doing a length check sounds simple enough to me, I took
>that to mean you are asking the question mainly to find out the
>"right" way to do it.

The cost I was referring to was not being able to have unmarshall-
time validation - I would prefer unmarshall time validation as this
has more location information when reporting validation errors.

What would really fix the problem, is a hook that allows some
processing to occur prior to schema validation.

Thus if the current process is simplistically:

  1. load the doc.
  2. validate constraints
  3. perform custom datatype conversions (parseMethod)

I'd like to be able to have a preprocessMethod which works in the
same way as the parseMethod and printMethod customisations. i.e.

  1. load the doc.
1.5. apply preprocessMethod customisation
  2. validate constraints
  3. perform custom datatype customisations

I guess this is way too big a request though. But if you've got
any useful pointers as to how (or rather if) I can modify the
generated runtime to implement this sort of behaviour that would
be rather grand!

Regards,

Marcus