Antw: [jdom-interest] DTD problem

Cagan Senturk cagan at
Tue Nov 21 09:19:56 PST 2000

Apparently I was using an older version of xerces. I updated it to 1.2.1 and
the problem has
been solved.

Thanks for all the help.

-----Original Message-----
From: Kesav Kumar [mailto:kesavk at]
Sent: Tuesday, November 21, 2000 11:46 AM
To: 'Cagan Senturk'; jdom-interest at
Subject: RE: Antw: [jdom-interest] DTD problem

I tested your dtd and xml file with JDOMbetea5 it works fine.  Your web
server must be up and running and your test.dtd should be in your webserver
root(virtual root) directory to be readable.  Which xml parser are you using
and what version?  I tried with xcers1.2.1 along with jdom beta5 it works

Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:kesavk at

-----Original Message-----
From: Cagan Senturk [mailto:cagan at]
Sent: Tuesday, November 21, 2000 7:35 AM
To: 'Judith Andres'; jdom-interest at
Subject: RE: Antw: [jdom-interest] DTD problem

Judith, thanks for your reply. But that did not fix the problem either,
I even simplified my xml file and dtd further and made them as following:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE skyscout SYSTEM "http://localhost:7700/test.dtd">

<?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT skyscout (folder)>

and this did not work either.


-----Original Message-----
From: Judith Andres [mailto:J.Andres at]
Sent: Tuesday, November 21, 2000 2:10 AM
To: jdom-interest at; cagan at
Subject: Antw: [jdom-interest] DTD problem


you forgot to specify the parent and the title element in your dtd.
And you have to give an attribute list of the folder element.

<?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT skyscout (folder+)>
<!ELEMENT folder  (parent, title)>
<!ATTLIST folder
<!ELEMENT title (#PCDATA)>

Instead of <!ELEMENT parent EMPTY> you could, of course, use
<!ELEMENT parent (#PCDATA)>


>>> "Cagan Senturk" <cagan at> 21.11.2000  00.15 Uhr >>>
I am having a weird problem reading in a very simple xml file with a very
basic dtd using a SAXBuilder (validation on, default Xerces parser).

The error message I get is the following:

org.jdom.JDOMException: Document root element "skyscout", must match DOCTYPE
root "skyscout".: Error on line 3 of document
http://localhost:7700/test.xml: Document root element "skyscout", must match
DOCTYPE root "skyscout".

It's being generated by (line 310).

When I use the DOMBuilder, there are no problems.

Here is the content of the test.xml file:
<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE skyscout SYSTEM "http://localhost:7700/test.dtd">


<folder id="MySkyScout">


<title>My SkyScout</title>



and the test.dtd contains:

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

<!ELEMENT skyscout (folder+)>

<!ELEMENT folder (#PCDATA)>

Thanks in advance for any help,

cagan at

To control your jdom-interest membership:

More information about the jdom-interest mailing list