473,384 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,384 software developers and data experts.

passing a sorted node set to template

I'm calling a template that I'd like to pass a sort node set to. I'm
creating the node set with <xsl:copy-of>...is there a way to sort the
set prior to passing it? If not, what's a reasonable alternative?

Thanks in advance,
David

Jul 20 '05 #1
1 1196
dr***@msn.com writes:
I'm calling a template that I'd like to pass a sort node set to. I'm
creating the node set with <xsl:copy-of>...is there a way to sort the
set prior to passing it? If not, what's a reasonable alternative?

Thanks in advance,
David

node sets are (as their name implies) sets, ie unordered data structures:
the set {1,2,3} is the same as the set {2,3,1}.

In XSLT1 you need to sort as the set as it is used (using xsl:sort on an
xsl:for-each or xsl:apply-templates) You can not store an order in the
data structure itself.

XSLT2 of course will abandon the node set data type and instead use
sequences (which are an ordered data structure) XSLT2 is still in draft
but there are implementations eg saxon 8.

David
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: kristofera | last post by:
I am trying to do a distinct grouping of some nodes sorted by a numeric value but for some reason the distinct (preceding-sibling filter) is applied to the result as if not sorted. If I don't use...
5
by: nifsmith | last post by:
Hi I am trying to learn about Queues and use templates at the same time. I have written the following code and I am getting a link error, stating "unresolved external symbol, "int__cdecl...
4
by: Alfred Taylor | last post by:
I essentially need a countif() function for xsl. Something to where I could do countif(node-set, condition). Rather than try to get too extreme, i decided to just write one for my countif() with...
3
by: Andrew Clark | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** it's been a while since i have poseted to this newsgroup, but for a long time i was not programming at all. but now that i am out of...
1
by: Khayrat | last post by:
Hi folks, please help I have a xml file with a list of items. The list is sorted during xslt processing. Based on this sorted list I want a navigation facility to walk through the sorted list...
2
by: IcedDante | last post by:
Working with a sorted group, the inability to use following-sibling (which uses Document Order) and convert an RTF (not avaible with the Parser that we are using) hampered our ability to solve the...
1
by: lg2530 | last post by:
template<class T> struct NODE { T data; NODE<T> * next; }; template<typename T> NODE<T>* QuickSortList( NODE<T>* list ) {}
1
by: rajamani | last post by:
Hi dis my codig.. hav a luk.. #include<iostream> #include<cstring> using namespace std; template<class T>class List{
1
by: Ali | last post by:
The code at the end of this message works just fine with M$ VS2005 but with g++ 4.1.3 i get this: node.cpp: In function ‘int main()’: node.cpp:96: error: no matching function for call to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.