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

RE: Problem making a transformation

Subject: RE: Problem making a transformation
From: "Martin Rowlinson \(MarrowSoft\)" <marrow@xxxxxxxxxxxxxx>
Date: Mon, 11 Aug 2003 13:00:46 +0100
martin rowlinson
Hi Miguel,

The problem is with the line...
    <xsl:template mode="layouttype3">

the <xsl:template> element must have a @match attribute (if it has a
@mode attribute)

Therefore, I think your stylesheet should look something like...

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

  <xsl:template match="/">
    <xsl:apply-templates select="document"/>
  </xsl:template>

  <xsl:template match="contents">
    <xsl:apply-templates select="article[@layouttype = '3']"
mode="layouttype3"/>
  </xsl:template>

  <xsl:template match="article" mode="layouttype3">
        layout 3
    <xsl:value-of select="title"/>
    <xsl:value-of select="text"/>
    <img src="{image}"/>
  </xsl:template>

</xsl:stylesheet>


Hope this helps
Martin Rowlinson
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator




 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.