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

Discussion in 'XML' started by Brian J. Sayatovic, Jan 20, 2004.

  1. 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.
     
    Brian J. Sayatovic, Jan 20, 2004
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Jan 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan Galvin
    Replies:
    2
    Views:
    446
    Bryan Galvin
    Sep 29, 2004
  2. cvissy
    Replies:
    0
    Views:
    637
    cvissy
    Nov 16, 2004
  3. Replies:
    1
    Views:
    3,686
    A. Bolmarcich
    May 27, 2005
  4. Elhanan
    Replies:
    1
    Views:
    400
    Elhanan
    May 11, 2006
  5. Ted Flethuseo
    Replies:
    4
    Views:
    230
    7stud --
    Apr 14, 2011
Loading...

Share This Page