how do i validate an xml with a dtd when they are running tomcat server and placed in different directory structure?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ratnakar_Srivastava
Posted On:   Wednesday, September 24, 2003 11:34 PM

How do i validate an xml with a dtd when they are running on tomcat server and placed in different directory structure. my xml is in the following directory structure http://localhost:8080/myApplication/document.xml and xml contents are here <?xml version="1.0"?> first name middle name last name and dtd is in the following directory structure http://localhost:8080/myApplication/WEB-INF/document.dtd and dtd contents are as follows <!ELEMENT root (first?, middle, last?)> <!ATTLIST root xmlns CDATA #FIXED "http:mydomain.com/document.dtd"> <!ELEMENT first (#PCDATA)> <!ELEMENT middle (#PCDATA)&   More>>

How do i validate an xml with a dtd when they are running on tomcat server and placed in different directory structure.
my xml is in the following directory structure
http://localhost:8080/myApplication/document.xml
and xml contents are here
<?xml version="1.0"?>


first name
middle name
last name


and dtd is in the following directory structure
http://localhost:8080/myApplication/WEB-INF/document.dtd
and dtd contents are as follows
<!ELEMENT root (first?, middle, last?)>
<!ATTLIST root xmlns CDATA #FIXED "http:mydomain.com/document.dtd">
<!ELEMENT first (#PCDATA)>
<!ELEMENT middle (#PCDATA)>
<!ELEMENT last (#PCDATA)>

Does tomcat server configuration required to change?

   <<Less

Re: how do i validate an xml with a dtd when they are running tomcat server and placed in different directory structure?

Posted By:   Navin_Prabhu  
Posted On:   Wednesday, October 8, 2003 05:12 PM

I am not sure if you already have the answer.

The easiest way to do this ( it is easier since you are using public domain ) is to modify the xml as follows :

first name middle name last name

You do not need to modify Tomcat Server Configuration.

Navin
About | Sitemap | Contact