IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Translate Line Feed XSLT 1.0 Options · View
oli-87
Posted: Wednesday, January 30, 2019 11:55:08 AM
Rank: Member

Joined: 3/10/2016
Posts: 10
Location: Germany
Dear experts,

I try to map some rawtext inluding Line feed and carriage return in a new xml. My Problem is, that I don't have this values in the XML, it's only vissible with hidden symbols. Example:

<RawText>Test Kaufgesuch EFH
Zu vermieten, möglichst Nähe Aalen, mit großem Garten (ca 600 m²), Doppelgarage, gute Lage, evtl. Carport bis 1000,- Euro Miete.
Ich freue mich auf Ihren Anruf unter Tel. (12345) 67890.
</RawText>




In the result xml. the symbol is:

<objekt_text lang="Test Kaufgesuch EFH&#xA;Zu vermieten, möglichst Nähe alen, mit großem Garten (ca 600 m²), Doppelgarage, gute Lage, evtl. Carport bis 1000,- Euro Miete.&#xA;Ich freue mich auf Ihren nruf unter Tel. (12345) 67890.&#xA;"/>


So, I try to translate the &#xA; symbol in "".




The problem is, that Map Force translate this string internal:

Quote:
<xsl:value-of select="translate(string(XML/Production/Ad/RawText), '&amp;#xA;', '')"/>



Then the translation is not working, of course.

Do anybody a solution for this issue, how can I erase the line feed / return?

Thanks a lot for tip :-)

Kind regards
Oli-87


oli-87 attached the following image(s):
map_force.JPG
xml_hidden_symbols.JPG

that
Posted: Wednesday, January 30, 2019 12:32:16 PM
Rank: Advanced Member

Joined: 6/16/2006
Posts: 486
Location: AT
You might want to use normalize-space function instead of translate.
oli-87
Posted: Wednesday, January 30, 2019 2:16:17 PM
Rank: Member

Joined: 3/10/2016
Posts: 10
Location: Germany
that wrote:
You might want to use normalize-space function instead of translate.


Hello "that",

thanks very much. After I saw your answer, the question is very silly. :-)
But I didn't find this function.

Problem solved.

Kind regards
Oli-87
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.