title: Extract XML inside another xml having multiple records
body: <p>I am pulling clob data from a JDBC server and the below is the sample format of the xml</p>
  
  <p><a href="https://i.stack.imgur.com/Crt96.jpg" rel="nofollow noreferrer">1</a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Sales_Posting&gt;
  &lt;row&gt;
  &lt;ORGANIZATION_ID&gt;1&lt;/ORGANIZATION_ID&gt;
  &lt;RTL_LOC_ID&gt;269&lt;/RTL_LOC_ID&gt;
  &lt;POSLOG_DATA&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
          &amp;lt;POSLog xmlns=&amp;quot;http://www.nrf-arts.org/IXRetail/namespace/&amp;quot;
               xmlns:dtv=&amp;quot;http://www.datavantagecorp.com/xstore/&amp;quot;
               xmlns:xs=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;
               xs:schemaLocation=&amp;quot;http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd&amp;quot; &amp;gt;
  &amp;lt;Transaction xmlns:dtv=&amp;quot;http://www.datavantagecorp.com/xstore/&amp;quot; CancelFlag=&amp;quot;true&amp;quot; OfflineFlag=&amp;quot;false&amp;quot; TrainingModeFlag=&amp;quot;false&amp;quot; dtv:AppVersion=&amp;quot;17.0.0.0.716 - 0.0.0 - 0.0&amp;quot; dtv:TransactionType=&amp;quot;RETAIL_SALE&amp;quot; &amp;gt;
  &amp;lt;dtv:OrganizationID&amp;gt;&amp;lt;![CDATA[1]]&amp;gt;&amp;lt;/dtv:OrganizationID&amp;gt;
  &amp;lt;RetailStoreID&amp;gt;&amp;lt;![CDATA[269]]&amp;gt;&amp;lt;/RetailStoreID&amp;gt;
  &amp;lt;WorkstationID&amp;gt;&amp;lt;![CDATA[2]]&amp;gt;&amp;lt;/WorkstationID&amp;gt;
  &amp;lt;/Transaction&amp;gt;
  &amp;lt;/POSLog&amp;gt;&lt;/POSLOG_DATA&gt;
          &lt;CREATE_DATE&gt;2019-07-17 20:57:56.536&lt;/CREATE_DATE&gt;
      &lt;/row&gt;
  &lt;row&gt;
      &lt;ORGANIZATION_ID&gt;1&lt;/ORGANIZATION_ID&gt;
      &lt;RTL_LOC_ID&gt;269&lt;/RTL_LOC_ID&gt;
      &lt;POSLOG_DATA&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
          &amp;lt;POSLog xmlns=&amp;quot;http://www.nrf-arts.org/IXRetail/namespace/&amp;quot;
               xmlns:dtv=&amp;quot;http://www.datavantagecorp.com/xstore/&amp;quot;
               xmlns:xs=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;
               xs:schemaLocation=&amp;quot;http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd&amp;quot; &amp;gt;
  &amp;lt;Transaction xmlns:dtv=&amp;quot;http://www.datavantagecorp.com/xstore/&amp;quot; CancelFlag=&amp;quot;false&amp;quot; OfflineFlag=&amp;quot;false&amp;quot; TrainingModeFlag=&amp;quot;false&amp;quot; dtv:AppVersion=&amp;quot;17.0.0.0.716 - 0.0.0 - 0.0&amp;quot; dtv:TransactionType=&amp;quot;RETAIL_SALE&amp;quot; &amp;gt;
  &amp;lt;dtv:OrganizationID&amp;gt;&amp;lt;![CDATA[1]]&amp;gt;&amp;lt;/dtv:OrganizationID&amp;gt;
  &amp;lt;RetailStoreID&amp;gt;&amp;lt;![CDATA[269]]&amp;gt;&amp;lt;/RetailStoreID&amp;gt;
  &amp;lt;WorkstationID&amp;gt;&amp;lt;![CDATA[2]]&amp;gt;&amp;lt;/WorkstationID&amp;gt;
  &amp;lt;/Transaction&amp;gt;
  &amp;lt;/POSLog&amp;gt;&lt;/POSLOG_DATA&gt;
      &lt;CREATE_DATE&gt;2019-07-18 06:20:38.014&lt;/CREATE_DATE&gt;
  &lt;/row&gt;
  &lt;/Sales_Posting&gt;
  </code></pre>
  
  <p>I need to pull the xml inside the tag .</p>
  
  <p>For a single record I am able to pull the data using the below code</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:output method="text" indent="yes"/&gt;
      &lt;xsl:template match="/"&gt;
          &lt;xsl:value-of select="/Sales_Posting/row/POSLOG_DATA"/&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>But I require it for multiple records.</p>
  
  <p>XSLT 1.0 is preferable. If the result is possible via multiple xslt mappings then that is also fine for me.</p>
  
  <p>Expected Output is :-</p>
  
  <p><a href="https://i.stack.imgur.com/BMCwt.jpg" rel="nofollow noreferrer">2</a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Sales_Posting&gt;
      &lt;row&gt;
          &lt;POSLog xmlns="http://www.nrf-arts.org/IXRetail/namespace/"
          xmlns:dtv="http://www.datavantagecorp.com/xstore/"
          xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
          xs:schemaLocation="http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd"&gt;
         &lt;Transaction CancelFlag="true"
                  OfflineFlag="false"
                  TrainingModeFlag="false"
                  dtv:AppVersion="17.0.0.0.716 - 0.0.0 - 0.0"
                  dtv:TransactionType="RETAIL_SALE"&gt;
        &lt;dtv:OrganizationID&gt;1&lt;/dtv:OrganizationID&gt;
        &lt;RetailStoreID&gt;269&lt;/RetailStoreID&gt;
        &lt;WorkstationID&gt;2&lt;/WorkstationID&gt;
     &lt;/Transaction&gt;
  &lt;/POSLog&gt;
  &lt;/row&gt;
  &lt;row&gt;
      &lt;POSLog xmlns="http://www.nrf-arts.org/IXRetail/namespace/"
          xmlns:dtv="http://www.datavantagecorp.com/xstore/"
          xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
          xs:schemaLocation="http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd"&gt;
         &lt;Transaction CancelFlag="true"
                  OfflineFlag="false"
                  TrainingModeFlag="false"
                  dtv:AppVersion="17.0.0.0.716 - 0.0.0 - 0.0"
                  dtv:TransactionType="RETAIL_SALE"&gt;
        &lt;dtv:OrganizationID&gt;1&lt;/dtv:OrganizationID&gt;
        &lt;RetailStoreID&gt;269&lt;/RetailStoreID&gt;
        &lt;WorkstationID&gt;2&lt;/WorkstationID&gt;
     &lt;/Transaction&gt;
  &lt;/POSLog&gt;
  &lt;/row&gt;
  &lt;/Sales_Posting&gt;
  </code></pre>
  
  <p>I am sharing the image of source structure as well as the expected target structure. Kindly help.</p>