External DTD loading

H

Hegemony Cricket

I'm a relative XML newbie, but it surprised me to hear that it is
standard practice to have an XML document load the corresponding
DTD from your company's site, e.g.

<!DOCTYPE mytype SYSTEM
"http://www.mycompany.com/products/foo/mytype_1_0.dtd">

We're building a product that has its data stored in an XML format,
and it seems strange to me that our company website will take a hit
every time a customer uses our product. Also there is a performance
issue; not only does it cost time to go fetch a web document, but
what if the customer is not connected to the web?

Of course, one can turn off the extenal DTD loading (which I have),
but it strikes me as odd that going and fetching the DTD should be
the default behavior.

I'm curious to hear how others handle this issue, when using XML as
a data format in a product. Do you just turn off the DTD loading
as I've done, or do you distribute the DTD along with your product
and load it locally? Or just leave things as the default and hope
for the best?


--Mark
 
P

Philippe Poulard

Hegemony said:
I'm a relative XML newbie, but it surprised me to hear that it is
standard practice to have an XML document load the corresponding
DTD from your company's site, e.g.

<!DOCTYPE mytype SYSTEM
"http://www.mycompany.com/products/foo/mytype_1_0.dtd">

We're building a product that has its data stored in an XML format,
and it seems strange to me that our company website will take a hit
every time a customer uses our product. Also there is a performance
issue; not only does it cost time to go fetch a web document, but
what if the customer is not connected to the web?

Of course, one can turn off the extenal DTD loading (which I have),
but it strikes me as odd that going and fetching the DTD should be
the default behavior.

I'm curious to hear how others handle this issue, when using XML as
a data format in a product. Do you just turn off the DTD loading
as I've done, or do you distribute the DTD along with your product
and load it locally? Or just leave things as the default and hope
for the best?


--Mark

hi,

some features allow to deal with dtd in a smartest manner :
-xml catalogs
-entity resolvers
both are designed to react on outer resources invokation such as dtd,
and are often use to deliver a local copy of these resources

refer to your parser documentation
--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
 
M

Manuel Yguel

I would like to have a file with the dtd on the server. But I don't know
how to do that ?
The DOM documentation are not very explicit for that, especially with
xerces.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top