XML file with embedded content - how to exclude text from translation

I've got an XML structure with nodes like this one:

<p id="260">This document covers the &lt;Model&gt;.</p>

I want the content of the <p> nodes to be translated, except for &lt;Model&gt.

I've set up an XML (Legacy Embedded Content) file type. In the Parser rules, <p> is set as translatable.

In Embedded Content (Legacy), I've set:

- checked Enable embedded content processing

- Document structure information: added a custom type named "Variable"

- tag definition rules: start tag&gt;  end tag &lt;  Tag pair, Not translatable.

Now in my preview, I expect a segment "This document covers the "

Instead, I get "This document covers the <Model>."

So my embedded content isn't being filtered out. I'm doing something wrong, but what?

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="AuthorIT.xslt"?>
<AuthorIT version="20.3.1.40442" xmlns="http://www.authorit.com/xml/authorit" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.authorit.com/xml/authorit AuthorIT.xsd">
	<Objects>
		<Book wordcount="25">
			<Object>
				<Description>Headers and Footers</Description>
				<GUID>9e6905caaefa4b019204e85a0bd8789e</GUID>
				<ID>6116</ID>
				<VariantParentID>4091</VariantParentID>
			</Object>
			<ContentsNodes>
				<Node id="4092"></Node>
				<Node id="4093"></Node>
				<Node id="4094"></Node>
				<Node id="11821"></Node>
			</ContentsNodes>
			<VariableAssignments>
				<VariableAssignment>
					<ID>70</ID>
					<Name>Model_Number</Name>
					<Value>300</Value>
					<ValueObject>0</ValueObject>
					<Style>-1</Style>
					<PublishPrompt>true</PublishPrompt>
					<IsVariantCriteria>false</IsVariantCriteria>
				</VariableAssignment>
			</VariableAssignments>
			<PrintByLine>Art. No.: &lt;Article_Number&gt;</PrintByLine>
			<PrintVersion>&lt;Version&gt;</PrintVersion>
			<WebVersion>&lt;Version&gt;</WebVersion>
		</Book>
		<Topic wordcount="1">
			<Object>
				<Description>Back Page</Description>
				<GUID>390099a7512b4ba79fa2245641714d47</GUID>
				<ID>6205</ID>
				<VariantParentID>4113</VariantParentID>
			</Object>
			<Headings></Headings>
			<RelatedGroups></RelatedGroups>
			<Text>
				<p id="254">&lt;Version&gt;</p>
			</Text>
			<VariableAssignments></VariableAssignments>
			<PrintSuperHeading></PrintSuperHeading>
			<WebTitle></WebTitle>
		</Topic>
	</Objects>
</AuthorIT>
AIT variables test filter.zip

Parents
  • Thanks to Daniel's info I was able to modify the filter.

    This is what I ended up doing (this is for an XML Legacy filter, for the new XML filter format it's slightly different):

    1. In the parser rules, every tag that can contain a variable must have a 'Context' entry.
    2. To add a context entry:
      double-click the tag
      in the 'edit rule' dialog, click 'Edit'.
      In the Structure Information Properties dialog, click 'Add'.
      In the Add Structure Information dialog, click in the Name field.
      Enter a context name, for example 'text'.
      Make a note of the Identifier field.
      If the Name field contains upper case letters, these will be converted to lowercase in the Identifier field.
    3. On the Embedded Content (Legacy) page, check the 'Enable embedded content processing' check box.
    4. In the 'Document structure information' field, add the Identifier for each tag you want to filter the variable names in. If you add the Name field, it won't work. So 'text' and not 'Text'.
    5. In the Tag Definition Rules area, add the rule, in my case the start tag is <.*?>
    6. Click Advance to set the segmentation rule. I chose Include.
Reply
  • Thanks to Daniel's info I was able to modify the filter.

    This is what I ended up doing (this is for an XML Legacy filter, for the new XML filter format it's slightly different):

    1. In the parser rules, every tag that can contain a variable must have a 'Context' entry.
    2. To add a context entry:
      double-click the tag
      in the 'edit rule' dialog, click 'Edit'.
      In the Structure Information Properties dialog, click 'Add'.
      In the Add Structure Information dialog, click in the Name field.
      Enter a context name, for example 'text'.
      Make a note of the Identifier field.
      If the Name field contains upper case letters, these will be converted to lowercase in the Identifier field.
    3. On the Embedded Content (Legacy) page, check the 'Enable embedded content processing' check box.
    4. In the 'Document structure information' field, add the Identifier for each tag you want to filter the variable names in. If you add the Name field, it won't work. So 'text' and not 'Text'.
    5. In the Tag Definition Rules area, add the rule, in my case the start tag is <.*?>
    6. Click Advance to set the segmentation rule. I chose Include.
Children
No Data