Hi, I am facing a problem in my project. My team is responsible for providing xml schemas which define complex type user defined elements and it also provides algorithm for functions like min() , max() and all that.... another team is writing DTD for just validating the xml content... Now the scenario is that we have to apply the schemas (for further processing) after the validation of document by DTDs is done.... now we are wondering about what approacheto follow for solving t his problem ?? could someone pls give his opinion on this ?? tx
w e are using xml DTD for validating the xml content and we have written some rules and deined complex types of elements in XML schema. now we have to use the xml document and DTD
I don't think I understood your question too well. Since DTD and Schema both are meant for defining the structure, why would you want to use both ?? Any one of them will do the job of validating the XML document. ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. [This message has been edited by Ajith Kallambella (edited January 26, 2001).]
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
CAN YOU please tell me how i can validate an xml string against its corresponding DTD???
Joined: Mar 17, 2000
Why not feed it to a validating parser? That should do the job! Ofcourse your XML should have reference to the DTD if it is not internal. Most parsers support passing in the XML document as an InputSource and so you should be fine with the whole XML being stored as a String. Does that help? ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.