aspose file tools*
The moose likes XML and Related Technologies and the fly likes beginner DTD question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "beginner DTD question" Watch "beginner DTD question" New topic
Author

beginner DTD question

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
I understand the basic concept that DTDs used for XML validation. However, it seemds kinda odd that it's the xml document that will refer to the DTD thru the DOCTYPE element. Let's say the sender and the receiver agree upon a specific format for the xml document they exchange, and the receiver can validate the xml document, using an agreed upon DTD. Now, if the sender sends an xml document that does NOT include a DOCTYPE element, the receiver can no longer validate the document, and whole purpose of defining the DTDs is defeated. Doesn't it make more sense to send the DTD as a parameter to the validating parser, and have the parser validate the xml document? Am I missing some thing?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Moving this thread to the XML and Related Technologies forum since it's not about XML Certification. Please continue the discussion over there.
Thanks.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Hi,
I'd really appreciate it if some one can answer this question. Thanks.
Charles McGuire
Ranch Hand

Joined: Jan 18, 2005
Posts: 99
I love JavaRanch, but the XML forum is pretty quiet. A lot of XML questions seem to go unanswered here. Try this site:
IBM DeveloperWorks XML Tips


There's no place like 127.0.0.1
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Thank you. Will try my luck there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: beginner DTD question