[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Removing unwanted tag content from xsl output to html

Subject: Removing unwanted tag content from xsl output to html response.
From: "Simon Kelly" <kelly@xxxxxxxxxx>
Date: Tue, 11 Mar 2003 10:07:01 +0100
xsl tag content
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.