W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2003

RE: FW: XQuery schema to defintion question

From: Todd A. Mancini <todd.mancini@daxat.com>
Date: Wed, 5 Mar 2003 09:17:45 -0500
To: "'Mary Fernandez'" <mff@research.att.com>, <public-qt-comments@w3.org>
Cc: "'Paul Cotton'" <pcotton@microsoft.com>
Message-ID: <000001c2e322$107cc200$0201a8c0@qodfathr>

Mary,

Thanks for the reply.  I agree with your definitions and see my error.

	-Todd

-----Original Message-----
From: Mary Fernandez [mailto:mff@research.att.com] 
Sent: Monday, March 03, 2003 5:25 PM
To: public-qt-comments@w3.org; todd.mancini@daxat.com
Cc: Paul Cotton
Subject: Re: FW: XQuery schema to defintion question

On Thu, 2003-02-27 at 14:56, Paul Cotton wrote:
 -----Original Message-----
> From: Todd A. Mancini [mailto:todd.mancini@daxat.com] 
> Sent: February 26, 2003 8:51 PM
> To: public-qt-comments@w3.org
> Subject: XQuery schema to defintion question
> 

Todd,
Here is how I think the Schema type below would map
into the internal type system (I didn't double check
the formal rules)

define type blockEnum { Anon1 | Anon2 }
define type Anon1 restricts xs:string { xs:string }
define type Anon2 restricts xs:string { xs:string* }

All types are defined at the top level, even those
with anonymous names.  The only difference between
user-defined types and anonymous types is that 
the former are global and the latter are local (and
their names are system generated)

Hope that helps
Mary

> Given the following fragment of a schema (taken from Microsoft's
> simplified xsdschema.xsd which ships with Visual Studio.NET):
> 
> <simpleType name="blockEnum">
> 	<union>
> 		<simpleType>
> 			<restriction base="string" >
> 				<enumeration value="#all" />
> 			</restriction>
> 		</simpleType>
> 		<simpleType>
> 			<list>
> 				<simpleType>
> 					<restriction base="string">
> 						<enumeration
> value="substitution" />
> 						<enumeration
> value="extension" />
> 						<enumeration
> value="restriction" />
> 					</restriction>
> 				</simpleType>
> 			</list>
> 		</simpleType>
> 	</union>
> </simpleType>
> 
> is the following the appropriate definition written in the type
system?
> 
> define type blockEnum {( [Anon2] restrict xs:string { xs:string }  )*
|
> [Anon1] restrict xs:string { xs:string } }
> 
> Note that there are no separate global type definitions for [Anon1]
and
> [Anon2].
> 
> 	Thanks,
> 	-Todd
> 
> 
-- 
Mary Fernandez, Principal Technical Staff Member  
AT&T Labs - Research, 180 Park Ave., Room E243, Florham Park, NJ
07932-0971 
phone: 973-360-8679,  fax: 973-360-8187
mff@research.att.com, http://www.research.att.com/~mff  
Received on Wednesday, 5 March 2003 09:18:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT