jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes Backward compatibiltiy with DTD. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Backward compatibiltiy with DTD." Watch "Backward compatibiltiy with DTD." New topic

Backward compatibiltiy with DTD.

Tom Harris

Joined: Jan 26, 2001
Posts: 5
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
now we are wondering about what approacheto follow for solving t his problem ??
could someone pls give his opinion on this ??

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
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
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).
slagy maggie
Ranch Hand

Joined: Feb 20, 2001
Posts: 35
CAN YOU please tell me how i can validate an xml string against its corresponding DTD???
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Backward compatibiltiy with DTD.
It's not a secret anymore!