Does castor handle xsd:pattern?

I tried to generate code for the following xml. Code was generated for the NHSNumberStructure complexType, but none of the others.

I am using castor 0.9.9

If castor does not deal with patterns what is the best work around? If castor should deal with patterns am I doing something wrong?

 
Thanks.

 

      <xsd:simpleType name="NationalInsuranceNumberType">

            <xsd:restriction base="xsd:string">

                  <xsd:pattern value="[A-CEGHJ-NOPR-TW-Z]{2}[0-9]{6}[ABCD\s]{1}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="UniqueTaxReferenceType">

            <xsd:restriction base="xsd:string">

                  <xsd:pattern value="[0-9]{10}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="PassportNumber_OldType">

            <xsd:restriction base="core:PopulatedStringType">

                  <xsd:pattern value="[A-Z,0-9]{1}[0-9]{4}[A-Z,0-9]{1}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="PassportNumber_NewType">

            <xsd:restriction base="xsd:int">

                  <xsd:pattern value="[0-9]{9}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="DriverNumberType">

            <xsd:restriction base="core:PopulatedStringType">

                  <xsd:pattern value="[A-Z,0-9]{5}[0-9][0,1,5,6][0-9]([0][1-9]|[1-2][0-9]|[3][0,1])[0-9][A-Z,0-9]{3}[A-Z]{2}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:complexType name="NHSnumberStructure">

            <xsd:sequence>

                  <xsd:choice>

                        <xsd:element name="EWregNHSnumber" type="DigNHSnumberType"/>

                        <xsd:element name="SregNHSnumber" type="CharNHSnumberType"/>

                        <xsd:element name="NIregNHSnumber" type="CharNHSnumberType"/>

                  </xsd:choice>

            </xsd:sequence>

      </xsd:complexType>

      <xsd:simpleType name="DigNHSnumberType">

            <xsd:restriction base="core:PopulatedStringType">

                  <xsd:pattern value="[0-9]{10}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="CharNHSnumberType">

            <xsd:restriction base="core:PopulatedStringType">

                  <xsd:maxLength value="18"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="ElectoralRollNumberType">

            <xsd:restriction base="core:PopulatedStringType">

                  <xsd:pattern value="[A-Z]{2,3}[0-9]{1,4}"/>

            </xsd:restriction>

      </xsd:simpleType>

      <xsd:simpleType name="UniquePupilNumberType">

            <xsd:restriction base="xsd:string">

                  <xsd:pattern value="[A-HJ-NP-RT-Z][0-9]{11}[0-9A-HJ-NP-RT-Z]"/>

            </xsd:restriction>

      </xsd:simpleType>

 


View this message in context: Does castor handle xsd:pattern
Sent from the Castor - User forum at Nabble.com.

Reply via email to