aspose file tools*
The moose likes XML and Related Technologies and the fly likes Error in xml schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Error in xml schema" Watch "Error in xml schema" New topic
Author

Error in xml schema

MONZY THARIAN
Ranch Hand

Joined: Feb 21, 2001
Posts: 63
Dear All,
while executing the java program it is giving this runtime error.
can any one please explain me the problem ?
The xsd file is there in the default directory.
==========Error==================
org.jdom.input.JDOMParseException: Error on line 5 of document
file:///D:/monzy/XML/XMLTEST/editor.xml: Value "editor.xsd" is not valid schemaLocation syntax.
anyURI must be followed by schema file
======xml file header
<!DOCTYPE htmlEditor >
<htmlEditor
xmlns="http://www.xml-schema.com/examples/schema/Editor"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.xml-schema.com/examples/schema/Editor editor.xsd">
===========
Regards


Think Big . So shall you become big.
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
Hi
What does this line do
MONZY THARIAN
Ranch Hand

Joined: Feb 21, 2001
Posts: 63
Hi Rahul,
This is the xsd schema file.
=============================
<schema targetNamespace="http://www.xml-schema.com/examples/schema/Editor"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:e="http://www.xml-schema.com/examples/schema/Editor"
elementFormDefault="qualified">

<annotation>
<documentation xml:lang="en">
Editor document definition defines an html based editor
</documentation>
</annotation>

<element name="htmlEditor" type="e:HtmlEditorType"/>

<element name="updateTime" type="dateTime"/>

<complexType name="HtmlEditorType">
<sequence>
<element ref="e:updateTime" minOccurs="1" maxOccurs="1" />
<element name="fields" type="e:Fields" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>

<complexType name="Fields">
<sequence>
<element name="field" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="shortDesc" type="string" minOccurs="1" maxOccurs="1"/>
<element name="htmlType" type="e:HtmlTypeType" minOccurs="1" maxOccurs="1"/>
<element name="allowNull" type="boolean" minOccurs="1" maxOccurs="1" />
<element name="defaultVal" type="string"/>
</sequence>
<attribute name="columnName" type="string" use="required"/>
</complexType>
</element>
</sequence>
</complexType>

<complexType name="HtmlTypeType">
<sequence>
<element name="name" type="string" />
<element name="value" type="string" />
</sequence>
<attribute name="name" type="e:HtmlNameType" use="required"/>
</complexType>

<simpleType name="HtmlNameType">
<restriction base="NMTOKEN">
<enumeration value="select"/>
<enumeration value="text"/>
</restriction>
</simpleType>
</schema>
MONZY THARIAN
Ranch Hand

Joined: Feb 21, 2001
Posts: 63
Hi Rahul,
This is the xsd schema file.
=============================
<schema targetNamespace="http://www.xml-schema.com/examples/schema/Editor"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:e="http://www.xml-schema.com/examples/schema/Editor"
elementFormDefault="qualified">

<annotation>
<documentation xml:lang="en">
Editor document definition defines an html based editor
</documentation>
</annotation>

<element name="htmlEditor" type="e:HtmlEditorType"/>

<element name="updateTime" type="dateTime"/>

<complexType name="HtmlEditorType">
<sequence>
<element ref="e:updateTime" minOccurs="1" maxOccurs="1" />
<element name="fields" type="e:Fields" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>

<complexType name="Fields">
<sequence>
<element name="field" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="shortDesc" type="string" minOccurs="1" maxOccurs="1"/>
<element name="htmlType" type="e:HtmlTypeType" minOccurs="1" maxOccurs="1"/>
<element name="allowNull" type="boolean" minOccurs="1" maxOccurs="1" />
<element name="defaultVal" type="string"/>
</sequence>
<attribute name="columnName" type="string" use="required"/>
</complexType>
</element>
</sequence>
</complexType>

<complexType name="HtmlTypeType">
<sequence>
<element name="name" type="string" />
<element name="value" type="string" />
</sequence>
<attribute name="name" type="e:HtmlNameType" use="required"/>
</complexType>

<simpleType name="HtmlNameType">
<restriction base="NMTOKEN">
<enumeration value="select"/>
<enumeration value="text"/>
</restriction>
</simpleType>
</schema>
MONZY THARIAN
Ranch Hand

Joined: Feb 21, 2001
Posts: 63
Hi Rahul,
This is the xsd schema file.
=============================
<schema targetNamespace="http://www.xml-schema.com/examples/schema/Editor"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:e="http://www.xml-schema.com/examples/schema/Editor"
elementFormDefault="qualified">

<annotation>
<documentation xml:lang="en">
Editor document definition defines an html based editor
</documentation>
</annotation>

<element name="htmlEditor" type="e:HtmlEditorType"/>

<element name="updateTime" type="dateTime"/>

<complexType name="HtmlEditorType">
<sequence>
<element ref="e:updateTime" minOccurs="1" maxOccurs="1" />
<element name="fields" type="e:Fields" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>

<complexType name="Fields">
<sequence>
<element name="field" minOccurs="1" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="shortDesc" type="string" minOccurs="1" maxOccurs="1"/>
<element name="htmlType" type="e:HtmlTypeType" minOccurs="1" maxOccurs="1"/>
<element name="allowNull" type="boolean" minOccurs="1" maxOccurs="1" />
<element name="defaultVal" type="string"/>
</sequence>
<attribute name="columnName" type="string" use="required"/>
</complexType>
</element>
</sequence>
</complexType>

<complexType name="HtmlTypeType">
<sequence>
<element name="name" type="string" />
<element name="value" type="string" />
</sequence>
<attribute name="name" type="e:HtmlNameType" use="required"/>
</complexType>

<simpleType name="HtmlNameType">
<restriction base="NMTOKEN">
<enumeration value="select"/>
<enumeration value="text"/>
</restriction>
</simpleType>
</schema>
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Monzy, could you delete 2 of the 3 (almost?) identical posts you've made in this thread? You can accomplish this in the "Edit" view by selecting the "Delete post" checkbox and clicking "Edit Post".
Thanks.
[ September 10, 2003: Message edited by: Lasse Koskela ]

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in xml schema