Configuring XHTML 1.1 file types
You can configure XHTML 1.1 settings to customize the way this file type is processed during translation or review.
Procedure
- To configure file type settings, go to:
- Projects view > Home > Project Settings, for the active project.
- File > Options, for all future projects.
- Expand File Types and select XHTML 1.1.
- On the Detection page, customize file type definition rules to identify the right file type for processing. The content of the document must match at least one of the following rules:
- root element name - the parent element enclosing all other elements in the document apart from the DOCTYPE declaration.
- DOCTYPE declaration element URI - instruction that associates a particular document (for example, a webpage) with a document type definition identifier.
- xmlns declaration URIs - XML unique namespace identifier.
- xsi:schemaLocationURI - URI used to specify the schema location. It matches the schemaLocation or noNamespaceSchemaLocation attribute. For example: http://www.authorit.com/xml/authorit AuthorIT.xsd.
- xPath rule - syntax for defining parts of an XML document.
- Select the Parser page, and do one of the following:
- Enable or disable existing parser rules
- Add parser rules
- Import parser rules
- Edit parser rules
- Remove parser rules
- Define structure information properties
- On the Writer page, customize encoding and attribute values:
- Choose when to add Unicode UTF-8 byte order mark (BOM) in the target file:
- Preserve; don't add if not originally present - does not add byte order mark if the source file is encoded with UTF-8 without BOM.
- Preserve; add if not originally present - adds byte order mark if the source file is encoded with UTF-8 without BOM.
- Remove if present - removes byte order mark if the source file is encoded with UTF-8 with BOM.
- Choose action for xml:lang attribute values:
- Change matching source language to target language - converts XML Entities from entity references to characters. For example, converts the greater than XML entity > to the greater than character >.
- Always change to target language - changes XML language attribute to target language in the source file.
- xPath rule - does not change xml language attribute.
- Choose when to add Unicode UTF-8 byte order mark (BOM) in the target file:
- On the Entities page, customize entity conversion:
- Enable entity conversion - converts XML Entities from entity references to characters. For example, converts the greater than XML entity > to the greater than character >.
- Entity mappings - displays the following information about XML entities. Click on an item in the Entity conversion listbox to see the mappings:
- Name - name of the XML entity.
- Char - corresponding character of the XML entity.
- Unicode Value - unicode value of the XML entity.
- On the Namespace page, provide mapping for namespaces used in the source file.
- Choose action for Namespace resolution:
- Use namespace when declared in the document - uses the namespace declared in the root element if the namespace exists.
- Always use prefix even when a namespace is declared - only uses the prefix of the namespace regardless of if it has a definition or not.
- prefix - defined name for a namespace. For example, xmlns:prefix=”http://website”
- URI - unique identifier associated with the namespace. For example, xmlns:prefix=” http://website”
- Choose action for Namespace resolution:
- On the Whitespace page, customize whitespace processing:
- Specify how to process Whitespace in content:
- Always preserve - does not modify whitespaces found in the document.
- Normalize unless xml:space='preserve' - replaces only the whitespaces which do not have the xml:space='preserve' attribute.
- Always normalize - replaces all whitespaces found in the XML element with a single space, ignoring any xml:space='preserve' attributes.
- Normalize whitespaces inside attribute value - replaces all whitespaces found inside the attribute value with a single space.
- Specify how to process Whitespace in content:
- On the Preview page, add all files required to preview your file (CSS, images, etc) by clicking Add. If your file does not require additional files for preview, skip this step.
- On the Validation page, customize how to validate files:
- Perform schema and DTD validation during file detection - checks if format, structure or Document Type Definition is valid. In case of errors, you can choose to:
- Treat all validation warnings as file parsing errors - considers validation warnings to be file parsing errors blocks Trados Studio from opening the file.
- Report warning if no DTD/schema can be found - presents a warning if there is no valid DTD/schema.
- Manually specify schema - overrides schemas referenced in the file with the Master schema that you specify. Click Add to add master schemas. Validate files with master schemas for:
- Use for all XML documents - overrides schema of all documents with the specified Master schema.
- Use only for documents which don't specify DTD/schema - overrides schema only for documents that don't specify DTD/schema.
- Perform schema and DTD validation during file detection - checks if format, structure or Document Type Definition is valid. In case of errors, you can choose to:
- On the QuickInsert page, customize the QuickInsert settings for the QuickInsert group for this type of file.
- On the Embedded content page, customize how embedded content is processed:
- Process embedded content - processes content embedded in the document in one of the following ways:
- Inside CDATA element with: - processes embedded content found in CDATA element using the specified embedded content processor.
- Defined by parser rules - processes embedded content found in the file using the Parser rules and the Embedded Processor that you specify.
- Defined by document structure information - processes embedded content in the file using the configured Document Structure Information.
- Process embedded content - processes content embedded in the document in one of the following ways:
- Click OK to close the window.