This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Formatting elements
- To: xsl-list at mulberrytech dot com
- Subject: Re: Formatting elements
- From: Gary L Peskin <garyp at firstech dot com>
- Date: Tue, 03 Oct 2000 08:44:45 -0700
- Organization: The Firstech Corporation
- References: <3A43C39D@mail.totalise.co.uk>
- Reply-To: xsl-list at mulberrytech dot com
Stuart Wilson wrote:
>
> Hi,
> I'm new to XSL and I'm having trouble writing a stylesheet. The format of
> my
> input XML is
The following works for me:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="document">
<document>
<title><xsl:value-of select="item[@name='title']/text"/></title>
<bulletlist>
<xsl:apply-templates select="item[starts-with(@name,
'bullet')]/text"/>
</bulletlist>
</document>
</xsl:template>
<xsl:template match="text">
<bullet><xsl:value-of select="."/></bullet>
</xsl:template>
</xsl:stylesheet>
HTH,
Gary
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list