Or try changing xsd:simpleContent to xsd:ComplexContent

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 6:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Please, can someone help me? It�s Urgent!


Hi Nelson,

The following lines cause trouble. According to schema spec (and the error
message), the only possible children of "extension" (in simpleContent) are
annotation, attribute, attributeGroup, and anyAttribute. So maxLength is
not allowed. Try change extension to restriction, which allows simpleType
facets.

<xsd:simpleContent>
  <xsd:extension base="xsd:string">
    <xsd:maxLength value="10"/>

Hope this helps,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
[EMAIL PROTECTED]



 

                    Nelson Miranda

                    <nmiranda@CPCI       To:     [EMAIL PROTECTED]

                    S.pt>                cc:

                                         Subject:     Please, can someone
help me?It�s Urgent!                     
                    07/16/2001

                    02:25 PM

                    Please respond

                    to

                    xerces-j-dev

 

 




I have an error, can someone help me?
I use the following declaration on schema that is in another archive and
I include the archive in my schema with the following mode

<xsd:include schemaLocation="ibRef.xsd"/>

------------------------------------------------------------

           <xsd:complexType name="TipoCodigoPostal">
                     <xsd:annotation>
                               <xsd:documentation>C�digo postal ( tipo
complexo
)</xsd:documentation>
                     </xsd:annotation>
                     <xsd:simpleContent>
                               <xsd:extension base="xsd:string">
                                          <xsd:maxLength value="10"/>
                                          <xsd:attribute name="pais" use
="required">
                                                    <xsd:simpleType>

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

<xsd:maxLength
value="3"/>

</xsd:restriction>
                                                    </xsd:simpleType>
                                          </xsd:attribute>
                               </xsd:extension>
                     </xsd:simpleContent>
           </xsd:complexType>

and when I parse the document with xerces give me the error below:


[Error] :2:205: Schema error: ComplexType 'TipoCodigoPostal': Only
annotations a
nd attributes are allowed in the content of an EXTENSION element for a
complexTy
pe with simpleContent.

can someone help me?

thanks.

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



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





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

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

Reply via email to