XML v2 custom settings

The XML 2 custom file type has the *.xml extension.

Detection

When configuring the Parser section of the XML 2 custom file type, you can edit all the Parser rules manually from scratch, or adjust the Parser rules from an uploaded file and preview the results.

SettingInstruction
Root element namesType an element name and select plus sign.
xsi:schemaLocation URIsType a declaration.
DOCTYPE declaration element namesType a declaration.
Namespace declaration (xmlns) URIsType a namespace declaration and select plus sign.
xPath rulesType an XPath rule and select plus sign.

Note that if you choose to upload an *.xml file via the Using rules generation with a dynamic preview, the fields are automatically populated with information from the *.xml file, but you can still add or delete values.

Parser

OperationsInstruction
Add a rule manuallyParsing rules define how elements are handled. To add a rule:
  1. Select Add New Rule.
  2. Under Rule select either XPath rules or Element rules, and then select By manually defining the rules. If you select XPath rules, enter a value in the XPath field, if you selected Element rules, enter an element and its attribute.
  3. Under Properties, select Basic Settings and edit the following:
    • Translate: Yes (default), No, Inherit.
    • Tag Type: Structure (default), Inline.
    • Whitespace: Inherit from Parent (default), Always preserve, Always normalize, Normalize unless xml:space='preserve'
  4. Under Properties, select Advanced Settings and edit the following:
    • SID XPATH - Leave the field empty, as this option is only used by WorldServer. For more information about SID, consult the WorldServer documentation.
    • Segmentation Hint - This option is available only if you work with inline tags and only if you specified the extraction rule (segmentation hint) in the Embedded Content section of your file type. Select one of the available options: May Exclude (default), Include, Include With Text, Exclude.
    • Length restrictions - Specify a minimum length and a maximum length.
  5. This option is available only if you work with inline tags. Under Formatting, specify: the size, the color, the position (Inherit, Normal, Superscript, Subscript), and the style (Bold, Italic, Strikethrough, Underline).
  6. This option is available only if you work with structure tags. Under Structure Information:
    1. Select Add new.
    2. Under Properties, select one of the available structure elements from the Name list, and then specify a code, an identifier, a description, color.
    3. Under Formatting, specify: the size, the color, the position (Inherit, Normal, Superscript, Subscript), and the style (Bold, Italic, Strikethrough, Underline).
  7. Select Save.
Add a rule based on an uploaded *.xml file of maximum 1MBParsing rules define how elements are handled. To add a rule:
  1. Select Add New Rule.
  2. Under Rule select either XPath rules, and then select Using rules generation with a dynamic preview. Save the file type and consult the Preview tab populated with the information and default rules from your uploaded *.xml file. In the file preview, you can perform several operations:
    • Hover a start tag and have the end tag highlighted automatically. The rule opens on the right-hand side of the Preview tab, with the default rules pre-populated.
    • Hover a start tag and consult the most important information displayed in a text box displayed inline.
    • Consult the translatable text displayed in bold and the untranslatable text displayed in gray.
    • Continue adding, editing, or deleting the rules, as instructed below.
  3. Under Properties, select and edit the basic settings:
    • Translate: Yes (default), No, Inherit.
    • Tag Type: Structure (default), Inline.
    • Whitespace: Inherit from Parent (default), Always preserve, Always normalize, Normalize unless xml:space='preserve'
  4. Under Properties, select Advanced Settings and edit the following:
    • SID XPATH - Leave the field empty, as this option is only used by WorldServer. For more information about SID, consult the WorldServer documentation.
    • Segmentation Hint - This option is available only if you work with inline tags and only if you specified the extraction rule (segmentation hint) in the Embedded Content section of your file type. Select one of the available options: May Exclude (default), Include, Include With Text, Exclude.
    • Length restrictions - Specify a minimum length and a maximum length.
  5. This option is available only if you work with inline tags. Under Formatting, specify: the size, the color, the position (Inherit, Normal, Superscript, Subscript), and the style (Bold, Italic, Strikethrough, Underline).
  6. This option is available only if you work with structure tags. Under Structure Information:
    1. Select Add new.
    2. Under Properties, select one of the available structure elements from the Name list, and then specify a code, an identifier, a description, color.
    3. Under Formatting, specify: the size, the color, the position (Inherit, Normal, Superscript, Subscript), and the style (Bold, Italic, Strikethrough, Underline).
  7. When finished, select Done and then select Save.

Writer settings

ConfiguraciónInstrucción
Marca de orden de bytes (BOM) Unicode UTF-8En la lista, seleccione una opción para determinar cómo se gestiona la BOM durante la traducción: Conservar; no agregar si no está presente originalmente, Conservar: agregar si no está presente originalmente, Quitar si está presente.
Valores de atributo de xml:lang y langEn la lista, seleccione una opción para determinar cómo se gestiona 'lang' durante la traducción: Cambiar el idioma de origen coincidente al idioma de destino, Cambiar siempre al idioma de destino, No cambiar.

