Subject: Re: [xsl] xslt transformation did not create any output From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx> Date: Fri, 9 Dec 2011 13:42:17 +0100 |
Your templates are named templates (name=) and so they need to be called (<call-template>). If you use <apply-templates> with select=, the templates must contain a match= with an XPath expression. -W On 09/12/2011, Roelof Wobben <rwobben@xxxxxxxxxxx> wrote: > > > Hello, > > > > I have this xml file : > > > > <?xml version="1.0" encoding="utf-8" ?> > <data> > <params> > <today>2011-12-09</today> > <current-time>13:22</current-time> > <this-year>2011</this-year> > <this-month>12</this-month> > <this-day>09</this-day> > <timezone>+01:00</timezone> > <website-name>Tamara Wobben</website-name> > <page-title>Home</page-title> > <root>http://test.tamarawobben.nl</root> > <workspace>http://test.tamarawobben.nl/workspace</workspace> > <root-page>home</root-page> > <current-page>home</current-page> > <current-page-id>4</current-page-id> > <current-path>/home/?debug&symphony-page=home/</current-path> > <parent-path>/</parent-path> > <current-url>http://test.tamarawobben.nl/home/?debug&symphony-page=home/</current-url> > <upload-limit>2097152</upload-limit> > <symphony-version>2.2.5</symphony-version> > <cookie-username>admin</cookie-username> > <cookie-pass>bd619be1eb114dce7512fc0c5af1487c58074ab4</cookie-pass> > <site-mode>live</site-mode> > <ds-section> > <item handle="1"><span class="order">1</span></item> > </ds-section> > </params> > <events /> > <section> > <section id="6" handle="sections">Sections</section> > <entry id="9"> > <title handle="even-voorstellen">Even voorstellen</title> > <body>Naam : Tamara Wobben > Geboorte gewicht : 2000 gram > Geboorte lengte : 44 cm. > Geboortedatum : 1 september 2005 > </body> > </entry> > </section> > </data> > > > And this xslt 1.0 file : > > > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template match="/" > > <xsl:apply-templates select="head"/> > <xsl:apply-templates select="content"/> > <xsl:apply-templates select="bottom" /> > </xsl:template> > > <xsl:template name="head" > > <head> > <title> > <xsl:value-of select="$website-name"/> - <xsl:value-of > select="$page-title"/> > </title> > <link rel="stylesheet" type="text/css" > href="{$workspace}/assets/css/style.css"/> > <link rel="alternate" type="application/rss+xml" title="Notepad > Chaos RSS Feed" href="http://www.notepadchaos.com/feed/" /> > <link rel="pingback" href="http://www.notepadchaos.com/xmlrpc.php" > /> > <link rel="alternate" type="application/rss+xml" title="Notepad > Chaos Feed" href="http://www.notepadchaos.com/feed/" /> > <link rel="alternate" type="application/rss+xml" title="Notepad > Chaos Comments Feed" href="http://www.notepadchaos.com/comments/feed/" /> > <link rel="EditURI" type="application/rsd+xml" title="RSD" > href="http://www.notepadchaos.com/xmlrpc.php?rsd" /> > <link rel="wlwmanifest" type="application/wlwmanifest+xml" > href="http://www.notepadchaos.com/wp-includes/wlwmanifest.xml"/> > <link rel='index' title='Notepad Chaos' > href='http://www.notepadchaos.com/' /> > </head> > </xsl:template> > > <xsl:template name="content" > > <div id="outer"> > <div id="container"> > <div id="search"> > <form method="get" id="searchform" > action="http:/test.tamarawobben.nl/"> > <input type="text" value="" > name="s" id="s" class="txtField" /> > <input type="submit" > id="searchsubmit" class="btnSearch" value="Find It ;" /> > </form> > /div> > <div id="title"> > <h2>Tamara Wobben </h2> > </div> > <div id="content"> > <xsl:apply-templates select="main_area" /> > </div> > <div id="side-columns" /> > <xsl:apply-templates select="sidebar1" > /> > <xsl:apply-templates select="sidebar2" > /> > </div> > </div> > </div> > </xsl:template> > > <xsl:template name="main_area"> > <div class="col01"> > <div class="post"> > <h2><xsl:value-of select="title"/></h2> > <div class="post-inner"> > <h4><xsl:value-of > select="section/entry/description"/></h4> > <xsl:value-of select="section/entry/body" /> > > </div> > </div> > </div> > </xsl:template> > > <xsl:template name="sidebar1" > > <div class="col02"> > <div class="pages"> > <ul> > <!-- here comes the links to home, guestbook and so on > --> > </ul> > </div> > </div> > <div class="head_menu"> > <!-- here comes the head menu --> > </div> > </xsl:template> > > <xsl:template name="sidebar2" > > <div class="col03"> > <div class="recent-posts"> > <ul> > <!-- here comes the recent post --> > </ul> > </div> > </div> > </xsl:template> > > <xsl:template name="bottom"> > <div id="footer-holder"> > <div class="footer"> > © <a href="http://www.notepadchaos.com/">Notepad > Chaos</a><br /> > <a href="http://www.notepadchaos.com/">Notepad Chaos</a> uses > the <a href="http://www.notepadchaos.com">"Notepad Chaos v2"</a> theme. > </div> > <span class="evaneckard"> > <a href="http://www.evaneckard.com">Evan Eckard Design</a> > </span> > <span class="smashing"> > <a href="http://www.smashingmagazine.com">Smashing > Magazine</a> > </span> > <span class="rss"><a > href="http://www.notepadchaos.com/feed/">RSS</a> > </span> > </div> > </xsl:template> > > </xsl:stylesheet> > > > But if I run this in xmlspy I get the message that the transformation did > not create any output. > > Can anyone help me figure out what i did wromg here ? > > > > Roelof
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xslt transformation did not c, Roelof Wobben | Thread | RE: [xsl] xslt transformation did n, Roelof Wobben |
[xsl] xslt transformation did not c, Roelof Wobben | Date | RE: [xsl] xslt transformation did n, Roelof Wobben |
Month |