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

RE: Schema Sanity Check

  • To: "Steven Livingstone" <s.livingstone@b...>,<xml-dev@l...>
  • Subject: RE: Schema Sanity Check
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Thu, 22 Aug 2002 11:24:16 -0700
  • Thread-index: AcJKA74YbnlE5DgNS8quwYhC5skI4QAA1zOV
  • Thread-topic: Schema Sanity Check

xsd xml check
Looking at the complex type definition for the ur-type[0] we note that its {content type} has a particle whose {term} is a sequence whose {particles} contains a single {term} which is wildcard with namespace constraint set to any. 
 
In short, the content of a complex type of type xs:anyType is anything from any namespace. However, the default value of processContents[1] for a wildcard is strict meaning that a schema must be provided for each of the elements [or attributes] that appear in the content model. 
 
So you can either provide a schema for all the extra elements and attributes appearing as part of the <first> element or create a type whose wildcard has processContents set to skip or lax and use that type instead of xs:anyType. 
 
 
[0] http://www.w3.org/TR/xmlschema-1/#ur-type-itself 
[1] http://www.w3.org/TR/xmlschema-1/#process_contents

	-----Original Message----- 
	From: Steven Livingstone [mailto:s.livingstone@b...] 
	Sent: Thu 8/22/2002 10:44 AM 
	To: xml-dev@l... 
	Cc: 
	Subject:  Schema Sanity Check
	
	

	Do the following Schema and instance look ok?
	I keep getting an error saying the "<b>" elements are not declared, but
	the type if first is anyType so should this not be anything I want??
	Tried using MSXML 4.0 and .Net Schema classes.
	
	<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">      
	        <xsd:element name="name">
	                <xsd:complexType>
	                        <xsd:sequence>
	                                <xsd:element name="first"
	type="xsd:anyType" />          
	                                <xsd:element name="middle"
	type="xsd:string" />
	                                <xsd:element name="last"
	type="xsd:string" />                           
	                        </xsd:sequence>        
	                </xsd:complexType>
	        </xsd:element>
	</xsd:schema>
	
	<?xml version="1.0"?>
	<name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	        xsi:noNamespaceSchemaLocation="schema.xsd">
	        <first><b>Steven</b></first>
	        <middle />
	        <last>Livingstone-Perez</last> 
	</name>
	
	Thanks,
	Steven
	
	
	
	-----------------------------------------------------------------
	The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
	initiative of OASIS <http://www.oasis-open.org>
	
	The list archives are at http://lists.xml.org/archives/xml-dev/
	
	To subscribe or unsubscribe from this list use the subscription
	manager: <http://lists.xml.org/ob/adm.pl>
	
	


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.