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

> One more comment.  I am concerned about the efficiency when processing
> base64Binary or hexBinary.  It seems quite possible that applications will
> have extremely large content with these types (many megabytes). It would be
> desirable for the interface to allowed validating these types without
> keeping the entire instance of the datatype in memory.

How important is this capability?

I thought about this at the very beginning of the development (of Sun
XML Datatypes Library). But I abandoned this goal.

- Firstly, this change makes base64/hex validators stateful objects.
  - All other grammar primitives (ChoicePattern, etc) are stateless and
    therefore can be shared and reused; stateful objects can't. Sharing
    a grammar among multiple threads seemed important.
  - OTOH, changing validators to the factory objects that creates actual
    stateful validators seemed cumbersome to me.

- Secondly, it also affects the core validation code, which is another
  thing I don't want.

- Thirdly, if the performance is really a problem, you can always skip
  validating that specific part by modifying your grammar a little bit.
  The base64/hex decoders in the application will detect errors anyway.

Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems                   kohsuke.kawaguchi@eng.sun.com

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

Powered by eList eXpress LLC