• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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

 
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic