[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?


Jochen

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

Reply via email to