Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is paging transformation on server side possible ?

Status
Not open for further replies.

tyris

Programmer
Nov 2, 2000
311
FR
do someone knows a way to make paging on server side ? A
transformation that only makes html.. because if i make the
transformation on the server and send the html to the client, i should only send html (and javascript if needed), as the user won't have ms xsl 3 installed....

i only saw example of paging on client side. if you know something about this and have sample code...


Best regards,
Elise, XML learning girl X-)
 
Sure. Just create an asp document that you will link to. Say it is the about section of your site. Make About.asp. Then, the code for the about.asp is...

<%
'Load the XML
set xml = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
xml.async = false
xml.load(Server.MapPath(&quot;YourXMLDocument.xml&quot;))

'Load the XSL
set xsl = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
xsl.async = false
xsl.load(Server.MapPath(&quot;about.xsl&quot;))

Response.Write(xml.transformNode(xsl))
%>




//in the above, make sure that you switch YourXMLDocument.xml and About.xsl to the names of the xml document you use and the name of the xsl document you would like to use.

 
okay, so the ONLY ONE SOLUTION is with asp ? is there any other way to do ? (i'd like to use only my servlet querying, my xml/xslt, on a lotus notes server) Best regards,
Elise, XML learning girl X-)
 
Hi

I have an ASP file that I use to call viewer that put's together the XMl files and the XSL files and I need to put the result of a search SQL query made in XML like 10 for page, I need to do the results paging, do you know how to do that?

J. :)
 
Persist your xml as a file on the web server and design an xsl which shows one page at a time.You can use an index as an input to the xsl say you want to goto page 2 with 10 records per page your index would be 2 *10 to 3*10 you can also select the nodes in xml and transform them.a query something like this :
set Nodelist=objXMLDoc.getelementsbytagname(&quot;//row&quot;)
for each Node in Nodelist
if i >2*10 and i<3*10 then node.transformnode(objXSLDoc)
Next
 

That's a good ideia... no I have to see how to do that!!

Thanks a lot, if you can help a bit more please do to sade_jade@hotmail.com ok?

J. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top