xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brosius <DBros...@Primavera.com>
Subject Re: Text output between tags
Date Wed, 22 Aug 2007 00:21:34 GMT
did you mean to use xsl:copy, as opposed to xsl:copy-of ?





Michael Bauer <codechimp@gmail.com> 
08/21/2007 08:03 PM

To
xalan-j-users@xml.apache.org
cc

Subject
Text output between tags






I know I am a newb, but please bear with me:

I have a simple XSL doc:

<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/HTML/BODY">
    Start
<xsl:apply-templates />
Stop
</xsl:template>
<xsl:template match="TD[@bgcolor='ffffee']">
  Starting TD Match
  <xsl:copy-of select="."/>
  Ending TD Match
</xsl:template>
</xsl:stylesheet>


It basically looks for all column nodes with the bgcolor attribute set to 
ffffee.  What's wierd is that, upon running it on the page at 
http://biz.yahoo.com/p/, it outputs not only what I tell it too (the 
literals plus the copy of the TD tags), but also the text between ALL 
tags.  What am I doing wrong?

The foo.out is one such failed attempt to make this work.

BTW, I am using the nekoHTML recommended earlier, and it seems to parse 
the HTML just fine.



Mime
View raw message