DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6495>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6495 Support XML catalogs to resolve external entities Summary: Support XML catalogs to resolve external entities Product: Ant Version: 1.5 alpha (nightly) Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Other AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] It is a common practice to use external XML entities to support re-use among similar buildfiles. One of biggest problems with that practice is that currently there is no way to specify the external entity location other than using relative paths in the entity URI (for entities residing in the local system). This restriction could be removed if Ant exposed the Crimsom API that supports the registration of catalogs. This little extension would eliminate the issue of hardcoded relative paths. For example, instead of: <!DOCTYPE project [ <!ENTITY common SYSTEM "file:./../../../../common.xml" ] We would be able to use: <!ENTITY common PUBLIC "-//mycompany//loadbuild-common-code//EN" "common.xml" The PUBLIC name could be used to obtain the URI from a catalog provided to Ant at launch time. Ant would just have to allow the user to register mappings for public names (i.e. the XML catalog); for example, passing a file in the command line or specifying it in an environment variable (ANT_CATALOG?). This is the method I'm talking about, from class org.apache.crimson.parser.Resolver: /** * Registers the given public ID as corresponding to a particular * URI, typically a local copy. This URI will be used in preference * to ones provided as system IDs in XML entity declarations. This * mechanism would most typically be used for Document Type Definitions * (DTDs), where the public IDs are formally managed and versioned. * * @param publicId The managed public ID being mapped * @param uri The URI of the preferred copy of that entity */ public void registerCatalogEntry ( -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
