473,398 Members | 2,403 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,398 software developers and data experts.

Order of nodes in xsl:for-each nodeset (Xalan-J)

I'm using Xalan-J to loop through some nodes with an xsl:for-each
element, presumably in document order. As far as I can tell, the XSL
speciciation says that a for-each element will loop through the
nodeset in document order, meaning the order the elements occur in the
document. Does Xalan-J obey this rule?

I'm encountering some oddities that could be explained if Xalan-J does
not adhere to this, but it is a very rare circumstance, so its hard to
test.

Regards,
Brian.
Jul 20 '05 #1
1 1757


Brian J. Sayatovic wrote:
I'm using Xalan-J to loop through some nodes with an xsl:for-each
element, presumably in document order. As far as I can tell, the XSL
speciciation says that a for-each element will loop through the
nodeset in document order, meaning the order the elements occur in the
document. Does Xalan-J obey this rule?

I'm encountering some oddities that could be explained if Xalan-J does
not adhere to this, but it is a very rare circumstance, so its hard to
test.


The XSLT 1.0 specification says about xsl:for-each:

The nodes are processed in document order, unless a sorting
specification is present.

I don't know whether Xalan-J has some bug, that might depend on the
version of it. Do you get different results for the same XML document
and XSL document when you try another XSLT processor?
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

3
by: Jamie Green | last post by:
Using MSXML3.0, with the Dom SelectionLanguage set to Xpath I am trying to query the following document <Root> <Child>Name</Child> <Child>John</Child> <Child>Smith</Child> <Child>23</Child>...
4
by: Brad | last post by:
Help, I have a really complicated XPATH request I can't wrap my head around I have an XML nodeset like this: <a> <a1 attr="key">Use</a1> <a1 attr="val">Value1</a2> </a> <a> <a1...
2
by: Bryan Galvin | last post by:
Hi all, I posted a message on this topic before, but now I have a request for help. Previously "A. Bolmarcich" answered this query for me, but the problem has changed slightly... I have two...
10
by: Johnny Ooi | last post by:
I've written a template that does some work on a subtree, but I want to replace the subtree that I originally worked on. How would I do this? Confused, Okay, here's an example: <node> <node>...
4
by: Larry R | last post by:
I am trying to use XPath (XSLT 1.0), EXSLT 1.1 (.Net) to select the nodelist consisting of the 'top n' nodes. THe counter is the count of item/value. Using a traditional for-each logic, the...
0
by: KathyB | last post by:
Hi, Using the following in an asp.net procedure. I get the error "The expression passed to this method should result in a NodeSet". Dim xDoc As New Document() The line causing the error is:...
5
by: Newbie | last post by:
The answer to this is probably obvious, but I'm somewhat new to XSLT and can't find it. I need to sort a set of nodes within a document, e.g. <A> <B/> <C> <D>3</D> <D>2</D>
14
by: eric.goforth | last post by:
Hello, Is there any way to directly access an element in a nodeset? For example, if working with: <blahs rec_count="16"> <blah> <yada>abc</yada> </blah>
1
by: Zachary Turner | last post by:
I have a bunch of nodes like this: <a> <b> <b> <c> </a> <a> <b>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
Oralloy
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.