On Tue, 2005-08-16 at 23:47 +0200, Jochen Wiedmann wrote:
> [EMAIL PROTECTED] wrote:
>
> > Does JAXME provides some check for string patterns? Or rather must be the
> > service developer who takes care of this?
>
> Currently it doesn't. It should, though, because the JAXB specification
> requires that patterns are being checked.
>
> > <simpleType name="UKPostcode">
> > <restriction base="ipo:Postcode">
> > <pattern value="[A-Z]{2}\d\s\d[A-Z]{2}"/>
> > </restriction>
> > </simpleType>
> >
> >
> > Who checks that a UKPostcode string is valid?
>
> Adding this check is basically trivial: It would be sufficient, to add a
> method "getPattern()" to the class AtomicTypeSG (much like the same
> classes "getMaxLength()" and add an application of the pattern to the
> class StringSG (again, roughly comparable to the already existing check
> for maxLength.)
>
> The main problem here is, that these patterns are almost definitely
> different from Java regular expressions. In other words, if you could
> supply a converter of xs patterns to regular expressions, the remaining
> work would be 15 minutes work. Any ideas?use the compliant regular expression engine developed for xerces? probably better to copy the source across and repackage than add a dependency to a single class. - robert
signature.asc
Description: This is a digitally signed message part
