|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] excluding xml elements/content with xsl
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






