Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Difference between xs:simpleType & xs:complexType

From: Chuck Herrick <cherrick@-------.--->
To: xmlschema-dev@--.---
Date: 4/16/2007 3:55:00 AM
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@w...
> > [mailto:xmlschema-dev-request@w...] On Behalf Of selvam
> > Sent: 16 April 2007 11:44
> > To: xmlschema-dev@w...
> > 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@s...
512 289 0926 (cell)
830 839 4437 (home)

From lists@n... Mon Apr 16 14:23:02 2007
Received: from aji.w3.org ([133.27.228.225])
	by frink.w3.org


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent