VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How People Translate Quickly | XML CDATA Section QA: Preserve Literal Markup-Like Text Without Breaking ]]> Boundaries

If you search for XML CDATA QA, CDATA section localization, or ]]> XML error, the problem is a narrow but important XML boundary. CDATA sections let XML carry text that would otherwise look like markup, so characters such as < and & can appear literally inside the section. The trade-off is that the sequence ]]> cannot appear inside one CDATA section because it closes the section.

A fast translation QA workflow therefore treats CDATA as structured text, not a magic ‘ignore XML rules’ zone. Translators may safely edit the human language inside CDATA, but export tooling still has to preserve section boundaries, split forbidden terminators when necessary, and keep the distinction between literal markup examples and real XML markup.

This guide explains how people translate quickly by validating XML CDATA sections before release. It covers CDATA start/end delimiters, literal angle brackets, ampersands, forbidden ]]>, nested-markup examples, XLIFF/TMX/XML pipelines, parser behavior, extraction rules, serializers, round trips, comments, encoding, source preflight and CI.

The owner job is distinct from XML/XPath Extraction Rules and Character-Reference QA. Extraction Rules decide which XML nodes translators should see. Character-Reference QA handles entities and numeric references. CDATA QA owns the literal-text container itself and its one critical terminator boundary.


1. CDATA Lets Markup-Looking Text Remain Character Data

A CDATA section begins with

Translators can therefore work with literal symbols without escaping every occurrence. The enclosing XML still has to remain well formed. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

2. Only the CDATA End Delimiter Closes the Section

Within CDATA, the only delimiter recognized as markup is ]]>. That sequence terminates the section. If translated content or embedded code produces the same three-character sequence, the XML becomes invalid unless the serializer splits the section.

QA should search decoded CDATA content for the terminator before export. One three-character sequence can invalidate an otherwise correct translation. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

3. CDATA Sections Cannot Be Nested

Putting

Nested-CDATAs are not a valid structural solution. Use a serializer that splits and reopens sections when required. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

4. Literal Less-Than Signs Are Expected

A less-than sign inside CDATA is ordinary character data. Do not replace every < with < merely because the file is XML.

That replacement can make users see entity syntax or alter code examples. The correct representation depends on whether the text is inside or outside CDATA. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

5. Literal Ampersands Are Expected

Ampersand can also appear literally inside CDATA without beginning an entity reference. Do not automatically convert it to & inside the section.

Character-reference rules differ across XML character data and CDATA content. QA needs container awareness. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

6. Entity References Are Not Parsed Inside CDATA

A string such as & inside CDATA represents the literal characters ampersand-a-m-p-semicolon rather than automatically becoming one ampersand through XML entity parsing. This matters when translators paste already-encoded HTML or XML text into CDATA.

Double-looking syntax may be intentional literal content. Render or parse according to the downstream layer, not the XML layer alone. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

7. Numeric Character References Are Also Literal Inside CDATA

Text like © inside CDATA is not converted by the XML parser into © merely because it resembles a character reference. If the application later parses the CDATA payload as HTML, a second decoding layer may act.

Document parser order explicitly. CDATA protects the outer XML layer only. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

8. Code Examples Are a Common Use Case

Documentation often wraps XML, HTML or programming examples inside CDATA to avoid outer-parser conflicts. Those examples may contain strings that resemble entities, tags or template syntax.

Treat code examples as protected technical content unless translation is intentionally required. Do not simplify syntax to make the example more readable. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

9. Embedded HTML Can Create Two Parsing Layers

An XML field can contain HTML inside CDATA. The XML parser exposes the CDATA text, then an HTML parser may interpret the payload.

Translation must preserve both the XML boundary and the inner HTML structure. Use round-trip tests through both parsers. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

10. CDATA Is Not a Security Boundary

Putting markup inside CDATA prevents the outer XML parser from treating it as markup, but downstream code can still parse or inject the content later. Do not treat CDATA as sanitization.

Security policy should govern trusted and untrusted rich content. Localization QA should preserve structure without bypassing sanitizers. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

11. A Translator Can Accidentally Create ]]>

Natural-language editing rarely produces ]]> intentionally, but code examples, quoted markup or copied snippets can. Automated QA is ideal because visual review is unlikely to notice the exact sequence.

Flag it deterministically in CDATA-bearing fields. Do not ask translators to memorize the delimiter. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

12. A Serializer Can Split CDATA Safely

XML serializers can close the CDATA section before the problematic sequence and reopen another section so the resulting character data is equivalent. This should be done by tooling rather than by ad hoc manual syntax.

Round-trip the result to ensure the application receives the intended text. Structural repair belongs to the serializer. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

13. Manual Splitting Is Error-Prone

Hand-editing CDATA boundaries adds markup characters that translators may misplace. A missed bracket or wrong order can invalidate the whole file.

Prefer a format-aware export step. Manual intervention should be limited to controlled debugging. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

14. CDATA and Text Nodes Can Be Equivalent to Applications

Many XML applications ultimately care about the combined character data rather than whether it arrived from CDATA or ordinary text nodes. That means serializers may legally change representation while preserving text.

QA should compare parsed values, not only raw markup, when the application does not depend on CDATA identity. Semantic equivalence can reduce false alarms. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

15. Some Applications Care About Lexical CDATA Form

Other workflows preserve CDATA deliberately because downstream tools or humans expect that lexical form. In those cases, raw representation matters in addition to parsed value.

Document whether the project needs CDATA preservation or only text preservation. Do not assume one representation policy fits every XML pipeline. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

16. DOM APIs May Expose CDATA as a Distinct Node Type

Some XML DOM implementations represent CDATA sections separately from ordinary text nodes. Application code can therefore branch on node type even if the character data is equivalent.

Test the actual consumer before normalizing CDATA away. Representation choices can become application semantics. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

17. XPath Extraction Can Include or Exclude CDATA Text

Localization extraction rules often select element text regardless of whether it comes from a text node or CDATA section. Custom XPath or parser logic can behave differently.

Verify representative CDATA-bearing elements during source preflight. Extraction success is a prerequisite for translation QA. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

18. Generic Regex Extraction Is Unsafe

CDATA boundaries can occur across lines and contain arbitrary markup-looking text. Regex extraction can fail on edge cases or surrounding XML structure.

Use an XML parser and format-aware localization filter. Structured formats deserve structured tooling. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

19. XLIFF Can Carry CDATA-Origin Text as Normal Target Content

A CAT tool may import XML CDATA text and expose only the character data to the translator. On export it may choose CDATA, entity-escaped text or another equivalent representation depending on filter settings.

Test one round trip before production. The editor view does not prove the output lexical form. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

20. TMX and TBX Pipelines Can Encounter CDATA Too

Translation-memory and terminology interchange may contain XML content where CDATA is used by particular producers. A bad CDATA terminator can prevent whole assets from importing.

Run XML well-formedness checks before loading reusable resources. One malformed section can block high-value language assets. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

21. XML Comments Are Not CDATA

Comments use and have their own restrictions. Do not convert comments into CDATA or vice versa merely to preserve punctuation.

They carry different semantics. Comment Leakage QA and CDATA QA should remain separate. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

22. Processing Instructions Are Not CDATA

XML processing instructions use syntax and communicate application-specific instructions. They are not character-data containers.

Translators normally should not edit them. Source extraction should exclude them unless a project explicitly localizes content inside. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

23. Attributes Cannot Contain CDATA Sections

CDATA sections occur where character data may occur in element content; they are not a syntax for attribute values. Attribute text must follow XML attribute escaping rules instead.

Do not paste

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

24. CDATA Does Not Disable Encoding Constraints

The text still has to be representable in the chosen XML character encoding. UTF-8 avoids many legacy-character limitations, but a serializer must still write valid bytes.

CDATA is not an alternative to correct encoding. Run encoding QA separately. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

25. UTF-8 Is Usually the Simplest Choice

Modern XML localization pipelines generally benefit from Unicode encodings such as UTF-8. This reduces dependence on numeric references or legacy code pages for target-language characters.

Keep the XML declaration and actual bytes consistent. CDATA should carry real Unicode text cleanly. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

26. Round-Trip Export Is High Value

Create a sample with literal <, &, embedded markup-looking text and a deliberately inserted ]]> test case. Import, translate, export and parse it.

The pipeline should preserve intended text while safely handling the terminator. One small fixture can validate the entire CDATA path. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

27. Parser Validation Should Run Before Linguistic Review Closes

If the final XML is not well formed, reviewers should not spend time polishing target style first. Technical validation can fail fast.

Use the same XML parser family the application trusts where possible. Deterministic structure comes before subjective language. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

28. Compare Parsed Text After Export

Raw XML can change from CDATA to escaped text while parsed character data remains identical. Where lexical form is not contractual, compare parsed values to avoid false positives.

