xsl-list
[Top] [All Lists]

Re: Limiting XSL Results for Timely Web Page Display

2002-11-20 03:01:59
One more related question here - can you return a value in XSL? In this
example I want to return the number of records in the result set.

One problem is that the result set is a subset of the elements in the
XML file. I need to number on the subset, e.g.

XML:

<dictionary>
        <word>dog is man's best friend</word>
        <word>cat</word>
        <word>dog and cats</word>
</dictionary>

If the user searches on "dog" I want the XSL to return:

<html><body>
<p> dog is man's best friend</p>
<p> dog and cats </p>
</body></html>

In other words - don't return the 2nd <word>.

I am thinking that the simplest solution is a two stage process. XML to
a result set XML and then XML to HTML, e.g.

<dictionary>
        <word id=1>dog is man's best friend</word>
        <word id=2>dog and cats</word>
</dictionary>

Then from ASP, I can pass in a 1 and a 20 and it will be very simple
code to only return records with id 1 to 20.

But I need XSL to tell ASP how many records in the result set so that I
don't put a "forward" button in the HTML code to go to the next 20
records.

Please excuse the simplistic examples, but I am a newbie.




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list