Configurar tipos de archivo XML Madcap

Puede ajustar la configuración de XML MadCap para personalizar la forma en la que se procesa este tipo de archivo durante la traducción o revisión.

Procedimiento

  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. Expanda la lista Tipos de archivo y seleccione el filtro XML MadCap.
  3. Select the Detection page, to specify the settings which will match the content of the file with its file type. Use any combination of the following XML items to identify a file type:
    UnderDo the following
    Any of the following root elements

    Select Add ..., and enter one or more names used for the root element, for example my_root.

    xsi:schemaLocation declaration containing the following URI:

    Type the URL used to specify the schema location. This matches schemaLocation or no NamespaceSchemaLocation attribute in the file.

    DOCTYPE declaration

    Type the element name.

    For example:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    xmlns: declaration with any of the following URIs:

    Select Add ..., and enter one or more namespace URLs.

    Any of the following XPath rule matches:

    Select Add ..., and enter one or more XPath rules.

  4. Select the Parser page, and do one of the following:
  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 (&gt;) 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 style sheets which enable SDL Trados Studio to preview your HTML files correctly:
    1. In the Stylesheet transform: area, select a style sheet.
    2. In the Additional files: area, select Add to include reference files (CSS, JavaScript or image files) for your style sheet.
  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. Select the Embedded content page.
  14. Select Process embedded content using the following processor:, to process XML embedded content with one of the available embedded content processors. If you do not enable embedded content processing, SDL Trados Studio treats content embedded in an XML type as plain text.
  15. Choose an embedded content processor from the list. You can add custom embedded content processors to expand the list of available options.
  16. Under Process embedded content found in:, select one of the available options.
    • Select CDATA sections, to set the selected embedded content processor to extract embedded content from CDATA sections. If you enable this option, SDL Trados Studio identifies and processes CDATA sections automatically, so you do not need to make any further extraction settings.
    • Select Document structure, to set the selected embedded content processor to extract embedded content from specific context. Select Add to create extraction rules based on document structure information.
  17. Select the QuickInsert page.
  18. Specify QuickInsert settings to insert tags and formatting, or to insert text and special characters.
  19. Seleccione Aceptar.