[Home] [By Thread] [By Date] [Recent Entries]

  • To: <xml-dev@l...>
  • Subject: Schema Sanity Check
  • From: "Steven Livingstone" <s.livingstone@b...>
  • Date: Thu, 22 Aug 2002 18:44:58 +0100
  • Importance: Normal

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



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member