Skip to Content
author's profile photo Former Member
Former Member

message-mapping: sort with subnodes

Hello everybody,

as far as i know (and tested) the SORT-function sorts just the node. The subnodes are not sorted.

Sample:

<B>

<BField_1>

<BField_2>

<A>

<AField_1>

<AField_2>

<u>after using the SORT:</u>

<A>

<<b>B</b>Field_1>

<<b>B</b>Field_2>

<B>

<<b>A</b>Field_1>

<<b>A</b>Field_2>

<u>what I want:</u>

<A>

<AField_1>

<AField_2>

<B>

<BField_1>

<BField_2>

Thanks, Regards

Mario

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 07, 2006 at 12:13 PM

    Hi Mario,

    if nothing else works: xsl:sort is sorting <b>WITH</b> subnodes.

    Regards,

    Udo

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Mario

      xml -> xml: take xsl:stylesheet subelement "xsl:output" for control (method="xml")

      xsd -> xsd: not possible. You need a instance for a mapping (should be clear as you dont have field values)

      map all source fields to target fields 1:1: take xsl:copy-of. Use attribute select. Put there a X-Path expression, for example '/', what means everything (but why do you use a mapping at all??)

      The copy-of command is very strong as you can copy well selected parts of your source message with very less code, just a little bit X-Path.

      Regards,

      Udo

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.