You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/03/19 17:33:50 UTC

DO NOT REPLY [Bug 7094] - Templates matching comment() are ignored by XSLTC

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7094>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7094

Templates matching comment() are ignored by XSLTC





------- Additional Comments From tom.amiro@sun.com  2002-03-19 16:33 -------
>From the information provided, I cannot reproduce the problem with 
either Xalan or XSLTC. Taking the xml content from conf test node11.

<?xml version="1.0"?> 
<doc att="top">
  <?a-pi some data?>
  <!-- This is the 1st comment -->
  text-in-doc
  <inner blat="blob">
    inner-text
    <!-- This is the 2nd comment -->
    <sub>subtext</sub>
  </inner>
  text-in-doc2
</doc>

I took a slightly modified version of the template 

  <xsl:template match="processing-instruction()|comment()">
    <xsl:comment>
      <xsl:value-of select="."/>
    </xsl:comment>
  </xsl:template>

and got the following when running the transformation with 
Xalan and XSLTC from the command line.
Running xalan on bug7094
<?xml version="1.0" encoding="UTF-8"?>

  <!--some data-->
  <!-- This is the 1st comment -->
  text-in-doc
  
    inner-text
    <!-- This is the 2nd comment -->
    subtext
  
  text-in-doc2

Running XSLTC with Xerces Parser on bug7094
<?xml version="1.0" encoding="UTF-8" ?>

  <!--some data-->
  <!-- This is the 1st comment -->
  text-in-doc
  
    inner-text
    <!-- This is the 2nd comment -->
    subtext
  
  text-in-doc2

We need more information to figure out the problem. Were you using 
TrAX? If so please provide the code. In the same context, does Xalan work?