Whitespace settings

ConfiguraciónInstrucción
Espacio en blanco en el contenidoDecida cómo se tratan los espacios en blanco durante la traducción: Normalizar a menos que xml:space='preserve'; Conservar siempre; Normalizar siempre.
Normalizar espacios en blanco en etiquetasSeleccione la casilla de verificación para asegurarse de que se normalizan los espacios en blanco en las etiquetas.

Namespace settings

ConfiguraciónInstrucción
Resolver espacio de nombresDecida cómo desea utilizar los espacios de nombres: Usar espacio de nombres si se han declarado en el documento, Usar espacio de nombres si se han declarado en el documento.
Espacios de nombresAgregue un prefijo y un URI para su espacio de nombre y, a continuación, seleccione signo más.

Validation

ConfiguraciónInstrucción
Realizar validación de esquema y DTD durante la detección de archivosDecida cómo se validan los esquemas y los archivos DTD:
  • Tratar todos los avisos de validación como errores de análisis
  • Enviar un aviso si no se encuentra esquema ni DTD
Realizar validación de esquema al verificar la traducción
Especificar el esquema manualmenteActive esta opción para especificar los esquemas manualmente. Decida cómo se utilizan los esquemas:
  • Usar para todos los documentos XML
  • Usar solo para documentos que no especifiquen DTD ni esquema
Esquemas maestrosMantenga los valores predeterminados o agregue más archivos.
DTD y esquemas de dependenciaMantenga los valores predeterminados o agregue más archivos.

Entity settings

ConfiguraciónInstrucción
Habilitar conversión de entidadLa configuración de entidad especifica si los caracteres especiales se convierten en su entidad HTML correspondiente. Active o desactive la casilla de verificación en función de si desea activar o no la conversión de entidad.
Convertir referencias de entidad numérica a etiquetas de marcadores de posición en líneaActive o desactive la casilla de verificación en función de si desea activar o no la conversión de entidad numérica.
Omitir la conversión dentro del contenido bloqueadoActive o desactive la casilla de verificación en función de si desea que se omita la conversión para el contenido bloqueado.
Agregar una entidadSeleccione signo más, agregue el carácter y decida si necesita que las siguientes casillas de verificación estén activadas o no:
  • LEER COMO CARÁCTER: cuando está activada, esta configuración especifica qué entidades se convierten a sus respectivos caracteres durante el análisis.
  • ESCRIBIR COMO ENTIDAD: cuando está activada, esta configuración especifica los caracteres que se convierten en sus respectivas entidades durante la escritura.
Editar una entidadAjuste los valores determinados.

Embedded Content

ConfiguraciónInstrucción
Procesar el contenido incrustado Seleccione la casilla de verificación para poder procesar el contenido incrustado. A continuación, especifique un método de procesamiento: Dentro de elemento CDATA con; Definido por reglas del analizador; Definido por información de estructura del documento.
Dentro de elemento CDATA conCDATA son las siglas de datos de caracteres y hace referencia a una parte del contenido de elementos que se marca para que se interprete literalmente como datos textuales, en lugar de como contenido marcado. Si habilita esta opción, esta entidad interpreta el elemento: Embedded Content Plain Text v 1.0.0.0.
Definido por reglas del analizadorPara agregar una regla del analizador:
  1. En las listas REGLA DEL ANALIZADOR y ID DE PROCESADOR INTEGRADO, seleccione uno de los valores disponibles.
  2. Seleccione signo más.
Definido por información de estructura del documento - Información de estructura del documentoEn la lista Información de estructura del documento, seleccione uno de los valores disponibles y, a continuación, seleccione signo más.
Definido por información de estructura del documento - Reglas de definición de etiquetasSi elige el elemento de etiqueta de la lista anterior Información de estructura del documento, agregue una regla de definición de etiquetas:
  1. Seleccione Agregar nueva regla.
  2. En la lista Tipo de etiqueta, elija un valor: Marcador de posición o Par de etiquetas.
  3. En el campo Expresión regular, introduzca la expresión regular.
  4. Seleccione la casilla de verificación Ignorar mayúsculas y minúsculas para ignorar las diferencias de mayúsculas y minúsculas del contenido identificado. De lo contrario, mantenga el valor predeterminado (desactive la casilla de verificación).
  5. En la lista Sugerencia de segmentación, elija un valor de la lista para determinar cómo se realiza la segmentación: Puede excluir (predeterminado), Incluir, Incluir con texto, Excluir. El valor que especifique aquí estará disponible cuando configure una regla del analizador en Analizador > Agregar nueva regla > Propiedades > Configuración avanzada > Sugerencia de segmentación. Consulte este tema para saber qué hace cada sugerencia de segmentación.
  6. Seleccione Guardar.