Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Can XSD simple types be derived from complex types?

Reply
Thread Tools

Can XSD simple types be derived from complex types?

 
 
Soren Kuula
Guest
Posts: n/a
 
      11-30-2005
Looks like a silly question? I'm in doubt!

- the Recommendation does it (anyType / anySimple type)

- it's possible to restrict away all optional elements and attributes
from a mixed complex type. If doing that on a type where all elements
and attributes are optional, does that leave one with the equivalent of
anySimpleType, then?

Soren
 
Reply With Quote
 
 
 
 
Soren Kuula
Guest
Posts: n/a
 
      11-30-2005
Soren Kuula wrote:
> Looks like a silly question? I'm in doubt!
>
> - the Recommendation does it (anyType / anySimple type)
>
> - it's possible to restrict away all optional elements and attributes
> from a mixed complex type. If doing that on a type where all elements
> and attributes are optional, does that leave one with the equivalent of
> anySimpleType, then?
>
> Soren


-- or is the answer: It's possible enough in the way I said, but XSD
doesn't provide for it syntactically?

Soren
 
Reply With Quote
 
 
 
 
Henry S. Thompson
Guest
Posts: n/a
 
      12-01-2005
Soren Kuula writes:

> Looks like a silly question? I'm in doubt!
>
> - the Recommendation does it (anyType / anySimple type)


That's special-cased.

> - it's possible to restrict away all optional elements and attributes
> from a mixed complex type. If doing that on a type where all elements
> and attributes are optional, does that leave one with the equivalent
> of anySimpleType, then?


Not really -- such a type defn would have untyped content, not quite
the same as anySimpleType -- _but_ you can derive a complex type defn
with simple content, e.g. xs:date, from an emptiable mixed complex
type defn.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: http://www.velocityreviews.com/forums/(E-Mail Removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option between simple OR complex types in an XML Schema? Steve XML 1 06-14-2007 04:45 PM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 01:44 PM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 12:07 AM
Problem with local complex or simple types in Apache Axis mjcsfo XML 0 08-14-2003 03:53 PM
Problem with local complex or simple types in Apache Axis mjcsfo Java 0 08-14-2003 03:53 PM



Advertisments