• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error in xml schema

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
What does this line do
 
MONZY THARIAN
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic