[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] excluding xml elements/content with xsl
Subject: [xsl] excluding xml elements/content with xsl From: "alan eustace" <alan.eustace@xxxxxxxxxxx> Date: Thu, 31 May 2001 16:27:31 +0100 |
can anyone shed any light on the following? I want to exclude part of my xml content-specifically i want to exclude the text between the opening and closing <message> tags. I want to format the page to display message titles as html anchor tags, and exclude the message body. the xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE bbs []> <bbs> <message id="1" title="New message">This is a message being processed thus</message> <message id="2" title="thursday"> enter comments here</message> </bbs> which is formatted to html thus: <?xml version='1.0' encoding='utf-8' ?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" indent="yes"/> <xsl:variable name="servlet-dir">/servlet/XSL? id=</xsl:variable> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="bbs"> <html> <head> <title> <xsl:value-of select="@title"/> </title> </head> <body bgcolor="#000099" text="#ffffff"> <img src = "new2.jpg"/> <xsl:apply- templates select="message"/> <br/> </body> </html> </xsl:template> <xsl:template match="message"> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td bgcolor="#996600"> <font color="#ffffff" face="helvetica, arial, sans-serif" size="+1"> <b> <a href="{$servlet- dir}{@id}"><xsl:value-of select="@title"/> </a> </b> <br/> </font> </td> <br/> </tr> </table> <xsl:apply-templates/> <br/> </xsl:template> <xsl:template match="id"><xsl:apply-templates/></xsl:template> <xsl:template match="title"><xsl:apply- templates/></xsl:template></xsl:stylesheet> many thanks in advance to anyone with suggestions :) alan eustace _____________________________________ Get your free E-mail at http://www.ireland.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to parse a fragment resul, Janning Vygen | Thread | Re: [xsl] excluding xml elements/co, Oliver Becker |
Re: [xsl] conditional match, Wendell Piez | Date | RE: [xsl] String to number, Michael Kay |
Month |
Keywords