W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2004

RE: Error during the validating of XML Schema

From: Ferrari GIanni <Ferrari.gi@apss.tn.it>
Date: Wed, 4 Feb 2004 10:28:04 +0100
Message-ID: <D11D57B75A3CD411BF7F00E018C3356F01865DCA@NTGEN05>
To: xmlschema-dev@w3.org
Thank you,

now i understand. So my parser give me the error because in the XML Schema
find an attribute empty, instead in the XML Schema the attribute is
required. Infact a string empty is "" instead a type integer empty have to
be "0" and not "". 

But, now I have a strange error. Look under this:

 

[Error] InvoiceXML.xml:8:83: cvc-complex-type.2.1: Element 'Service' must
have no character or element information item [children], because the type's
content type is empty.

 

And in my XML Schema, I declared the Element "Service" like:

 

<xsd:element name="DocumentSender" type="StructCompany" minOccurs="1"
maxOccurs="1"/>

 

<xsd:complexType name="StructCompany">

            <xsd:sequence>

<xsd:element name="Service" type="AttrService" minOccurs="0" maxOccurs="1"/>

                        ......

            </xsd:sequence>

</xsd:complexType>

 

 

....

<xsd:complexType name="AttrService">

            <!-- Codice Servizio: centro di costo o di prelievo -->

            <xsd:attribute name="ServId" type="xsd:string" use="required"/>

            <!-- Nome Servizio -->

            <xsd:attribute name="ServName" type="xsd:string"
use="required"/>

            <!-- Responsabile del Servizio -->

            <xsd:attribute name="ServResponsible" type="xsd:string"
use="required"/>

            <!-- Telefono del servizio -->

            <xsd:attribute name="ServPhone" type="xsd:string"
use="optional"/>

</xsd:complexType> 

 

So in my XXML Document I'll have:

...

<DocumentSender>

<Service ServPhone="" ServResponsible="" ServName=""
ServId="">#PCDATA</Service>

</DocumentSender>

 

What it the strange thing? Only an expert person like you can help me. Thank
you so much again.

Regards

   Gianni

 
Received on Wednesday, 4 February 2004 04:27:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT