Hi,

 

When you say no code was generated did you check the descriptor classes?

 

The regular _expression_ checking goes on inside these, do you have a class called NHSNumberStructureDescriptor.java generated?

 

Cheers,

 

Andy.

 


From: smcelroy (sent by Nabble.com) [mailto:[EMAIL PROTECTED]
Sent: 11 January 2006 17:06
To: [email protected]
Subject: [castor-user] Does castor handle xsd:pattern

 

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.



CODA Wins 5th Accountancy Age Award in 5 Years

For details visit www.coda.com/winners





The information in this message is confidential and may be legally privileged. It may not be disclosed to, or used by, anyone other than the addressee. If you receive this message in error, please advise us immediately.

Internet emails are not necessarily secure. CODA does not accept responsibility for changes to any email which occur after the email has been sent. Attachments to this email may contain software viruses, which could damage your systems. CODA has checked the attachments for viruses before sending, but you should virus-check them before opening.

 

Reply via email to