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. Advertising

  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. Advertising

  3. Guest

    Thanks for quick info. next reader can just write some small script to
    do that
     
    , Aug 8, 2005
    #3
    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. Replies:
    0
    Views:
    1,470
  2. Ralf Wahner
    Replies:
    2
    Views:
    2,411
    Ralf Wahner
    Jul 15, 2003
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,440
    Dimitre Novatchev
    Aug 24, 2006
  4. Stefan_W
    Replies:
    1
    Views:
    8,219
    Stefan_W
    Nov 5, 2008
  5. nbigaouette

    Z-Ordering (Morton ordering) question

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

Share This Page