[xsd-users] xsd:pattern

Boris Kolpackov boris at codesynthesis.com
Tue Oct 28 06:42:17 EDT 2008


Hi Karina,

Abayeva, Karina <karina.abayeva at rbccm.com> writes:

> I am trying to specify xsd:pattern restriction in my XSD as follows:
>   <xs:simpleType name="TenorType">
>     <xs:restriction base="xs:string">
>       <xs:pattern value="([0-9]+[B|D|W|M|Y)" />
>     </xs:restriction>
>   </xs:simpleType>
> 
> However, when I generate the class, no code is generated to validate
> against this pattern.

I assume you are using the C++/Tree mapping. In C++/Tree validation
is performed by the underlying XML parser (Xerces-C++) during XML 
parsing.

If you are looking for an in-memory validation then you may find the
following earlier post informative:

http://www.codesynthesis.com/pipermail/xsd-users/2008-January/001443.html

Boris




More information about the xsd-users mailing list