xslt for ordering attribute with in a node

Discussion in 'XML' started by gdevah@gmail.com, Aug 1, 2005.

  1. Guest

    Hi ,
    I was looking for xslt to rearrang the order of attibutes within a
    node.

    xml to xml translation...

    <obj d="xslt" a="me" c="to" b="new"/>
    <prop c="it" b="does" a="how" d="matter"/>

    to

    <obj a="me" b="new" c="to" d="xslt"/>
    <prop a="how" b="does" c="it" d="matter"/>


    Thanks alot
    Devah
     
    , Aug 1, 2005
    #1
    1. Advertisements

  2. Joris Gillis Guest

    Hi,
    Tempore 18:01:45, die Monday 01 August 2005 AD, hinc in foro {comp.text.xml} scripsit <>:

    > I was looking for xslt to rearrang the order of attibutes within a
    > node.

    You're out of luck today: that is not possible.

    > xml to xml translation...
    >
    > <obj d="xslt" a="me" c="to" b="new"/>
    > <prop c="it" b="does" a="how" d="matter"/>
    >
    > to
    >
    > <obj a="me" b="new" c="to" d="xslt"/>
    > <prop a="how" b="does" c="it" d="matter"/>

    XML parsers don't distinguish between these 2 element pairs. Document order does not apply to attributes. Also, the attributes' order after serialization (that happens when the XSLT magic is done) is not predictable.

    regards,
    --
    Joris Gillis (http://users.telenet.be/root-jg/me.html)
    Deserta faciunt et innovationem appelant
     
    Joris Gillis, Aug 1, 2005
    #2
    1. Advertisements

  3. Guest

    Thanks for quick info. next reader can just write some small script to
    do that
     
    , Aug 8, 2005
    #3
    1. Advertisements

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. Replies:
    0
    Views:
    1,923
  2. Ralf Wahner
    Replies:
    2
    Views:
    2,745
    Ralf Wahner
    Jul 15, 2003
  3. CB
    Replies:
    1
    Views:
    741
    Johannes Koch
    Oct 2, 2003
  4. Tjerk Wolterink
    Replies:
    2
    Views:
    1,726
    Dimitre Novatchev
    Aug 24, 2006
  5. Replies:
    3
    Views:
    4,466
    A. Bolmarcich
    Oct 20, 2006
  6. njsimha
    Replies:
    0
    Views:
    934
    njsimha
    Sep 16, 2008
  7. Stefan_W
    Replies:
    1
    Views:
    8,816
    Stefan_W
    Nov 5, 2008
  8. nbigaouette

    Z-Ordering (Morton ordering) question

    nbigaouette, Nov 5, 2009, in forum: C Programming
    Replies:
    2
    Views:
    3,037
Loading...