[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Difference between xs:simpleType & xs:complexType

From: Chuck Herrick <cherrick@spamcop.net>
Date: Mon, 16 Apr 2007 08:55:18 -0500
Message-ID: <20070416085518.3j869wokwkws80k4@webmail.spamcop.net>
To: xmlschema-dev@w3.org
RE: Difference between xs:simpleType & xs:complexType

I believe if you want an element to have an attribute, that element
must be a complexType.

>
> Complex types allow element children, simple types don't.
>
> So <a><b/></a> has a complex type, while <a>ddd</a> has a simple
> type.
>
> "Complex types with simple content" allow attributes but not child
> elements,
> for example
>
> <a b="1">ddd</a>
>
> A complex type with "Mixed content" allows character data as well
> as child
> elements, for example
>
> <p>Some <i>italic</i> text</p>
>
> The only time there's any confusion is with empty elements <a/>,
> which can
> be modelled as either complex or simple depending on your whim.
>
> Michael Kay
> http://www.saxonica.com/
>
>
> > -----Original Message-----
> > From: xmlschema-dev-request@w3.org
> > [mailto:xmlschema-dev-request@w3.org] On Behalf Of selvam
> > Sent: 16 April 2007 11:44
> > To: xmlschema-dev@w3.org
> > Subject: Difference between xs:simpleType & xs:complexType
> >
> >
> > Hi,
> > Can anyone help me in explaining the difference between the
> > xs:simpleType & xs:complexType?
> >
> > I am bit confused with these two.
> >
> > Please explain these two with the proper example.
> >
> > When should we go for simpleType and when should we  go for
> > xs:complexType?
> >
> > Also explain about simplexContent and complexContent?
> >
> > Thanks
> > Selvam
> > --
> > View this message in context:
> > http://www.nabble.com/Difference-between-xs%3AsimpleType---xs%
> > 3AcomplexType-tf3583684.html#a10013797
> > Sent from the w3.org - xmlschema-dev mailing list archive at
> > Nabble.com.
> >
> >
> >
>
>
>
>


--
Chuck Herrick
mailto:cherrick@spamcop.net
512 289 0926 (cell)
830 839 4437 (home)
Received on Monday, 16 April 2007 13:55:33 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.