This is especially useful in automated round-trip tests. Semantic tests complement raw diffs. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

29. Compare Raw Form When Lexical Preservation Matters

If a downstream system explicitly depends on CDATA sections, raw XML comparison or node-type tests are necessary. Do not let a parser-level equality test hide a lexical requirement.

State the requirement in the technical brief. QA should match the consumer’s real dependency. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

30. Large CDATA Blocks Need Efficient QA

Documentation or script payloads can contain thousands of characters inside one section. Scanning for ]]> is deterministic and cheap.

Do not rely on human reading to catch the terminator. Automation is stronger exactly where text volume is large. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

31. Translator Notes Must Stay Outside the Payload

A reviewer may be tempted to insert [CHECK] or comments directly into a CDATA block containing user-facing text. Those markers can ship as literal output.

Use CAT comments or issue metadata instead. Process annotations should not contaminate payload text. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

32. Search-and-Replace Can Create the Terminator

Bulk edits to brackets or greater-than signs can accidentally form ]]> across a boundary that did not exist before. Re-run CDATA checks after global transformations.

High-leverage edits can create high-leverage structural damage. Regression QA should follow batch changes. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

33. Machine Translation Can Alter Technical Payloads

If CDATA contains code-like or markup-like fragments mixed with prose, MT may rewrite syntax. Protect code spans or extract translatable text selectively.

Do not treat the entire CDATA payload as ordinary prose automatically. Extraction quality determines downstream safety. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

34. Whitespace Inside CDATA Can Be Significant

CDATA preserves character data including spaces and line breaks. A formatter that reindents the XML outside the section should not rewrite payload whitespace without authorization.

Code examples and preformatted text can depend on exact spacing. Whitespace policy belongs to the payload type. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

35. Line Endings Can Change Inside CDATA

XML parsers normalize certain line endings at the document-processing level. Applications that care about exact raw line endings should not use generic XML character data as a byte-preservation format.

Localization QA should preserve logical text, not promise byte identity where XML itself normalizes. Know the contract. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

36. CDATA Is Not Necessary for Every Special Character

Ordinary XML text can represent < and & through escaping, and many serializers prefer that form. Do not wrap all translated content in CDATA simply to avoid entity syntax.

Use the project’s established representation. More CDATA is not inherently safer. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

37. Removing CDATA Can Be Safe or Breaking

Converting a CDATA section to ordinary escaped text preserves parsed character data in many cases. It can still break systems that inspect lexical node types or raw markup.

Migration requires consumer testing. Representation changes deserve the same discipline as other structural changes. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

38. Nested XML Fragments Need Clear Ownership

A CDATA payload containing an XML fragment may later be parsed as XML again. The translator should know whether inner tag names, attributes or text nodes are translatable.

Use a second structured localization pass if inner content is real markup. Do not translate code and prose as one opaque blob. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

39. HTML Fragments Need Similar Ownership

CDATA often carries HTML snippets in XML-based CMS exports. Outer XML CDATA rules and inner HTML entity/tag rules both apply.

Use layered parsing rather than regex cleanup. One field can legitimately need multiple QA owners. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

40. Tests Should Include Literal Entity-Like Text

Include &, < and numeric-looking references inside a CDATA fixture. The XML parser should preserve them literally at the outer layer.

If downstream HTML parsing is expected, test that separately. Layered fixtures clarify which decoder owns which syntax. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

41. Tests Should Include a Literal Closing-Delimiter Attempt

Insert a controlled ]]> sequence into sample content and verify that the serializer rejects it or splits the section safely. This proves the highest-risk rule is actually enforced.

Do not run the test only with easy text. Failure fixtures build confidence. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

42. CI Can Parse Every XML Artifact

Well-formedness checking will catch unclosed or illegal CDATA sections. Add targeted checks if lexical CDATA preservation is required.

Technical failures can block before deployment. Automation is appropriate because the rule is deterministic. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

43. Vendor Acceptance Can Include CDATA Round Trips

When vendors return XML resources, run parser validation and compare parsed payloads against expected values. Do this before manual linguistic sign-off.

Broken CDATA is a technical return defect. Acceptance criteria should separate structure from translation style. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

44. Do Not Auto-Escape CDATA Content Blindly

Replacing < with < inside CDATA changes the literal payload. That may be wrong if the downstream application expects actual angle brackets.

Repair the container or serializer, not the content, when the problem is structural. Payload semantics outrank visual neatness. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

45. Do Not Auto-Decode Entity-Like Text Inside CDATA

