Document Types > Document Types > Document Type Migration Issues > XML Version PI
XML Version PI
Arbortext Editor requires that an XML DTD start with the XML version PI. If the encoding attribute is specified, for example,
<?xml version="1.0" encoding="utf-8"?>
the file must be encoded as specified. Formerly, the encoding parameter was not supported by MarkIt, and the system encoding was used. DTDs using non-ASCII characters in names will fail to parse in beginning in version 5.0 if the actual file encoding does not match the XML PI. The fatal error message is typically of the form:
invalid byte 2 (c) of a 3-byte sequence
Arbortext Editor version 5.2 and later attempts to load the DTD associated with an XML document with the Xerces parser, even if that DTD does not have an XML version PI. However, if there is a .ptd file associated with the DTD, Arbortext Editor assumes the DTD is not XML compliant and was compiled for the MarkIt parser.
Be aware that, for modular DTDs, each included entity file must also be properly encoded. If an entity file contains non-ASCII characters, it must either be converted to UTF-8 or an XML PI must be added to the beginning of the file specifying the actual encoding. For example, for a Western European system locale:
<?xml version='1.0' encoding='ISO-8859-1'?>
For a Japanese Windows system locale:
<?xml version='1.0' encoding='Shift_JIS'?>