Jump to content

andreathedove

Members
  • Posts

    119
  • Joined

  • Last visited

Everything posted by andreathedove

  1. want you built a web site with me ?NB I have more other questions to post: have I to open new post or post here?
  2. ehm I want thisDomain Checkups [ ] HTML [ ] Miscellaneous [ ] Search Engine Optimization [ ] but not[]Domain Checkups [ ] HTML [ ] Miscellaneous [ ] Search Engine Optimization [ ]
  3. my example:http://www.bluside.it/tool/the rss file ishttp://www.bluside.it/tool/rss.xmland the xslhttp://www.bluside.it/tool/categorie.xslThe resul are[ ] Domain Checkups [ ] HTML [ ] Miscellaneous [ ] Search Engine Optimization [ ] why this ?[ ]
  4. call the file page.js directly in xsl file before and after the header tag.<html><head><script language="javascript" src="page.js" /></head><body>
  5. In javascript solution:<script language="javascript" src="page.js" /> page.jsfunction changePage(number){ try{ var s = new ActiveXObject("MSXML2.FreeThreadedDOMDocument"); var x = document.XMLDocument; if (x == null){ x = navigator.XMLDocument; s.loadXML(navigator.XSLDocument.xml); }else{ s.loadXML(document.XSLDocument.xml); } var tem = new ActiveXObject("MSXML2.XSLTemplate"); tem.stylesheet = s; var proc = tem.createProcessor(); proc.addParameter("pagenumber", number); proc.input = x; proc.transform(); var str = proc.output; var newDoc = document.open("text/html", "replace"); newDoc.write(str); navigator.XMLDocument = x; navigator.XSLDocument = s; newDoc.close(); }catch(exception){ }} and the xsl - <xsl:template name="footerPages"> <xsl:param name="element" /> <xsl:param name="pagenumber" /> <xsl:variable name="total" select="count(*[name() = $element])" /> - <center>- <xsl:if test="$pagenumber > 1"> <a href="java script:changePage({$pagenumber -1});">Prev</a> </xsl:if>- <xsl:for-each select="*[name() = $element]">- <xsl:choose>- <xsl:when test="not(count(preceding-sibling::*)+1 = $pagenumber)"> - <a href="java script:changePage({count(preceding-sibling::*)+1});"> <xsl:value-of select="count(preceding-sibling::*)+1" /> </a> </xsl:when>- <xsl:otherwise> <xsl:value-of select="count(preceding-sibling::*)+1" /> </xsl:otherwise> </xsl:choose> </xsl:for-each>- <xsl:if test="$pagenumber < $total"> <a href="java script:changePage({$pagenumber +1});">Next</a> </xsl:if> </center> </xsl:template> is ok Andrea
  6. Asp solution: <%' prevent page cachingResponse.CacheControl = "no-cache"Response.AddHeader "Pragma", "no-cache"Response.Expires = -1 number = Request.QueryString("n")if number = "" thennumber = "1"end ifxslpath = Server.mappath("test.xsl")sourceFile = Server.mappath("test.xml") Set source = Server.CreateObject("Msxml2.DOMDocument") source.async = false source.load(sourceFile)set xsldoc = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")xsldoc.async = falsexsldoc.load(xslpath) set xsltemp = Server.createObject("MSXML2.XSLTemplate")xsltemp.stylesheet=xsldocset xslproc = xsltemp.createProcessorxslproc.input=sourcexslproc.output=Response' parameter for message groupxslproc.addParameter "pagenumber",numberxslproc.transformResponse.end%>
  7. in other words... can I jump the channel content ?
  8. ehmif I have- <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">- <channel> <title>iWEBTOOL.com</title> <description>iWEBTOOL's aim is to bring the net's best web tools straight to your fingertips!</description> <link>http://www.iwebtool.com</link> - <image> <url>http://www.iwebtool.com/images/logo.gif</url> <title>iWEBTOOL.com</title> <link>http://www.iwebtool.com</link> </image> <dc:language>en-us</dc:language> - <item> <title>Alexa Traffic Rank</title> <description><img src="http://www.iwebtool.com/tool/tools/alexa_traffic_rank/alexa_traffic_rank.gif" alt="Alexa Traffic Rank" />View and compare Alexa Traffic charts. You can select a data type from Reach, Rank and Page Views.</description> <icon>http://www.iwebtool.com/tool/tools/alexa_traffic_rank/alexa_traffic_rank.gif</icon> <category>Domain Checkups</category> <link>http://www.iwebtool.com/alexa_traffic_rank</link> </item>- <item>etc ...</channel></rss>and I write<xsl:for-each select="/rss/channel/item[not(category = preceding-sibling::item/category)]"> <xsl:sort select="category" data-type="text" order="ascending"/> <a class="testo" href="shopping_cat.asp?Cat={category}"><b><xsl:value-of select="category"/></b></a> <br/> </xsl:for-each>why it read the CHANNEL ?Andrea
  9. andreathedove

    How to ?

    Hello ,http://www.iwebtool.com/tools/rss.xml?top=1&count=1If I can changecount = 1 to count = 10 the number of feed changeHow I can have it ?Andrea
  10. Hello,I open a new topic.The difference to transform and reading between rss and xml with xsl? Thanks,Andrea
  11. Can you re post the transform lesson with PHP5? Andrea
  12. Hello boen_robot, where are the other post?Andrea
  13. ... and what change here- <xsl:for-each select="*[name() = $element]">- <xsl:choose>- <xsl:when test="not(count(preceding-sibling::*)+1 = $pagenumber)"> - <a href="?n={count(preceding-sibling::*)+1}&cat={$mastercategoria}"> <xsl:value-of select="count(preceding-sibling::*)+1" /> </a> </xsl:when>- <xsl:otherwise> <xsl:value-of select="count(preceding-sibling::*)+1" /> </xsl:otherwise> </xsl:choose> </xsl:for-each>?
  14. The xsl now work, because the file xml was and rss feed and I trasform it in xml.Now I have the second problem:- the total page are 3 and not 15 (because the total item in the feed are 15 and div 5 per page = 3 )You can help me ?Andrea
  15. ehm, this is the code with your change<xsl:choose><xsl:when test="not(count(preceding-sibling::current()+1 = $pagenumber)"> <a href="?n={count(preceding-sibling::current()+1}&cat={$mastercategoria}"><xsl:value-of select="count(preceding-sibling::current()+1" /></a></xsl:when><xsl:otherwise> <xsl:value-of select="count(preceding-sibling::current()+1" /></xsl:otherwise></xsl:choose>it don't work ...:-(
  16. not(current(preceding-sibling::.)+1 ... ?
  17. I have change, but it give me errohttp://www.allinonenet.it/shopping/prova/xml.asp?cat=:-(
  18. Hello,I have this problem and i can not resolve it.If you can take a look in the end of this page, where you can find the paging of the feed with xsl:http://www.allinonenet.it/shopping/prova/xml.asp?n=8&cat=And it don't work.The first problem is: - the page start from 5 instead of 1 - the total page are 3 and not 19 (because the total item in the feed are 15 and div 5 per page = 3 )The xsl code are herehttp://www.allinonenet.it/shopping/prova/xsl.xsland the xml code here:http://www.allinonenet.it/shopping/prova/xml.xmlFor read xml and xsl I use asp.Thanks to all for help me,Andrea
  19. Thanks very much,Andrea
  20. please, can you give me an example ?Andrea
  21. andreathedove

    ASP and XSLT

    Hello,can I insert code asp in a xslt file ?Thanks,Andrea
×
×
  • Create New...