Altova MapForce 2025 Enterprise Edition

Customizing Your Catalogs

Home Prev Top Next

When creating entries in CustomCatalog.xml (or any other catalog file that is to be read by MapForce), use only the following elements of the OASIS catalog specification. Each of the elements below is listed with an explanation of their attribute values. For a more detailed explanation, see the XML Catalogs specification. Note that each element can take the xml:base attribute, which is used to specify the base URI of that element.

 

<public publicId="PublicID of Resource" uri="URL of local file"/>

<system systemId="SystemID of Resource" uri="URL of local file"/>

<uri name="filename" uri="URL of file identified by filename"/>

<rewriteURI uriStartString="StartString of URI to rewrite" rewritePrefix="String to replace StartString"/>

<rewriteSystem systemIdStartString="StartString of SystemID" rewritePrefix="Replacement string to locate resource locally"/>

 

Note the following points:

 

In cases where there is no public identifier, as with most stylesheets, the system identifier can be directly mapped to a URL via the system element.

A URI can be mapped to another URI using the uri element.

The rewriteURI and rewriteSystem elements enable the rewriting of the starting part of a URI or system identifier, respectively. This allows the start of a filepath to be replaced and consequently enables the targeting of another directory. For more information on these elements, see the XML Catalogs specification.

 

From release 2014 onwards, MapForce adheres closely to the XML Catalogs specification (OASIS Standard V1.1, 7 October 2005) specification. This specification strictly separates external-identifier look-ups (those with a Public ID or System ID) from URI look-ups (URIs that are not Public IDs or System IDs). Namespace URIs must therefore be considered simply URIs—not Public IDs or System IDs—and must be used as URI look-ups rather than external-identifier look-ups. In MapForce versions prior to version 2014, schema namespace URIs were translated through <public> mappings. From version 2014 onwards, <uri> mappings have to be used.

 

Prior to v2014: <public publicID="http://www.MyMapping.com/ref" uri="file:///C:/MyDocs/Catalog/test.xsd"/>  

V-2014 onwards: <uri name="http://www.MyMapping.com/ref" uri="file:///C:/MyDocs/Catalog/test.xsd"/>

 

How MapForce finds a referenced schema

A schema is referenced in an XML document via the xsi:scemaLocation attribute (shown below). The value of the xsi:schemaLocation attribute has two parts: a namespace part (green) and a URI part (highlighted).
 

xsi:schemaLocation="http://www.xmlspy.com/schemas/orgchart OrgChart.xsd"

 

Given below are the steps, followed sequentially by MapForce, to find a referenced schema. The schema is loaded at the first successful step.

 

1.Look up the catalog for the URI part of the xsi:schemaLocation value. If a mapping is found, including in rewriteURI mappings, use the resulting URI for schema loading.

2.Look up the catalog for the namespace part of the xsi:schemaLocation value. If a mapping is found, including in rewriteURI mappings, use the resulting URI for schema loading.

3.Use the URI part of the xsi:schemaLocation value for schema loading.

 

XML Schema specifications

XML Schema specification information is built into MapForce and the validity of XML Schema (.xsd) documents is checked against this internal information. In an XML Schema document, therefore, no references should be made to any schema that defines the XML Schema specification.

 

The catalog.xml file in the %AltovaCommonSchemasFolder%\Schemas\schema folder contains references to DTDs that implement older XML Schema specifications. You should not validate your XML Schema documents against these schemas. The referenced files are included solely to provide MapForce with entry helper info for editing purposes should you wish to create documents according to these older recommendations.

 

 

© 2018-2024 Altova GmbH