W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2003

Text and elements as childs?

From: Svend Bent Nielsen <jawsoap@hotmail.com>
Date: Tue, 14 Oct 2003 13:33:57 +0000
To: xmlschema-dev@w3.org
Message-ID: <BAY7-F113kiZrAEXCUO0000f6d2@hotmail.com>

Hello again, and thank you for the last solution Jeni.

I have looked quite a bit, and have found nothing showing how to have 
elements that can have both text and elements as childs.

All examples are for markup like this

<author>
  <firstname>Svend</firstname>
  <surname>Nielsen</surname>
</author>

<xs:element name="author">
  <xs:complextype>
    <xs:element name="firstname" type="xs:string"/>
    <xs:element name="surname" type="xs:string"/>
  </xs:complextype>
</xs:element>

But I need something that can have both xs:string and other elements, using 
the above example it would be like this:

<author>
  This is an incompetent author.
  <firstname>Svend</firstname>
  <surname>Nielsen</surname>
</author>

How do I describe this in schema?

Sincerely,
Svend Bent Nielsen

_________________________________________________________________
Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/
Received on Tuesday, 14 October 2003 09:36:21 GMT

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