• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in xml schema

 
MONZY THARIAN
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
What does this line do
 
MONZY THARIAN
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic