This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Displaying text nodes and child nodes
- From: Américo Albuquerque <aalbuquerque at viseu dot ipiaget dot pt>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 24 May 2002 11:25:38 +0100
- Subject: [xsl] Displaying text nodes and child nodes
- Keywords: XSL-List
- Reply-to: xsl-list at lists dot mulberrytech dot com
> You can write an empty template for each element you wish to ignore.
> If you wish to ignore all <b> elements your template would be:
>
> <xsl:template match="b">
> </xsl:template>
>
>
> then you only need to apply all templates to the <description> element:
>
> <xsl:template match="description">
> <xsl:apply-templates/>
> </xsl:template>
>
>
> Cheers,
>
> Filipe
Hi
yes, but I don't want to ignore them, I want to pass them as they are so
that all of the html tags are recognized in the browser.
I try to use a cdata to make the stylesheet ignore those tags but it pass to
the browser as smile text and they are shown as <tag>.
the problem about the <xsl:copy> is that it ignore the text nodes, just pass
the tags.
so if I have something like:
<li>first occurrence</li>
<li second occurrence</li>
it pass has:
<li></li>
<li></li>
with no text at all!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list