W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2003

Problems while using schemas......

From: Sudhir Deshmukh <sudhir.deshmukh@lionbridge.com>
Date: 06 Nov 2003 08:41:58 -0800
To: <www-xml-schema-comments@w3.org>
Message-ID: <CKENLJDCHGOIAPKNCMBIKELOCAAA.sudhir.deshmukh@mentorix.com>




Hi all,
I am using xml files for my programs which uses the XML Schema

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="tests">
		<xs:annotation>
			<xs:documentation>Schema for test data</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element name="class">
					<xs:complexType>
						<xs:complexContent>
							<xs:extension base="classType">
								<xs:attribute name="name" type="xs:string" use="required"/>
							</xs:extension>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="actionType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ISTRUE"/>
			<xs:enumeration value="EQUALS"/>
			<xs:enumeration value="NOTEQUALS"/>
			<xs:enumeration value="ISNULL"/>
			<xs:enumeration value="ISNOTNULL"/>
			<xs:enumeration value="GT"/>
			<xs:enumeration value="NOTGT"/>
			<xs:enumeration value="LT"/>
			<xs:enumeration value="NOTLT"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="anyType">
		<xs:sequence minOccurs="0" maxOccurs="unbounded">
			<xs:any namespace="##any" processContents="skip"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

some thing like this ...............

but while using this schema in following xml file


<?xml version="1.0" encoding="UTF-8"?>
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jtestcase.sourceforge.net/config/jtest
case-2.xsd">
	<class name="MyHashtableTest">
		<!-- global params -->
		<params>
			<param name="hashInit" type="java.util.Hashtable">
			<java.util.Map class-type="java.util.Hashtable"
key-type="java.lang.String" value-type="java.lang.String">
					<item>
						<key>k1</key>
						<value>value1</value>
					</item>
					<item>
						<key>k3</key>
						<value>value3</value>
					</item>
					<item>
						<key>k5</key>
						<value>value5</value>
					</item>
					<item>
						<key>k2</key>
						<value>value2</value>
					</item>
				</java.util.Map>
			</param>
		</params>
		<method name="testGet" test-case="positive-key-exists">
			<params>
				<param name="key" type="java.lang.String">k3</param>
			</params>

............
............
.............

Is showing the error to me ,,,,,,,,,,,,,,,,,,,


[Error] at line number, 2: Document is invalid: no grammar found.

[Error] at line number, 2: Document root element "tests", must match DOCTYPE
root "null".


PLZ can I get help from u in case of this errors .........................


Regards
Sudhir
Received on Thursday, 6 November 2003 11:44:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:01 UTC