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

設定手順
Unicode UTF-8 バイト オーダー マーク (BOM)リストからオプションを選択し、翻訳時の BOM の処理方法を決定します: [維持: 当初から存在しない場合は追加しない][維持: 当初から存在しない場合は追加する][存在する場合は削除する]
xml:lang 属性値リストから次のいずれかのオプションを選択し、翻訳時の 'lang' の処理方法を決定します: [一致する原文言語を訳文言語に変更する][常に訳文言語に変更する][変更しない]

Whitespace settings

設定手順
コンテンツ内の空白文字翻訳時の空白の処理方法を次のいずれかから選択します: [xml:space='preserve' でない限り正規化][常に保持][常に正規化]
タグ内の空白文字を正規化このチェック ボックスをオンにすると、タグ内の空白文字が正規化されます。

Namespace settings

設定手順
名前空間の解決名前空間を使用する方法を決定します: [文書で名前空間が宣言されている場合はその名前空間を使用][名前空間が宣言されていても接頭辞を使用]
名前空間名前空間の接頭辞と URI を追加し、プラス記号を選択します。

Validation

設定手順
ファイル検出時にスキーマと DTD の検証を実行するスキーマと DTD ファイルの検証方法を決定します。
  • すべての検証警告をファイル解析エラーとして処理する
  • DTD/スキーマが見つからない場合に警告を報告する
訳文検証時にスキーマの検証を実行する
スキーマを手動で指定するスキーマを手動で指定するには、このオプションを有効にします。スキーマの使用方法を決定します。
  • すべての XML 文書に使用する
  • DTD/スキーマが指定されていない文書にのみ使用する (Use only for documents which do not specify DTD/schema)
マスター スキーマ既定値をそのまま使用するか、さらにファイルを追加します。
依存関係スキーマと DTD既定値をそのまま使用するか、さらにファイルを追加します。

Entity settings

設定手順
エンティティの変換を有効にするエンティティ設定では、特殊文字を対応する HTML エンティティに変換するかどうかを指定します。エンティティ変換を有効にするかどうかに応じて、チェック ボックスをオンまたはオフにします。
数値エンティティ リファレンスをインライン プレースホルダ タグに変換する数値エンティティ変換を有効にするかどうかに応じて、チェック ボックスをオンまたはオフにします。
ロック コンテンツ内で変換をスキップするロックされたコンテンツで変換をスキップにするかどうかに応じて、チェック ボックスをオンまたはオフにします。
エンティティの追加プラス記号を選択し、文字を追加して、次のチェック ボックスをオンにするかどうかを決定します。
  • [文字として読み取る] - 有効な場合、この設定で、解析中にそれぞれの文字に変換されるエンティティを指定します。
  • [エンティティとして書き込む] - 有効な場合、この設定で、書き込み中にそれぞれのエンティティに変換される文字を指定します。
エンティティの編集入力された値を調整します。

Embedded Content

設定手順
埋め込みコンテンツの処理 このチェック ボックスをオンにすると、埋め込みコンテンツの処理が有効になります。次に、1 つの処理方法を指定します: [次を持つ CDATA 要素内][パーサー規則で定義済み][文書構造の情報で定義済み]
次を持つ CDATA 要素内CDATA は文字データを表し、マークアップされたコンテンツではなく、テキスト データとして文字どおりに解釈されるようにマークされた要素のコンテンツの一部を指します。このオプションを有効にすると、次のエンティティにより要素が解釈されます: Embedded Content Plain Text v 1.0.0.0
パーサー規則で定義済みパーサー規則を追加するには、次の手順に従います。
  1. [パーサー規則]および[埋込みプロセッサ ID]のリストから、使用可能ないずれかの値を選択します。
  2. プラス記号を選択します。
[文書構造の情報で定義済み] - [文書構造の情報][文書構造の情報]リストから、使用可能ないずれかの値を選択し、プラス記号を選択します。
[文書構造の情報で定義済み] - [タグ定義規則]上記の[文書構造の情報]リストからタグ要素を選択した場合は、次のようにタグ定義規則を追加します:
  1. [新しい規則の追加]を選択します。
  2. [タグの種類]リストから、次のどちらかの値を選択します: [プレースホルダ]または[タグ ペア]
  3. [正規表現]フィールドに、正規表現を入力します。
  4. [大文字と小文字を区別しない]チェック ボックスをオンにすると、指定したコンテンツで大文字と小文字が区別されなくなります。それ以外の場合は、既定値 (チェックボックスをオフ) のままにします。
  5. [プレースホルダの動作]リストから、分節化の実行方法を決定する次のいずれかの値を選択します: [除外可能にする] (既定)、[含める][テキストに含める][除外]。ここで指定する値は、[パーサー] > [新しい規則の追加] > [プロパティ] > [詳細設定] > [分節化のヒント]でパーサー規則を設定するときに使用できます。このトピックを確認して、各分節化のヒントについて参照してください
  6. [保存]を選択します。