[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Changing the DTD declaration at runtime

  • From: Laura Neitzel <laura.neitzel@m...>
  • To: "'xerces-j-dev@x...'" <xerces-j-dev@x...>, "'xml-dev@x...'" <xml-dev@x...>
  • Date: Thu, 8 Jun 2000 14:53:22 -0700

dtd declaration
Hi again!

I am encountering a diagnosable problem with regards to the DTD declaration
(<!DOCTYPE...>) in an Xml file. 

First, some background:

Our system is set up such that we have a single "receiving" web/app server.
This server processes all sorts of requests, one of which is xml. In other
words, someone can send an xml doc to this web server (call it
www.webserver.com for now) and we will process the document (add, update,
delete from our db, etc) and return a response, via http--and a servlet
(which we call XmlServlet). Our dtd may or may NOT be on this server;
because the server is part of our product, customers may choose to put the
dtd on a separate server. 

The problem: 
The problem is that of a deadlock when servicing too many requests.
Basically, our webserver (Weblogic) has a configurable number of threads
that it can handle at one time. This number is set to 15. If more than 15
requests occur simultaneously (using LoadRunner here), a deadlock occurs. 
We believe this happens because each call to the XmlServlet spawns off a
thread, and then each of these threads calls the web server again to
retrieve the DTD (which is referenced as
http://www.webserver.com/dtd/1.0/mydtd.dtd). Note that the DTD references 4
.mod files. 
So, threads 1-15 are serviced via the servlet and weblogic then says "no
more," but each of them needs to get the dtd to work with. Thread 1 asks the
webserver for the dtd, but the webserver makes it wait until at least one of
the 15 is finished... but none of them will ever finish, because they need
the dtd to finish!!! 

The solutions: 
We think that one of the best ways to deal with this is to refer to the dtd
directly through the filesystem (file:\d:\dtd\1.0\mydtd.dtd). However, for
various reasons, we can't put the filesystem path in the xml document
itself. We'd like to be able to translate
http://www.webserver.com/dtd/1.0/mydtd.dtd to local path
file:\d:\dtd\1.0\mydtd.dtd. 

Any suggestions for where to put the translation? 
We thought of altering the parser code-- where it reads in the dtd. Does
anyone know where to do this? 
Another option would be to have someone else host the dtd. Is this commonly
done? 

Thanks so very much,
Laura



***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.