Similarly, turning & into & inside the CDATA payload can alter intended code examples. The outer XML parser deliberately does not resolve those references inside CDATA.

Decode only if a downstream content model explicitly requires it. One layer should not impersonate another. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

46. CDATA QA Complements Character-Reference QA

Outside CDATA, XML character references encode reserved characters; inside CDATA, those sequences are literal text. The same characters therefore require opposite handling depending on container.

Run container-aware checks. Context prevents double encoding and under-decoding. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

47. CDATA QA Complements Inline-Tag QA

A CDATA payload can itself contain HTML or XML-like inline markup intended for another parser. Tag QA should validate the inner language only when that payload is actually markup.

Outer CDATA correctness does not prove inner tag correctness. Layered content needs layered validation. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

48. CDATA QA Complements Build Validation

A general XML parser catches malformed sections; CDATA-specific QA explains why the failure happened and protects lexical requirements. Use broad build gates plus focused diagnostics.

Specific messages shorten repair time. Technical QA should be both strict and understandable. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

49. Release QA Should Inspect the Final Serialized XML

The CAT project can look perfect while export introduces a bad terminator or changes CDATA representation. Parse the exact artifact that ships or enters the CMS.

Round-trip and release checks belong at the boundary. Final evidence should match final files. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.

50. Fix the Serializer When the Problem Repeats

If a tool repeatedly mishandles ]]> or CDATA preservation, repair or replace that export stage. Do not teach translators manual delimiter surgery.

Systemic defects need systemic fixes. Localization QA should remove recurring infrastructure burdens. The safe workflow treats CDATA as an XML container with precise lexical rules and treats the contained language as payload.

A practical QA step is to parse the XML, identify CDATA-bearing nodes, scan payloads for the forbidden terminator, round-trip a representative sample, and compare parsed character data plus lexical form where the consumer requires it. Repair the serializer rather than hand-editing delimiters.


Practical XML CDATA QA Workflow

Identify which XML nodes use CDATA and whether lexical CDATA preservation is required.

Expose only intended human-language payload to translators.

Scan CDATA content for the forbidden ]]> terminator before export.

Use an XML serializer that can split CDATA safely when required.

Round-trip representative literal <, &, entity-like strings and embedded markup.

Validate the final XML with a native parser.

Compare parsed values and raw CDATA form according to the actual consumer contract.

Worked Example: A Code Sample Introduces the CDATA Terminator

An XML-based help system stores code examples in CDATA. A translator localizes the explanatory text around a JavaScript snippet, and the snippet itself contains the literal sequence ]]> as part of a demonstration.

The CAT editor shows ordinary text and the translator sees no error. On export, the sequence closes the CDATA section early and the rest of the XML fails to parse.

CDATA QA detects the forbidden terminator in the payload. The serializer splits the section safely so the parsed character data remains identical, and the final XML validates.

The translation wording is unchanged. The fix belongs to XML serialization, not to rewriting the technical example.

Frequently Asked Questions

What is an XML CDATA section?

It is an XML character-data section delimited by

Can CDATA contain < and & literally?

Yes. Inside CDATA those characters are ordinary character data at the XML layer.

What cannot appear inside one CDATA section?

The sequence ]]> cannot occur inside the section because it is the closing delimiter.

Can CDATA sections be nested?

No. A second

Can CI validate CDATA?

Yes. Standard XML parsing catches malformed CDATA boundaries, and targeted tests can verify forbidden terminators and lexical-preservation requirements.

XML Standard Guidance

The XML 1.0 specification defines CDATA sections as character-data containers beginning with <![CDATA[ and ending with ]]>. Within a CDATA section, only the end delimiter is recognized as markup; < and & may appear literally, and CDATA sections cannot nest. See the W3C XML specification.

The practical localization consequence is simple: CDATA makes some XML escaping unnecessary, but it creates a hard boundary around one forbidden sequence. Format-aware serializers and parser-based QA are safer than manual delimiter editing.

Conclusion

XML CDATA Section QA protects a small lexical rule with outsized consequences.

A fast workflow keeps payload text separate from outer XML syntax, detects ]]> automatically, round-trips representative content and lets serializers split sections safely when needed.

When the container is handled correctly, translators can work with literal markup-like text without becoming XML delimiter engineers.


Continue the Translation Series

Read How People Translate Quickly | XML and XPath Extraction Rules.

Read How People Translate Quickly | Character-Reference & Entity-Decoding QA.

Read How People Translate Quickly | XLIFF Structural Validation.

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading