Jump to content

andreathedove

Members
  • Posts

    119
  • Joined

  • Last visited

andreathedove's Achievements

Member

Member (2/7)

0

Reputation

  1. nobody give me a solution, please ...
  2. This is my XSLT Page:<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:zylom="http://www.zylomgames.com/rss/partnerprogram/"> <xsl:output method="html" encoding="ISO-8859-1"/> <xsl:param name="pagenumber" select="0" /> <xsl:variable name="recordsPerPage" select="10" /> <xsl:param name="category"/> <xsl:param name="r"/> <xsl:param name="id"/> <xsl:key name="jobcode" match="mCN" use="text()" /> <xsl:key name="job" match="programLogoPath" use="text()" /> <xsl:key name="prezzo" match="price" use="text()" /> <xsl:template match = "*"><xsl:variable name="totale" select="count(//products/product[mCN=translate($r,'_' ,' ')])"/> <div id="dir"> <strong><xsl:value-of select="$r"/></strong> - <b>[ <xsl:value-of select="$totale"/> ]</b><br/><br/><table><xsl:for-each select="//products/product[mCN=translate($r,'_' ,' ')]"><xsl:sort select="text()" data-type="text" order="ascending"/> <xsl:if test="position() >= (($pagenumber - 1) *$recordsPerPage) and position() <= ($pagenumber * $recordsPerPage)"><xsl:variable name="tot" select="count(key('jobcode',text()))"/><xsl:variable name="selezione" select="substring-after(text(),':')"/><tr><td><img src="{iU}" width='50px' height='59px'/></td><td> <a class="titoli" href="prodotti.asp?id={$id}&Cat={$category}&r={translate(text(),' ' ,'_')}"><b><xsl:value-of select="n"/></b></a><br/><xsl:value-of select="d"/></td><td> <b> <xsl:value-of select="p"/></b><br/>Spese: <xsl:value-of select="sC"/><br/>Condizioni: <xsl:value-of select="con"/><br/>Totale: <xsl:value-of select="p + sC"/></td></tr></xsl:if> </xsl:for-each></table></div> <xsl:call-template name="footerPages"><xsl:with-param name="element" select="'product'" /><xsl:with-param name="pagenumber" select="$pagenumber" /></xsl:call-template></xsl:template><xsl:template name="footerPages"><xsl:param name="element" /><xsl:param name="pagenumber" /><xsl:variable name="total" select="count(//products/product[mCN=translate($r,'_' ,' ')]) div $recordsPerPage"/><center><xsl:if test="$pagenumber > 1"><a href="?n={$pagenumber -1}&id={$id}&Cat={$category}&r={translate($r,' ' ,'_')}">Indietro</a></xsl:if><xsl:for-each select="*[name() = $element and position() <= ceiling($total)]"><xsl:choose><xsl:when test="not(count(preceding-sibling::*)+1 = $pagenumber)"> [<a href="?n={count(preceding-sibling::*)+1}&id={$id}&Cat={$category}&r={translate($r,' ' ,'_')}"><xsl:value-of select="count(preceding-sibling::*)+1" /></a>]</xsl:when><xsl:otherwise> <b>[<xsl:value-of select="count(preceding-sibling::*)+1" />]</b></xsl:otherwise></xsl:choose></xsl:for-each><xsl:if test="$pagenumber < $total"> <a href="?n={$pagenumber +1}&id={$id}&Cat={$category}&r={translate($r,' ' ,'_')}">Avanti</a></xsl:if></center><xsl:variable name="pageNumberControl" select="concat(count(preceding-sibling::*) + position() , '-', count(preceding-sibling::*) + $recordsPerPage)" /></xsl:template></xsl:stylesheet> Andrea
  3. Hello,nobody can you help me ? :-(Andrea
  4. Hello,i am working here: http://www.allinonenet.it/compra_e_vendi/r...donna_e_bambinoAnd I have record per page "1", and with this code dont work:<xsl:template name="footerPages"><xsl:param name="element" /><xsl:param name="pagenumber" /><xsl:variable name="total" select="count(//products/product/mCN[count(. | key('jobcode', text())[1]) = 1]) div $recordsPerPage"/><center><xsl:if test="$pagenumber > 1"><a href="?n={$pagenumber -1}&id={$id}&Cat={$category}&r={translate($r,' ' ,'_')}">Indietro</a></xsl:if><xsl:for-each select="*[name() = $element and position() <= ceiling($total)]"><xsl:choose><xsl:when test="not(count(preceding-sibling::*)+1 = $pagenumber)"> [<a href="?n={count(preceding-sibling::*)+1}&id={$id}&Cat={$category}&r={translate($r,' ' ,'_')}"><xsl:value-of select="count(preceding-sibling::*)+1" /></a>]</xsl:when><xsl:otherwise> <b>[<xsl:value-of select="count(preceding-sibling::*)+1" />]</b></xsl:otherwise></xsl:choose></xsl:for-each><xsl:if test="$pagenumber < $total"> <a href="?n={$pagenumber +1}&id={$id}&Cat={$category}&r={translate($r,' ' ,'_')}">Avanti</a></xsl:if></center><xsl:variable name="pageNumberControl" select="concat(count(preceding-sibling::*) + position() , '-', count(preceding-sibling::*) + $recordsPerPage)" /></xsl:template> Andrea
  5. Here you find an example:http://www.t-dreams.com/AccountantPage/gue...t.asp?cmd=resetAndrea
  6. Hello,if I have 1000 item in a xml file, how I can paging:item PerPage = 10TotalItem = 1000so 1000/10 = 100I should want to have this result:1-10 11-20 21-30 and so on ...Andrea
  7. Hello,how I can paging the XML with XSL style google ?Andrea
  8. andreathedove

    ASP and XML

    Hello,exist a function or a simply script that allow to read multy xml?Thanks,Andrea
  9. andreathedove

    PR Google

    Hello,exist a script ASP, no components, that allow to calculate the PageRank of Google (PR) in my web site?Thanks,Andrea
  10. Hello,I resolved the problem with:set xmlcontents = objXML.getelementsbytagname("item")AndreaPS: I have a special request in xslt and xml that interests to all, I should post here?
  11. Hello All,I have problem witk this Feed Rss powered by Google News:http://www.google.it/news?ned=it&topic=b&output=rssI write to read the node this code:<!--#include file="config.asp" --><%dim objXMLset objXML = server.CreateObject("Microsoft.FreeThreadedXMLDOM")objXML.Load(xmlpath)set xmlcontents = objXML.DocumentElement.selectSingleNode("channel")%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><div align="center"> <table width="75%" border="1" bordercolor="#E3E7E8"> <tr> <td colspan="4"> </td> </tr><%for i = 0 to xmlcontents.ChildNodes.length - 1 set xmlcontent = xmlcontents.ChildNodes.item(i)%> <tr> <td><%= xmlcontent.ChildNodes.item(0).text%></td> <td><%= xmlcontent.ChildNodes.item(1).text%></td> <td><%= xmlcontent.ChildNodes.item(2).text%></td> </tr> <% next %></table> </div></body></html>I set documentelement in Channel but I have this error:http://www.allinonenet.it/inc_home/google_...oogle_news2.aspWhy ?
  12. andreathedove

    How I can ?

    Hello,how are you ?Help me please ... I have this Node:<link rel="alternate" type="text/html" href="http://www.lastampa.it/redazione/cmsSezioni/politica/200703articoli/18786girata.asp" /> To read the link http://www.lastampa.it/redazione/cmsSezion...18786girata.asp I try:Set col = xmldom.getElementsByTagName("entry/link[@href=]")But don't work why?Thanks,Andrea
  13. I am studying your problems.[*]The script needs to be executed multiple times on each page, ...I no understand ? give me an example ... calling a different XML and/or XSLT each time, ok ... pretty much like an AJAX include.ok AndreaPS: yOU DON'T ANGRY WITH ME FOR THE DELAY
×
×
  • Create New...