Subject: [xsl] Removing unwanted tag content from xsl output to html response. From: "Simon Kelly" <kelly@xxxxxxxxxx> Date: Tue, 11 Mar 2003 10:07:01 +0100 |
Hi all, I am having a problem with a template to pass over some unused tags without printing them out to the responce OutputStream in html. I have the following xsl sheet (Very simple) and when I do not include the <xsl:template match="*" /> I get my output the way I want it, but with all the remainder of the xml as text at the bottom of the screen. If I include the match="*" template I get nothing at all. Any pointers would be handy. (NOTE: All paths in templates are absolute) Cheers Simon [CODE] <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <!-- template rule matching source /root/tables element --> <xsl:template match="/root/tables"> <h1>Avaliable subsystems and signals</h1> <table border="1" cellpadding="3"> <tbody> <tr> <th>Subsystem</th> <th>Time Select (Not implemented)</th> <th>Signal Select</th> </tr> <xsl:apply-templates select="/root/tables/table"/> </tbody> </table> </xsl:template> <xsl:template match="/root/tables/table"> <tr> <td> <b><xsl:value-of select="@name"/></b> </td> <td width="50" bgcolor="red"> <b><u>Time stamp not implemented yet!</u></b> </td> <td> <xsl:for-each select="column"> <xsl:apply-templates select="/root/tables/table/column"/> </xsl:for-each> </td> </tr> </xsl:template> <xsl:template match="/root/tables/table/column"> <b>Click to select :</b><xsl:value-of select="."/><br/> </xsl:template> <!-- This is the line causing the problem --> <xsl:template match="*" /> </xsl:stylesheet> Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : kelly@xxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] selecting nodes based on a de, Robert P. J. Day | Thread | RE: [xsl] Removing unwanted tag con, Jarno . Elovirta |
Re: [xsl] xpath visualizer for linu, Robert P. J. Day | Date | RE: [xsl] Removing unwanted tag con, Jarno . Elovirta |
Month |