CDATA section causes end of segment - how do I have to modify my rules?

Former Member
Former Member

Hello all!

I would like to hear your advice on this XML with unusual CDATA sections.
It's not an urgent problem, because I already found a workaround, but I'd love to know if I could have done it straight away with the SDL Studio 2015 file type rules.

This is the XML I'd like to prepare:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
<FORMAT name="p"/>
<FORMAT name="p">Some text.  Mehr auf dieser <LINK linktemplate="externer_link" type="genericLink"><![CDATA[PFRFnothingtotranslatehereSFDGERT=]]>
<CMS_VALUE name="lt_linktext">Website</CMS_VALUE>
<CMS_VALUE name="lt_link">www.umweltbundesamt.de/</CMS_VALUE>
</LINK>.
</FORMAT>
</root>

 As you can see, there is an inline CDATA section that has not to be translated.
I managed to create the rules, but without my workaround I cannot avoid that Studio splits my segment before the CDATA section.

This is my set of rules:



The segmentation hint for //LINK is "include".

The output looks more or less like this:

My workaround is:

<LINKCDATA hide=" replaces <![CDATA[

and

"></LINKCDATA> replaces ]]>

adding a rule for //LINKCDATA - not translatable - inline.

The result is a single segment, not two.

But I'd really like to know if I'm thinking too complicated...

As I was writing this post, I found this article:

community.sdl.com/.../6616

The solution indicated there does not seem to apply in my case. Should it?


Thank you,
Andreas

Parents Reply Children
No Data