W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

XML - Schema Validation Issue

From: Kumar Kumar <kumar_jobs@hotmail.com>
Date: Thu, 04 Oct 2001 09:20:02 -0700
To: xmlschema-dev@w3.org
Message-ID: <F6HAoD7qGla5V7XNeNS0000781b@hotmail.com>

My name is kumar, I got your contact on the Net.

I have a questions with Schema, So I thought I will ask you, Since you have 
some exposure with Schemas and XMLs.

I was trying to create a test Schema and XML instance and I am trying to 
validate programatically. But My Parser is not validating.

I am enclosing my schema and xml file for your reference. Please inform if 
there is any wrong with the schema or xml file itself.

Whats the Target Name space, is it necessary to specify in my files.


<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	<xsd:element name="DEPT">
			<xsd:documentation>Comment describing your root 
				<xsd:element name="DEPTNO" nullable="false">
						<xsd:restriction base="xsd:integer">
							<xsd:enumeration value="10"/>
							<xsd:enumeration value="20"/>
							<xsd:enumeration value="30"/>
				<xsd:element name="DNAME" nullable="true">
						<xsd:restriction base="xsd:string">
							<xsd:maxLength value="50"/>
							<xsd:pattern value="[A-Z]*[a-z]*"/>
				<xsd:element name="LOC" nullable="true">
						<xsd:restriction base="xsd:string">
							<xsd:maxLength value="50"/>

<?xml version="1.0" encoding="UTF-8"?>
<DEPT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
<!-- DEPT File @ThatOne company -->

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Received on Thursday, 4 October 2001 12:20:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC