[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Formatting elements
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
|
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
|