[jdom-interest] DTD file and validation

Ligade, Shailesh sligade at claravista.com
Wed Sep 20 06:21:03 PDT 2000

Hello all,

I have a basic question. I could create a xml file using JDOM that is
namespace aware. The problem is that this file is not happy with the dtd i
have generated with xml spy 3.0 when I try to read it with validating

In other words, xml spy is happy with my dtd but not my parser xcrces (which
I got along with JDOM b4)

my file looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--DOCTYPE KODetail SYSTEM "http://laestrella/KODetail.dtd"-->
<!DOCTYPE KODetail SYSTEM "c:\ATG\Dynamo4.5.0\projects\jhtml\KODetail.dtd">

  <iPower:Title>Jason - XML</iPower:Title>

and my dtd looks like this:

<!ELEMENT KODetail (
) >

<!ELEMENT iPower:DocID (#PCDATA)  >
<!ATTLIST iPower:DocID xmlns:iPower CDATA #REQUIRED >
<!ELEMENT iPower:Title (#PCDATA)  >

I have even removed attribute line from DocID but no help.

What I am doing wrong? I found very contradicting things regarding how to
construct the DTD,

some messages told me to add namespace prefix as a part of element in DTD
(JAVA and XML book example has this one)
while others asked me to remove that. Also, xmlns, is that a attribute in
DTD or not. I got contradictory views on that one too.

Obviously parsers make lot of difference! SO this question is how to make
the parser 'xcrces' happy?

Thanks in advance.


More information about the jdom-interest mailing list