Hi guys,

I have a problem concerning the valitation with XML Schema. I used
several example files for validation, here is a Java-Class, a schema
file and an XML file that I got from the newsgroup archive.

It seems like the program is validating, but for whatever example I use,
I get an error for each element. I suppose something's wrong, but I
haven't got a clue.

Thanks for Help.

Hinrich

The error Messages when calling "java Validator temp.xml":

:java/xerces_examples > java Validator temp.xml
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 2:102
Element type "temp" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 3:9
Element type "three" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 4:7
Element type "six" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 5:8
Element type "four" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 6:8
Element type "five" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 7:7
Element type "two" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 8:7
Element type "one" must be declared.
[error] file:///Users/hinrich/lang/java/xerces_examples/temp.xml 9:9
Element type "seven" must be declared.
warnings:    0
errors:      8
fatalErrors: 0
document is invalid

Attachment: Validator.java
Description: application/unknown-content-type-java_auto_file

<?xml version="1.0" encoding="UTF-8"?>

<temp xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="temp.xsd">

	<three>3</three>

	<six>6</six>

	<four>4</four>

	<five>5</five>

	<two>2</two>

	<one>1</one>

	<seven>7</seven>

</temp>



Attachment: temp.xsd
Description: application/unknown-content-type-xsd_auto_file

Reply via email to