Hi,

parsing a NITF-document with the following XSL:

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

  <xsl:output method="html" />

  <xsl:template match="nitf">
      <xsl:apply-templates select="body" />
  </xsl:template>

  <xsl:template match="body">
        <div id="hl1">
          <xsl:comment>comment</xsl:comment>
          <xsl:value-of select="body.head/hedline/hl1" />
        </div>
        <br/>
  </xsl:template>

</xsl:stylesheet>



returns this HTML-code (missing div-tag and id="hl1" in wrong place):

<!--comment-->headline</div><br id="hl1">



If I put the <div id="hl1"> after the <xsl:comment>, Sablotron returns:

<!--comment--><div id="hl1">headline</div><br>



I am using Sablotron 0.44 with PHP.

Greetings, Marcel.



Reply via email to