Re: sorting with xml and friends

Discussion in 'XML' started by Micah Cowan, Jun 27, 2003.

  1. Micah Cowan

    Micah Cowan Guest

    (Neil Zanella) writes:

    > Hi Martin,
    >
    > Your answer was very interesting. It seems like extensible sytlesheet
    > transformations can prove extremely useful these days. However I would
    > like to inquire about the actual time complexity of the algorithm
    > described by the XSLT code you posted. Is this implementation
    > detail that is transparent to the XSLT programmer?


    In a word: yes.

    XSLT is (nearly) a functional programming language, relying heavily on
    recursion for all but the simplest operations. This fact actually has
    pretty much nothing to do with the code in this specific example, but
    it's enough to realize that efficiency simply wasn't one of the design
    goals of XSLT. It is still a fairly elegant language to work with, and
    I kind of like to use it to excercise my programming skills in a
    non-procedural language; gets you thinking in different ways.

    I would guess that many XSLT implementations utilize intelligent
    sorting algorithms, but it really doesn't matter all that much, since
    the language itself lends itself toward inefficiency.

    OTOH, it doesn't seem unreasonable that one could write software which
    would compile XSLT into an optimized procedural equivalent, perhaps
    even noting what nodes might do well to be indexed specially for
    maximum efficiency. A sophisticated engine could probably rewrite code
    to produce the same behavior, but with much better efficiency than the
    most straightforward approach.

    -Micah
    Micah Cowan, Jun 27, 2003
    #1
    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. Buster Copley
    Replies:
    5
    Views:
    558
    Gianni Mariani
    Jul 7, 2003
  2. Replies:
    2
    Views:
    597
  3. Replies:
    0
    Views:
    656
  4. Spiros Bousbouras

    Reading from files and range of char and friends

    Spiros Bousbouras, Mar 10, 2011, in forum: C Programming
    Replies:
    123
    Views:
    1,977
    James Kuyper
    Mar 31, 2011
  5. Jason
    Replies:
    0
    Views:
    384
    Jason
    Oct 4, 2006
Loading...

Share This Page