You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sandy Gao <sa...@ca.ibm.com> on 2003/08/18 21:47:40 UTC

Re: [Jeffery B. Rancier] newbie schema question

 <xsd:complexType name="databaseType">
   <xsd:sequence>
     <xsd:element name="table" type="tableType" maxOccurs="unbounded"/>
   </xsd:sequence>
   <xsd:attribute name="datasource" type="xsd:string" use="required"/>
 </xsd:complexType>

HTH,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com



                                                                                                                                
                      jeff.rancier@soft                                                                                         
                      echnics.com              To:       xerces-j-user@xml.apache.org                                           
                      (Jeffery B.              cc:                                                                              
                      Rancier)                 Subject:  [Jeffery B. Rancier] newbie schema question                            
                                                                                                                                
                      08/18/2003 03:45                                                                                          
                      PM                                                                                                        
                      Please respond to                                                                                         
                      xerces-j-user                                                                                             
                                                                                                                                
                                                                                                                                




X-From-Line: nobody Mon Aug 18 15:25:58 2003
To: xerces-j-user@xml.apache.org
Subject: newbie schema question
From: jeff.rancier@softechnics.com (Jeffery B. Rancier)
Date: Mon, 18 Aug 2003 15:25:54 -0400
Message-ID: <uw...@softechnics.com>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt)
Lines: 104
Xref: JRANCIER sent-to-misc:2152
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===-=-="

Hello All.
Can anyone tell me the proper syntax for grouping attributes and
elements in a complexType?  (if that's even my problem) I have the
following complexType:

,----
| <xsd:complexType name="databaseType">
|   <xsd:attribute name="datasource" type="xsd:string" use="required"/>
|   <xsd:element name="table" type="tableType" maxOccurs="unbounded"/>
| </xsd:complexType>
`----

And I'm getting the following error:

,----
| [Error] sgdb.xsd:32:73: s4s-elt-invalid-content.1: The content of
'databaseType'
|  is invalid.  Element 'element' is invalid, misplaced, or occurs too
often.
`----

I've tried placing the xsd:sequence grouping around, but that
complained about the attribute.  Thanks in advance.  Also, attached
are is the schema and the instance document.  Any advice would be
greatly appreciated.




--
Thanks,
Jeff

,----
| Jeffery B. Rancier
|
| Softechnics
| a METTLER TOLEDO company
`----


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

#### sgdb.xsd has been removed from this note on August 18 2003 by Sandy
Gao
#### untitled.xml has been removed from this note on August 18 2003 by
Sandy Gao



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: [Jeffery B. Rancier] newbie schema question

Posted by "Jeffery B. Rancier" <je...@softechnics.com>.
"Sandy Gao" <sa...@ca.ibm.com> writes:

>  <xsd:complexType name="databaseType">
>    <xsd:sequence>
>      <xsd:element name="table" type="tableType" maxOccurs="unbounded"/>
>    </xsd:sequence>
>    <xsd:attribute name="datasource" type="xsd:string" use="required"/>
>  </xsd:complexType>
>
> HTH,

You bet it does.  Thanks.  Designing the schema from a sample document
led me to placing the attribute first.  I'll look at the w3 site for
the schema spec.  Thanks again Sandy.
-- 
Thanks,
Jeff

,----
| Jeffery B. Rancier
| 
| Softechnics
| a METTLER TOLEDO company
`----


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org