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

excluding xml elements/content with xsl

Subject: excluding xml elements/content with xsl
From: "alan eustace" <alan.eustace@xxxxxxxxxxx>
Date: Thu, 31 May 2001 16:27:31 +0100
xsl excluding elements
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

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.