Subject: Re: [xsl] how can I use this values From: daniel whitney <dbf.whitney@xxxxxxxxx> Date: Wed, 6 Jun 2012 13:47:03 -0400 |
Roelof it would be something like this: <xsl:template match="search"> <xsl:variable name="totalPages" select="pagination/@total-pages"/> <xsl:variable name="currentPage" select="pagination/@current-page"/> <xsl:if test="$currentPage < ($totalPages - 1)"> then do something here </xsl:if> </xsl:template> I think however you're going to have to spend a little time figuring out the basics of XSL. Dan 2012/6/6 Roelof Wobben <rwobben@xxxxxxxxxxx>: > > Oke, > > > > And then I can use totalpages and current page like this : > > > > <xsl:if current page < total pages -1 > > > <div class="post-nav"> > <span class="next"> > <a href="http://test.tamarawobben.nl/dagboek/2005/04/2"></a> > </span> > </div> > </xsl: if> > > > > Roelof > > > > > > ---------------------------------------- >> Date: Wed, 6 Jun 2012 13:11:10 -0400 >> From: dbf.whitney@xxxxxxxxx >> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >> Subject: Re: [xsl] how can I use this values >> >> <xsl:template match="search"> >> >> Total pages = <xsl:value-of select="pagination/@total-pages"/> >> Current page = <xsl:value-of select="pagination/@current-page"/> >> >> </xsl:template> >> >> 2012/6/6 Roelof Wobben <rwobben@xxxxxxxxxxx>: >> > >> > Hello, >> > >> > Sorry for the maybe stupid question >> > >> > But I have this xml : >> > >> > <search keywords="mama" sort="score" direction="desc"> >> > <alternative-keywords> >> > <keyword original="mama" alternative="man" distance="2" /> >> > </alternative-keywords> >> > <pagination total-entries="36" total-pages="12" entries-per-page="3" >> > current-page="1" /> >> > <sections> >> > <section id="6" handle="Sections">Sections</section> >> > <section id="9" handle="Dagboek">Dagboek</section> >> > </sections> >> > <entry id="136" section="Dagboek"> >> > <excerpt><p>Vandaag was het de grote dag, je hebt voor het eerst heel >> > bewust <strong>mama</strong> gezegd. Ik had al wel in de gaten dat het eraan >> > zat te komen, ja was al een hele tijd bezig met >> > <strong>mama</strong><strong>mama</strong>ma. Een mooi verjaardagscadeautje >> > meisje, een heel goede timing. Dank je wel. Je zegt nu twee woorden, papa en >> > <strong>mama</strong>.</p> >> > </excerpt> >> > </entry> >> > <entry id="62" section="Dagboek"> >> > <excerpt><p> boos maken van de arts, er komt dan meer bloed. Je word >> > maar heel even boos en blijft mee aankijken met een blik van waarom >> > <strong>mama</strong>? De arts geeft het op en laat een laborant komen voor >> > een hielprik. Je hiel wordt alvast in een gelpakking gedaan. Papa het >> > slapen gaan bel ik nog even naar de Nicu. Jouw temperatuur zakt een klein >> > beetje, van 38,4 is het nu 37,9 C. Waarom <strong>mama</strong> >> > 2005-09-11</p></excerpt> >> > </entry> >> > <entry id="126" section="Dagboek"> >> > <excerpt><p> horen. Jouw babbels deed je wel na als wij het vroegen. >> > Natuurlijk oefenen we al een tijdje met je om woordjes als papa en >> > <strong>mama</strong> te zeggen. Je was de laatste tijd al druk in je eentje >> > aan het oefenen, maar als wij papa of <strong>mama</strong> tegen jou >> > zeiden, deed je het ons niet na. Tot vandaag. Je hebt je eerste woordje >> > gezegd en het is PAPA geworden. Geeft</p></excerpt> >> > </entry> >> > </search>` >> > >> > >> > How can I use the values of total_pages and current-page in a <xml >> > value-of select = " " /> >> > >> > Roelof
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] how can I use this values, Roelof Wobben | Thread | RE: [xsl] how can I use this values, Roelof Wobben |
RE: [xsl] how can I use this values, Roelof Wobben | Date | RE: [xsl] how can I use this values, Roelof Wobben |
Month |