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 Monday, 3 March 2003 17:28:59 UTC