<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:str="http://exslt.org/strings"
  xmlns:dp="http://www.datapower.com/extensions"
  extension-element-prefixes="dp"
>
  <xsl:output omit-xml-declaration="yes" />
    
  <xsl:template match="/">
    <xsl:variable name="resp">
      <dp:url-open target="http://127.0.0.1:8888/default-log" 
        response="binaryNode"
      />
    </xsl:variable>

    <xsl:variable name="default-log-txt"
      select="dp:decode(dp:binary-encode($resp/result/binary),'base-64')"/>

    <xsl:variable name="default-log" 
      select="str:tokenize($default-log-txt,'&#10;')"/>

    <xsl:value-of select="count($default-log)"/>
    <xsl:text> log entries in total, this is the first one&#10;&#10;</xsl:text>

    <xsl:copy-of select="$default-log[1]/text()"/>
  </xsl:template>
  
</xsl:stylesheet>