- From: Kumar Kumar <kumar_jobs@hotmail.com>
- Date: Thu, 04 Oct 2001 09:20:02 -0700
- To: xmlschema-dev@w3.org
Experts, 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. Thanks Kumar <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="DEPT"> <xsd:annotation> <xsd:documentation>Comment describing your root element</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="DEPTNO" nullable="false"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:enumeration value="10"/> <xsd:enumeration value="20"/> <xsd:enumeration value="30"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="DNAME" nullable="true"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="50"/> <xsd:pattern value="[A-Z]*[a-z]*"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="LOC" nullable="true"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="50"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> <?xml version="1.0" encoding="UTF-8"?> <DEPT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\workArea\vveluri\source\dept.xsd"> <!-- DEPT File @ThatOne company --> <DEPTNO>ABC</DEPTNO> <DNAME>123</DNAME> <LOC>HAYWARD</LOC> </DEPT> _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Received on Thursday, 4 October 2001 12:20:33 UTC