Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


XSD - trying to understand complextypes

XSD - trying to understand complextypes

XSD - trying to understand complextypes

I have been given a set of XSD documents by a company in order to pass them data. They are a huge sprawling series of interconnecting types and it is taking hours to unravel it all.

I am fairly new to XML and completely new to XSD so I have been learning a lot, but I am stumped by one section of XML:


<xs:complexType name="btx" mixed="true">
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element ref="FT"/>
			<xs:element ref="P"/>

	<xs:element name="P" type="btx"/>

	<xs:complexType name="ft" mixed="true">
		<xs:complexContent mixed="true">
			<xs:extension base="btx">
				<xs:attribute name="TYPE">
						<xs:restriction base="xs:NMTOKEN">
							<xs:enumeration value="REFOJ"/>
							<xs:enumeration value="SUB"/>
							<xs:enumeration value="SUP"/>

	<xs:element name="FT" type="ft"/> 

From what I can work out whenever an Element has a Type of "btx" it is supposed to contain text, a description or some information, but I can't work out where to put any text... All the other elements which contain text have a simpleType of xs:string. Can I assume that the "P" element can contain text?

If I can supply any extra code to make this more clear, please let me know.

Thanks very much.

Occasional sparks in a darkened room

RE: XSD - trying to understand complextypes


<xs:complexType name="btx" mixed="true"> 

When the mixed attribute is "true", character data is allowed to appear between the child elements of the complexType element being described.

Tom Morrison
Micro Focus

RE: XSD - trying to understand complextypes

That explains my confusion! Thanks very much

Occasional sparks in a darkened room

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close