none
How do I generate multiple xmls from a single input xml using XSLT 2.0 & send it to the message box ? RRS feed

  • Question

  • Hi,

    We have an application that currently uses an xslt to map the incoming Oracle DB data to a canonical schema & then dissassembles it. But now we have a requirement that we create duplicate/clones of the original xml, generate different xmls out of it by changing some data (based on a condition) & then send it to the message box. 

    I am not sure how the dissassemble part of it will come into picture, whether to first dissassemble it & then use xslt or vice versa. Please provide any ideas/inputs if any as to how I can make it simpler.

    Thank you.

    Wednesday, June 22, 2016 2:58 PM

Answers

  • I don't think you're looking at this the best way.

    First, why are you using an xslt Map?  What's wrong with the Mapper?

    Also, be aware that you can have multiple subscribers to a message and they will all get essentially a clone of the original.  So, maybe all you need is multiple Orchestrations or Send Ports subscribing to you Canonical.  Actually, that is why you would do a Canonical in the first place.

    • Proposed as answer by Angie Xu Tuesday, July 5, 2016 9:01 AM
    • Marked as answer by Angie Xu Tuesday, July 5, 2016 9:01 AM
    Wednesday, June 22, 2016 4:49 PM
    Moderator

All replies

  • Hi

    Using XSLT 2.0 is not possible as .NET does not support it.

    When you say dissassemble, do you mean debatching? How are you doing it currently - at port level?

    The simplest way to implement your scenario is to -

    1. Receive Oracle message in orchestration

    2. Use two maps to create the two output message formats (output message schema should be envelope schemas if debatching is needed)

    3. Execute XMLReceive pipeline from Expression Shape on both the map output messages to debatch them. Enumerate over the Output debatched messages from pipeline execution and send them to the MessageBox using DirectBound SendPort.

    Refer this sample on debatching messages using XMLReceive pipeline from orchestration-

    http://tech-findings.blogspot.in/2013/07/debatchingsplitting-xml-message-in.html


    Thanks Arindam





    Wednesday, June 22, 2016 3:49 PM
    Moderator
  • I don't think you're looking at this the best way.

    First, why are you using an xslt Map?  What's wrong with the Mapper?

    Also, be aware that you can have multiple subscribers to a message and they will all get essentially a clone of the original.  So, maybe all you need is multiple Orchestrations or Send Ports subscribing to you Canonical.  Actually, that is why you would do a Canonical in the first place.

    • Proposed as answer by Angie Xu Tuesday, July 5, 2016 9:01 AM
    • Marked as answer by Angie Xu Tuesday, July 5, 2016 9:01 AM
    Wednesday, June 22, 2016 4:49 PM
    Moderator