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

RE: Two quick questions regarding restriction in XML Schema


RE:  Two quick questions regarding restriction in XML Schema
> -----Original Message-----
> From: Murali Mani [mailto:mani@C...]
> Sent: Saturday, 18 May 2002 2:44 AM
> To: Dare Obasanjo
> Cc: Eddie Robertsson; Nada Reinprecht; xml-dev@l...
> Subject: RE:  Two quick questions regarding restriction in XML
> Schema
>
>
>
> I hope to finish the report soon, of course (couple of days at most), I
> will try to announce it on the list, and to you people who have helped me
> immensely.
>
> I have one question regarding extension:
> can we define the following types
> type Book -> (Title, Author+)
> type Book1 extends Book -> (Title, Author+, Title)

<snip/>

Hi. W3C schema example of what you request.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:complexType name="Book">
		<xs:sequence>
			<xs:element name="Title" type="xs:string"/>
			<xs:element name="Author" type="xs:string" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Book1">
		<xs:complexContent>
			<xs:extension base="Book">
				<xs:sequence>
					<xs:element name="Title" type="xs:string"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>

Regards
Michael



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.