Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I have both DTD and Schema declaration in single XML file?
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic