<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 >

<xsl:output method="text"/>

<xsl:template name="lstrip">
   <xsl:param name="string"/>
   <xsl:choose>
      <xsl:when test="starts-with($string, '&#x0A;') or 
                      starts-with($string, '&#x0D;') or 
                      starts-with($string, '&#x20;')">
         <xsl:call-template name="lstrip">
            <xsl:with-param name="string" select="substring($string, 2)"/>
         </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
         <xsl:value-of select="$string"/>
      </xsl:otherwise>
   </xsl:choose>
</xsl:template>

<xsl:template match="comment()">
   <xsl:variable name="marker" select="'Notation3 Source:'"/>

   <xsl:if test="contains(., $marker)">
      <xsl:variable name="string" select="substring-after(., $marker)"/>
      <xsl:call-template name="lstrip">
         <xsl:with-param name="string" select="$string"/>
      </xsl:call-template>
   </xsl:if>
</xsl:template>

<xsl:template match="text()|@*"/>

</xsl:stylesheet>
