Configuring the document type mapping file
The mapping file allows to map a document type to another document type.
Content Importer uses the mapping file to convert the document type of a file before importing it into the Repository; for example, to convert -//OASIS//DTD DITA Concept//EN to -//SDL//DTD DITA Concept//EN.
The document type mapping file is located on the server at the following location: $\Web\Author\ASP\DocTypes\documentTypeMap.xml.
Elements
<documentTypeMap>-
The document type mapping file consists of a single
<documentTypeMap>element. It is just a container for the other elements. <rewritePublicId>-
The
<rewritePublicId>element rewrites the beginning of a public identifier:<rewritePublicId publicIdStartString = "-//OASIS//DTD DITA" rewritePrefix = "-//SDL//DTD DITA" />A
<rewritePublicId>entry matches a public identifier if the public identifier begins precisely with the value of the@publicIdStartStringattribute of the entry.Rewriting removes the matching prefix from the supplied public identifier and replaces it with the value of the
@rewritePrefixattribute.If more than one
<rewritePublicId>entry matches, the first entry is used.Given the following fragment:
<rewritePublicId publicIdStartString = "-//OASIS//DTD DITA" rewritePrefix = "-//SDL//DTD DITA" /> <rewritePublicId publicIdStartString = "-//OASIS//DTD DITA Concept" rewritePrefix = "-//CUSTOM//DTD DITA Concept" /> <rewritePublicId publicIdStartString = "-//OASIS//DTD DITA Reference" rewritePrefix = "-//SDL//DTD DITA Reference" />The first two entries match the public identifier
-//OASIS//DTD DITA Concept//EN, but the third does not. The rewritten public identifier in this case is:-//SDL//DTD DITA Concept//EN. <rewriteSystemId>-
The
<rewriteSystemId>element rewrites the beginning of a system identifier:<rewriteSystemId systemIdStartString = "oasis/1.2" rewritePrefix = "sdl/1.3" />A
<rewriteSystemId>entry matches a system identifier if the system identifier begins precisely with the value of the@systemIdStartStringattribute of the entry.Rewriting removes the matching prefix from the supplied system identifier and replaces it with the value of the
@rewritePrefixattribute.If more than one
<rewriteSystemId>entry matches, the first entry is used.Given the following fragment:
<rewriteSystemId systemIdStartString = "oasis/1.2" rewritePrefix = "sdl/1.3" /> <rewriteSystemId systemIdStartString = "oasis/1.2/dtd/technicalContent/dtd/concept.dtd" rewritePrefix = "custom/1.3/dtd/technicalContent/dtd/concept.dtd" /> <rewriteSystemId systemIdStartString = "oasis/1.3" rewritePrefix = "sdl/1.3" />The first two entries match the system identifier
oasis/1.2/dtd/technicalContent/dtd/concept.dtd, but the third does not. The rewritten system identifier in this case is:oasis/1.3/dtd/technicalContent/dtd/concept.dtd.