Hi All
I have an urgent issue where I m transforming an xml structure into html page using
xslt .
since data is more , I need to do Pagination .Also there is an option to do sorting of data on final rendered html page. from client side.
for ex , if I do call to google search API for getting restaurant info for a city in form of xml. Then I need to write an xsl file to transform xml data in html page
with pagination and sorting enabled. - <restaurents>
-
<restaurent>
-
<RestaurantId>1</RestaurantId>
-
<title>abc</title>
-
<neighborhood>Secundrabad</neighborhood>
-
<Address>411 University St,hyderabad</Address>
-
<reviews>0</reviews>
-
<Phone>(206) 621-1984</Phone>
-
</restaurent>
-
<restaurent>
-
<RestaurantId>2</RestaurantId>
-
<title>Capital Grill</title>
-
<neighborhood>Secundrabad</neighborhood>
-
<Address>1301 4th Ave,hyderabad</Address>
-
<reviews>1</reviews>
-
<Phone>(206) 382-0900</Phone>
-
</restaurent>
-
<restaurent>
-
<RestaurantId>7</RestaurantId>
-
<title>Dukes Chowder Bar</title>
-
<neighborhood>Secundrabad</neighborhood>
-
<Address>1325 4th Ave,hyderabad</Address>
-
<reviews>1</reviews>
-
<Phone>(206) 340-8840</Phone>
-
</restaurent>
-
<restaurent>
-
<RestaurantId>8</RestaurantId>
-
<title>Original Deli</title>
-
<neighborhood>Secundrabad</neighborhood>
-
<Address>1215 4th Ave Ste A-B,hyderabad</Address>
-
<Phone>(206) 622-2271</Phone>
-
</restaurent>
-
<restaurent>
-
<RestaurantId>9</RestaurantId>
-
<title>Caffe Migliore</title>
-
<neighborhood>Secundrabad</neighborhood>
-
<Address>1215 4th Ave Ste 100,hyderabad</Address>
-
<reviews>2</reviews>
-
<Phone>(206) 624-9893</Phone>
-
</restaurent>
-
</restaurents>
3 3286
hi,
I can't get ur qusetion. Please resend ur queries briefly & clearly with expect output.
basically my problem is that I m using xml and xsl to transform data into xhtml
and on the final rendered html , I should be able to do pagination and sorting of data .please lemme know if u didn't got problem clearly
jkmyoung 2,057
Recognized Expert Top Contributor
pagination? Are you using xsl:fo?
sorting example:
<xsl:for-each select="restaur ent">
<xsl:sort select="title"/>
...
</xsl:for-each>
Also, your spelling of restaurant is inconsistent, may cause problems later.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Chaprasi |
last post by:
hey guys
I was wondering if anyone knows about any pagination and sorting in
ASP.Net 2.0 with the <asp:Repeater> control.
Thanks,
Chaprasi
|
by: Chris H |
last post by:
I am having a problem with pagination, basically the problem is happening in
the "PREV / NUMBERS / NEXT" links, it appears as if the reason is becasue
the increment and decrement operators aren't functioning or the $page
variable isnt working in that part of the code... Below is the link to the
working but broken page.. as well as the main part of my code... Hopefully
someone can explain why the operators arent working or maybe see what i...
|
by: howardr101 |
last post by:
Hi,
I'm really new to this XSL stuff and there's a lot of information out
there on the web, I just can't seem to find a definitive answer to my
question, hence......
In FO, I know that you define a block and use the keep-together
attribute to specify whether or not the block should be split over
multiple pages - unless the block itself is longer than a page.
|
by: Ed Jay |
last post by:
I generate a DHTML page (a medical report) with dynamically generated text
based on user input (answers to questions). The page length changes
dynamically. I desire that when the page is printed and reaches a specific
length, it terminates printing that page, prints a page number, and then
begins to print the next page using the same header and format as the
previous page. The page uses no tables or paragraph elements, only CSS.
IOW, I...
|
by: comp.lang.php |
last post by:
'll try to explain this as clearly as possible, sorry if it's unclear.
You have in your directory /foo 42 images
You have in your database metadata for 30 out of those 42 images
You have to display all 42 images in the /foo directory whether they
have database metadata or not.
If any of the 42 images have metadata, you must display the metadata,
| |
by: rmturner76 |
last post by:
I have a need to perform pagination while using dynamic sorting. As
an exmaple -
SELECT TOP(10) * FROM (
SELECT
TextColumn,
DecimalColumn,
ROW_NUMER() OVER (
ORDER BY
CASE @x
|
by: shalini jain |
last post by:
Hi, I want to know how can we do pagination using XSL. There are number of tutorials available on pagination using PHP but nothing with XSL. i am really stuck with my code.
Below is the code that i have written for pagination but it displays the link of all the pages at one go i.e. if i have 8 pages showing 10 results per page than it shows links for all 8 pages.
Previous 1-10 11-20 21-30 31-40 41-50 51-60 61-70 71-80 Next
i want to...
|
by: gnawz |
last post by:
I have a pagination function I am using in a file called functions.php as below<? //Pagination functions function getPagingQuery($sql, $itemPerPage = 10) { if (isset($_GET) && (int)$_GET > 0) { $page = (int)$_GET; } else { $page = 1; } // start fetching from this row number $offset = ($page - 1) * $itemPerPage; return $sql . " LIMIT $offset, $itemPerPage"; } /* Get the links to navigate between...
|
by: markrawlingson |
last post by:
Hello,
For starters:
Yes, I am new to asp.net, however I hold a good 9-10 years of experience working with classic asp and am only just now upgrading my skills. I'm picking asp.net up pretty quickly but I'm running into a stumbling block that I just can't seem to get around. I think I know what the problem is, and I'm pretty confident in a work around, but it's not quite what I had hoped for so I thought I'd pick some of the experts brains...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |