External DTD loading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hegemony Cricket

    #1

    External DTD loading

    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.c om/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
  • Philippe Poulard

    #2
    Re: External DTD loading

    Hegemony Cricket wrote:[color=blue]
    > 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.c om/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[/color]

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

    Comment

    • Manuel Yguel

      #3
      Re: External DTD loading

      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.

      Comment

      Working...