Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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?
 
Ranch Hand
Posts: 502
jQuery Spring Java
  • 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 ]
 
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 ]
 
Look ma! I'm selling my stuff!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic