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

where's here the error

Subject: where's here the error
From: Roelof Wobben <rwobben@xxxxxxxxxxx>
Date: Sat, 31 Dec 2011 09:07:48 +0000
 where's here the error
Hello,



I try to use this idea for my site
(http://symphony-cms.com/learn/articles/view/overriding-templates/ )



So I did this :





master.xml :



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

<xsl:import href="../utilities/top.xsl"/>
<xsl:import href="../utilities/frontpage-article.xsl"/>
<xsl:import href="../utilities/recent_posts.xsl"/>


<xsl:output method="xml"
 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
 omit-xml-declaration="yes"
 encoding="UTF-8"
 indent="yes" />

<xsl:template match="/">
<xsl:apply-templates select="data/params" mode="top" />
     <body>
             <div id="outer">
                 <div id="container">
                     <div id="search">
                         <form method="get" id="searchform"
action="http://www.notepadchaos.com/">
                             <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><xsl:text>Tamara Wobben</xsl:text></h2>
                        </div>
                     </div>
                     <div id="content">
                        <div class="col01">
                                <div class="post">
                                     <xsl:apply-templates select="data" />
                                </div></div>
                              <div class="side-columns">
                             <div class="col02">
                                 <div class="pages">
                                     <!-- hier komen de losse pagina's -->
                                 </div>
                                 <div class="pages-bottom"></div>
                                 <div class="categories-upper"></div>
                                 <div class="categories">
                                    <!-- hier komt het menu  -->
                                </div>
                                 <div class="categories-btm"></div>
                                </div>
                             <div class ="col03">
                                <div class="recent-posts" >
                                   <xsl:apply-templates
select="data/recent-posts/entry" />
                                </div>
                                <div class="postit-bottom"></div>
                            </div>
                         </div>
<br style="clear:both" />
                     </div>
                     <xsl:apply-templates select="data/params" mode="down" />
                </div>
            </body>
</xsl:template>

</xsl:stylesheet>



frontpage.xsl :



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

<xsl:import href="../utilities/master.xsl"/>
<xsl:import href="../utilities/frontpage-article.xsl"/>

<xsl:template name="data">
     <xsl:apply-templates select="section/entry" />
</xsl:template>

</xsl:stylesheet>





frontpage-article.xsl :



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

<xsl:template match="section/entry">
   <h2><value-of select="title" /></h2>
</xsl:template>



</xsl:stylesheet>



And here's my xml :



<?xml version="1.0" encoding="utf-8" ?>

     <data>

      <params>

         <today>2011-12-31</today>

         <current-time>09:56</current-time>

         <this-year>2011</this-year>

         <this-month>12</this-month>

         <this-day>31</this-day>

         <timezone>+01:00</timezone>

         <website-name>Tamara Wobben</website-name>

         <page-title>frontpage</page-title>

         <root>http://test.tamarawobben.nl</root>

         <workspace>http://test.tamarawobben.nl/workspace</workspace>

         <root-page>frontpage</root-page>

         <current-page>frontpage</current-page>

         <current-page-id>6</current-page-id>

         <current-path>/?debug</current-path>

         <parent-path>/</parent-path>

         <current-url>http://test.tamarawobben.nl/?debug</current-url>

         <upload-limit>2097152</upload-limit>

         <symphony-version>2.2.5</symphony-version>

         <cookie-username>xxxxx</cookie-username>

         <cookie-pass>xxxxx</cookie-pass>

          <site-mode>live</site-mode>

      </params>

      <events />

            <image>

               <section id="7" handle="images">Images</section>

                    <entry id="13">

                         <image size="22 KB" path="/images" type="image/jpeg">

                              <filename>img_5874.jpg</filename>

                              <meta creation="2011-12-19T18:40:04+01:00"
width="400" height="267" />

                         </image>

                     </entry>

             </image>

             <recent-posts>

                     <section id="9" handle="dagboek">Dagboek</section>

                           <entry id="15">

                                <datum time="00:00"
weekday="2">2005-02-22</datum>

                                <titel handle="7-weken-echo">7 weken
echo</titel>

                           </entry> 42

             </recent-posts>

              <section>

                  <section id="6" handle="sections">Sections</section>

                          <entry id="12">

                               <title handle="even-voorstellen">Even
Voorstellen</title>

                                     <tekst><p>FLOAT : img_5874.jpg</p> 55
56<p>Naam : Tamara Wobben<br /> 57Geboorte gewicht : 2000 gram<br />
58Geboorte lengte : 44 cm.<br /> 59Geboortedatum : 1 september 2005  </p>

                                     </tekst>

                          </entry>

              </section>

</data>



But it looks like the references are not right. The xslt processor dumps all
the data on the screen. You can see it at http://test.tamarawobben.nl

Can anyone give me a tip where I went wrong ?



Roelof

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.