This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Product and Other Certifications and the fly likes Can I have both DTD and schema delcaration for single XML file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Can I have both DTD and schema delcaration for single XML file?" Watch "Can I have both DTD and schema delcaration for single XML file?" New topic
Author

Can I have both DTD and schema delcaration for single XML file?

Sandeep Awasthi
Ranch Hand

Joined: Oct 23, 2003
Posts: 597
Can I have both DTD and Schema declaration in single XML file?


Sandeep
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

you can. But my advice is to impose valiadtion either using Schema or DTD.

If you give me a choice, my choice is Schema, why? because it is enhanced version of DTD as well as it looks like XML file and easy to read.


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
Sandeep Awasthi
Ranch Hand

Joined: Oct 23, 2003
Posts: 597
Hi Prabhu,

Thanks for reply.


I want to have both DTD and Schema because I want to validate xml using schema but some part of my xml is in another xml file (?xml version="1.0" sandalone="no" )
[ November 27, 2006: Message edited by: Rajesh Thakare ]
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Rajesh Thakare:

I want to have both DTD and Schema because I want to validate xml using schema but some part of my xml is in another xml file (?xml version="1.0" sandalone="no" )


DTD or schema has nothing to do with the standalone attribute in the XML prolog.
If standalone is true ; it means that the resources to validate the xml is available locally(Doesn't depend on external entity..(but nothing it says about the kind of validation that you are planning to impose.)


Rahul Bhattacharjee
LinkedIn - Blog
Sandeep Awasthi
Ranch Hand

Joined: Oct 23, 2003
Posts: 597
Hi Rahul,

Thanks for reply. So can I have two xml files which validates with schema and one xml file includes another ( standalone="no" )?

Regards

Rajesh
[ November 27, 2006: Message edited by: Rajesh Thakare ]
 
GeeCON Prague 2014
 
subject: Can I have both DTD and schema delcaration for single XML file?