配置 XML 任何 XML 文件类型

您可以配置 XML 任何 XML 设置,以便自定义在翻译或审校期间处理这种文件类型的方式。

过程

  1. Decide for which projects you want to configure file type settings:
    • For the active project, go to the Projects view, and on the Home tab, select Project Settings.
    • For all future projects, go to File > Options.
  2. 展开文件类型列表,然后选择 XML 任何 XML 筛选条件。
  3. Select the Detection page, and consult the page indicating that file detection settings are predefined.
  4. Select the Parser page, and consult the page indicating that parser settings are predefined.
  5. Select the Writer page, and then:
    1. Under Unicode UTF-8 byte order mark (BOM), choose when the SDL file support software should insert a UTF-8 BOM in the target file:
      • Preserve: don't add if not originally present
      • Preserve: add if not originally present
      • Remove if present
    2. Under xml:lang attribute values:
      • Select Change matching source language to target language, if you want to change xml:lang="en-US" in the source file to xml:lang="fr-FR" in the target file.
      • Select Always change to target language, if you want to change xml:lang="..." in the source file to xml:lang="fr-FR" in the target file.
      • Select Do not change, if you want to keep the xml:lang attribute values unchanged.
  6. Select the Entities page, and then select Enable entity conversion to specify whether SDL Trados Studio displays an XML Entity as an entity reference (>) or as a character (>).
  7. Under Entity conversion, select the checkboxes corresponding to the XML entities for which you want conversion to apply.
    1. Select the checkboxes corresponding to the XML entity sets for which you want conversion to apply. Entities can be of the Default (the entities are the standard entity mappings from W3C) or of the Custom type (the entity set was changed).
    2. Select Advanced, and in the Advanced XML Entity Settings dialog, specify when characters are converted between entity representation and character representation.
  8. Under Entity mappings, consult the entities in the entity set selected under Entity conversion, and, if necessary, you can add, edit or remove entity mappings.
  9. Select the Namespaces page, to provide namespace declarations for an XML file type.
    1. Under Namespace resolution: use one of the following options:
      • Select Use namespace when declared in the document, when a namespace declaration in the file defines a prefix.
      • Select Always use prefix even when a namespace is declared, when a namespace declaration in the file type settings (that is, on this page) defines a prefix.
    2. Under Namespaces: consult the prefix and the URI for the available namespaces, and select Add to add namespace entries.
  10. Select the Whitespace page, to specify how SDL Trados Studio deals with whitespace characters (spaces, non-breaking spaces, tabs, line breaks) in the elements of an XML file.
    1. Under Whitespace in content, choose one of the options:
      • Select Always preserve, so that SDL Trados Studio does not replace any whitespace found in the XML element with a single space.
      • Select Normalize unless xml:space='preserve', so that SDL Trados Studio replaces only the whitespace which is not tagged with the attribute xml:space='preserve'.
      • Select Always normalize, so that SDL Trados Studio replaces any whitespace found in the XML element with a single space, ignoring any xml:space='preserve' attribute.
    2. Under Whitespace in tags, select Always normalizeso that SDL Trados Studio replaces any whitespace found in the XML element with a single space.
  11. Select the Preview page, to add the resource files which enable SDL Trados Studio to preview your HTML files correctly. Select Add to include reference files (CSS, JavaScript or image files).
  12. Select the Validation page, to specify the settings which ensure that the structure and content of the XML file matches the specifications given by the DTD or schema.
    1. Select Perform schema and DTD validation during file detection, so that validation takes place during the file detection phase.
      • If you select Treat all validation warnings as file parsing errors, and there are validation warnings, SDL Trados Studio will not open the file.
      • Select Report warning if no DTD/schema can be found
    2. Select Perform schema validation when verifying translation, so that validation takes place during the verification phase in the Editor view.
    3. Select Manually specify schema, if you want manually specified schemas to override the schemas referenced in the file, and then decide whether you want to use the manual schemas for all XML files (Use for all XML documents) or only for XML files with an unspecified DTD/schema (Use only for XML documents which don't specify DTD/schema).
    4. If you decided to manually specify the schema, in the Master Schemas area, select Add and choose the *.xsd schemas.
    5. In the Dependecy Schemas and DTDs, select Add and choose *.xsd or *.dtd schemas which are referenced from a master schema.
  13. 选择内嵌内容(旧版)页面,指定将文件中的内嵌内容作为带有标注的标记进行处理的方式。
    1. 选择启用内嵌内容处理
    2. 文档结构信息区域中,选择添加...以创建基于文档结构信息的提取规则
    3. 标记定义规则区域中,选择添加...以指定要处理的标记并将其定义为可翻译或不可翻译。
  14. Select the QuickInsert page.
  15. Specify QuickInsert settings to insert tags and formatting, or to insert text and special characters.
  16. 选择确定