In this step you will add the instructions that pass the story content to the xmlText GN4 attribute.

Now, as content appears in the original file as:

 <DataContent>

   <nitf>

     <body>

       <body.content>

         <p>Le prestigieux magazine américain Time a annoncé mercredi avoir décerné au photographe de l'Agence

            France-Presse Mauricio Lima son "Prix annuel du photographe d'agence" pour sa couverture "remarquable" de

            la guerre en Afghanistan.</p>

         <p>Le photographe a accompagné pendant quatre semaines les Marines américains dans la province afghane de

            Helmand. Il a aussi travaillé un mois seul dans le pays depuis Kaboul, réalisant des portraits poignants

            de soldats et de civils vivant en zone de guerre.</p>

The below code will take every paragraph and put it in the converted XML:

 <xmlText>

   <xsl:for-each select="$ContentItem/DataContent//p">

     <p>

       <xsl:value-of select="."/>

     </p>

   </xsl:for-each>

 </xmlText>

So it becomes:

 <xmlText>

   <p xmlns="">

    Le sélectionneur allemand Joachim Löw a retenu mercredi, pour le match amical contre la France prévu le 29 février,

    Mario Gomez, Miroslav Klose et Jeronimo Cacau en attaque alors qu'il est privé de plusieurs cadres blessés, dont le

    milieu Bastian Schweinsteiger.

   </p>

   <p xmlns="">

    Parmi les grandes favorites de l'Euro-2012, l'Allemagne présentera une équipe sans surprise pour le match face aux

    Français à Brême, avec 22 joueurs ayant déjà disputé des rencontres qualificatives pour la compétition européenne.

   </p>

Entire code of this step

<?xml version="1.0" encoding="utf-8"?>

<!--

 Simplified XSLT used to import AFP NewsML wires into the system

-->

<story name="{fn:createGuid()}" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 

 <xsl:variable name="folderPath" select="$pars/*/add[@key='folderPath']/@value" />

 <xsl:variable name="sourceName" select="$pars/*/add[@key='sourceName']/@value" />

 <xsl:variable name="copyrightName" select="$pars/*/add[@key='copyrightName']/@value" />

 <xsl:variable name="srcPath" select="$pars/*/add[@key='srcPath']/@value" />

 

 <xsl:variable name="NewsLines" select="NewsItem/NewsComponent/NewsLines"/>

 <xsl:variable name="ContentItem" select="NewsItem/NewsComponent/ContentItem"/>

 

 <xsl:variable name="title">

   <xsl:choose>

     <xsl:when test="string($NewsLines/HeadLine)">

       <xsl:value-of select="$NewsLines/HeadLine"/>

     </xsl:when>

     <xsl:otherwise>

       <xsl:value-of select="$ContentItem/DataContent//p[1]"/>

     </xsl:otherwise>

   </xsl:choose>

 </xsl:variable>

 <xsl:variable name="urgency" select="NewsItem/NewsManagement/Urgency/@FormalName"/>

 <xsl:variable name="language" select="$DescriptiveMetadata/Language/@FormalName"/>

 

 <xsl:if test="string($sourceName)">

   <sourceRef>

     <keyVal>

       <xsl:value-of select="$sourceName"/>

     </keyVal>

   </sourceRef>

 </xsl:if>

 

 <folderRef>

   <keyVal>

     <xsl:value-of select="$folderPath"/>

   </keyVal>

 </folderRef>

 <title>

   <xsl:value-of select="$title"/>

 </title>

  <xmlText>

    <xsl:for-each select="$ContentItem/DataContent//p">

      <p>

        <xsl:value-of select="."/>

      </p>

    </xsl:for-each>

  </xmlText>

</story>