Sorry, this produces the correct result

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

when I run it on the XML:

<nitf><body>*</body></nitf>

Are you sure you're using 0.44? This looks like a problem that existed
in the older versions. If it's 0.44 then please send the full XML input.

Tom

Marcel Schwarz wrote:
> 
> 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