Re: ldml dtd location

From: Philippe Verdy (verdy_p@wanadoo.fr)
Date: Mon Sep 26 2005 - 17:08:46 CST

  • Next message: Wulfy: "Re: Dead keys"

    From: "Theo Veenker" <Theo.Veenker@let.uu.nl>
    >>>> <!DOCTYPE ldml SYSTEM "http://www.unicode.org/cldr/dtd/1.3/ldml.dtd">
    >>>> In my setup I just want use a locally installed copy of the DTD. So
    >>>> my request would be to use a public identifier for the official
    >>>> 'location' (to be known by the app) and a relative system identifier
    >>>> which one can use to find the DTD relative to the referring LDML file.
    >>>> Something like this:
    >>>> <!DOCTYPE ldml PUBLIC "-//Unicode Consortium//DTD Common Locale Data
    >>>> Repository//EN" "../../dtd/ldml.dtd">
    >>(...)
    >> I would not recommand changing the system URL in XML files (this would
    >> require editing all of them, meaning that they are no more portable).
    >> Mark is right, the solution is to implement an entity resolver, that can,
    >> for example, map a list of internally supported public identifiers to a
    >> local system URL (which may be embedded in the application itself as an
    >> internal static resource), ignoring the specified system URL specified in
    >> the XML document and which should only be used in absence of a local copy
    >> of the entity.
    >
    > I will do that. But it still requires editing all the xml files because
    > the files don't actually provide a public identifier, only a system url.

    This does not matter: an entity resolver receives both the public identifier
    and the system URL when they are present. The entity resolver then looks
    first into its local cache for the public identifier when it is present,
    then can look for the system URL into its cache too before querying the web
    for an URL it does not cache internally.

    Using public identifiers in XML files for specifying the DTD is recommanded
    as they are URNs, independant of the location, even if sometimes later
    Unicode has its website moved to another domain or can't be resolved from
    one location due to different domain resolution mechanisms (such as with
    local domain search paths which may find the specified domain within another
    local one). Any XML schema or doctype specification should document that
    public identifier (but I still wonder if there's a global SGML/XML registry
    of those public identifiers)



    This archive was generated by hypermail 2.1.5 : Mon Sep 26 2005 - 17:10:51 CST