Jump to content

andreathedove

Members
  • Posts

    119
  • Joined

  • Last visited

Everything posted by andreathedove

  1. I have not only node TDProductId, for this motive I can not apply them.I don't understand what I should doThen, with ASP, make something that would just increase both 1 and 6 by 6 to result in the next page's content being selected. Can yu help me with an example?Andrea
  2. Hello,I am very sorry for this trouble.I have to paging a feed xml with asp and xsl.Here the file that not workhttp://www.allinonenet.it/shopping/prova/prova2.asp?n=1&cat=It print all the feed, but I want 6 per page.The asp code are: <%@ Language=VBScript %><%' prevent page cachingResponse.CacheControl = "no-cache"Response.AddHeader "Pragma", "no-cache"Response.Expires = -1 cat = Request.QueryString("Cat")number = Request.QueryString("n")xslpath = Server.mappath("page2.xsl")sourceFile = server.MapPath("td.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 "mastercategoria",Catxslproc.addParameter "pagenumber",numberxslproc.transformResponse.End%> but the xml and xsl are herehttp://www.allinonenet.it/shopping/prova/td.xmlhttp://www.allinonenet.it/shopping/prova/page2.xslCan you help me?Andrea
  3. ... if I have the xml file:<text>I am Andrea from Verona</text>in the xsl file I does should do?Andrea
  4. for example of I have "I am Andrea from Verona"the code limit the caracter to"I am Andrea ..."tHANKS,Andrea
  5. Hello,I know in asp thislimit = rs("text")Limit2 = Len(limit)if limit2 = 100 thentext = right(text, 50)end ifI can do the same with xsl?Thanks,Andrea
  6. Thanks very much to all.ANdrea
  7. Hello,I want to buil a site wirg XML and XSL.In this page XHTML I have the problemhttp://www.allinonenet.it/esempi/CAT.asp?cat=Why this text ÿþ?Andrea
  8. Hello,the code works: <?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" version="4.0"/><xsl:param name="mastercategoria"/> <xsl:template match="/"> <HTML> <BODY> <h2>Messages for General Group</h2> <xsl:apply-templates select="NewDataSet/Table[MasterCategoria=$mastercategoria and not(Categoria = preceding-sibling::Table/Categoria)]" mode="toc" /> </BODY> </HTML></xsl:template> <xsl:template match="Table" mode="toc"> <DIV STYLE="margin-left:2em"> <br></br> <xsl:element name="a"> <xsl:attribute name="href"> viewmessage.asp?id=<xsl:value-of select="Categoria"/> </xsl:attribute> <xsl:value-of select="Categoria"/> </xsl:element> <table><tr><td colspan="2" width="130" bgcolor="#fff3ff" align="center"> <xsl:value-of select="Categoria"/> </td> <xsl:if test="position() mod 3 = 0"> <!-- Blocco CDATA assieme a codice Javascript --> <script> <![CDATA[document.write("</tr><tr>");]]> </script> <!-- FINE Blocco CDATA assieme a codice Javascript --> </xsl:if> </tr> </table> <xsl:apply-templates select="Table" mode="toc"/> </DIV></xsl:template> </xsl:stylesheet> Andrea
  9. ... in this mode the code work <?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" version="4.0" /> <xsl:param name="mastercategoria"/><xsl:template match="/"><HTML><BODY><h2>Messages for General Group</h2><xsl:apply-templates select="/NewDataSet/Table[MasterCategoria=$mastercategoria and not(Categoria = preceding-sibling::Table/Categoria)]/Categoria" /></BODY></HTML></xsl:template><xsl:template match="Categoria" mode="toc"><DIV STYLE="margin-left:2em"><br></br><xsl:element name="a"><xsl:attribute name="href">viewmessage.asp?id=<xsl:value-of select="@Categoria"/></xsl:attribute><xsl:value-of select="@Categoria"/></xsl:element><br></br><xsl:apply-templates select="Categoria" mode="toc"/></DIV></xsl:template></xsl:stylesheet> but the problem is display link".http://www.allinonenet.it/esempi/cat2.asp?Cat=PS ONE:-(Andrea
  10. Hello,Thanks very much to help me.The result is a white page:http://www.allinonenet.it/esempi/cat2.asp?Cat=PS%20ONEWht?Andrea
  11. Hello,I am Andrea and this is my first post in this forum.My big problem is "HOW TO PASS parameters Using XSLT with ASP"The example: I have the stringcat2.asp?Cat=WebMasterthe code ASP for cat2.asp os <%@ LANGUAGE = JScript %><% // Set the source and style sheet locations here var sourceFile = Server.MapPath("prova.xml"); var styleFile = Server.MapPath("categoria.xsl"); // Load the XML var source = Server.CreateObject("Msxml2.DOMDocument"); source.async = false; source.load(sourceFile); // Load the XSL var style = Server.CreateObject("Msxml2.DOMDocument"); style.async = false; style.load(styleFile);var objStylesheetParam =style.addParameter; "mastercategory", Request.QueryString("Cat") // Repeat the above for as many xsl:param-s as necessarysource.transformNodeToObject(style, Response);%> my XML to Trasform ishttp://www.allinonenet.it/esempi/prova.xmlans Finaly my XSLT is <?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:param name="mastercategory"/> <table> <xsl:for-each select="/NewDataSet/Table[MasterCategoria=@mastercategory][not(Categoria = preceding-sibling::Table/Categoria)]"> <xsl:sort select="Categoria" data-type="text" order="ascending"/> <tr> <td> <a href="lista.asp?cid={Categoria}" title="Previous"><xsl:value-of select="Categoria"/></a> </td> <td> </td> </tr> </xsl:for-each> </table> </xsl:template></xsl:stylesheet> My bad result ishttp://www.allinonenet.it/esempi/cat2.asp?Cat=PS%20ONEWhy don't work the code ?I please you to help me, thanksAndrea
×
×
  • Create New...