This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes xml file does not conform to dtd Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "xml file does not conform to dtd" Watch "xml file does not conform to dtd" New topic
Author

xml file does not conform to dtd

Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

Hi All,
I am new to xml and I am wondering about something. I thought that if I had a #REQUIRED Qualifier in the dtd, then the attribute would be required in the xml. But in the code I have here, notice that the idTo attribute for <TO> is required in the dtd, but I do not have it in the xml. When I display the xml in Internet Explorer, it does not show errors. Does anyone know why this is? Am I misunderstanding something or what? Many thanks to you!!
Barry

Here is the xml file:

And here is the dtd:
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi Barry..
There is nothing wrong with your understanding or with IE. By default the parser within IE is set NOT TO VALIDATE the xml file agaist DTD.
Just try the following html with script to check your xml file.

Also refer this for confirmation
http://www.biglist.com/lists/xsl-list/archives/199903/msg00487.html
Cheers

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform


<b>L G Goundalkar</b><br /> <a href="mailto:lggoundalkar@yahoo.com" rel="nofollow">lggoundalkar@yahoo.com</a> <br />Sun Certified Programmer for Java 2 Platform.<br />Sun Certified Web Component Developer for J2EE.
arul senthil
Greenhorn

Joined: Jul 03, 2001
Posts: 29
Hi Goundalkar
The parser has not yet been set for validation!!! The line 6 should read xmlDoc.validateOnParse="true". Otherwise it's ok.
Thanks for the answer,
Regards,
Senthil
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: xml file does not conform to dtd
 
Similar Threads
ID and IDREF attributes in XML
PCDATA and CDATA
preparing the technical specification of the xml file
Recreate XML file
Question about Multiple Attlist declarations