Content Application Developer Manual / Version 2301
Table Of Contents
Documents, such as templates, document type definitions or other XML files, need to address
third-party DTDs, Schemas or Entities (in the following summarized as entities). In order to
prevent problems with slow websites and to enhance offline functionality, CoreMedia XML
utility classes in the com.coremedia.xml
package (see the API documentation for
details) support proxies in the classpath for such entities.
That is, you can simply use the original URL of an entity in your XML data, for example
http://www.w3.org/1999/xlink
, but the CoreMedia utilities will try to resolve
against the classpath first. Proxies have to be stored with their original path,
/www.w3.org/1999/xlink.xsd
, in this example. CoreMedia provides some third-party
proxies in the cap-schema-bundle.jar
file. CoreMedia entities on the other hand
are stored directly in cap-schema-bundle.jar!/xml
due to backwards compatibility.
To keep it short, follow the following rules for entity resolving:
Provide classpath proxies for external entities with a path mapping as described above.
Provide your own entities via classpath.
Use the CoreMedia XML utilities (especially
MarkupFactory
andXMLUtil5
) because they offer out-of-the-box entity proxy support for third-party entities and class path support for project entities.