5 Replies Latest reply: Sep 6, 2013 5:42 PM by 918117 RSS

    Giving Multiple Inputs to XSLT from OSB

    918117
      Hi ,

      I have a requirement where I need to feed 2 input documents to a xslt to get the desired output document . These 2 input documents are stored in OSB user defined variables say var_A and var_B .
      I know usually I can pass only 1 input variable to a XSLT transform action . But I somehow need to access both of the var_A and var_B from my xslt , as these contain my input data used for transformation . Of course one option is to write 2 xslt and handle each input document sequentially . But I don't want to do that .

      How to do this . Any pointers would help me a lot . Thanks in advance .
        • 1. Re: Giving Multiple Inputs to XSLT from OSB
          991448
          Yes you can define multiple inputs ,
          Define them as paramaters in your xslt and in mapsources...
          then when you browse to this xsl these parameters will be dispalyed as Variable Names bindings under Bind Variables.

          for e.g:-
          <xsl:stylesheet version="1.0" >
          <xsl:param name="inp1"/>
          <xsl:param name="inp2"/>

          inp1 and inp2 will serve as multiple inputs
          • 2. Re: Giving Multiple Inputs to XSLT from OSB
            918117
            hy thanks much for your valuable inputs . Seems they will work as I just gave a quick test . But as a quicker I would ask that if I give both the inputs would it still require any input document to be fed . After I give it 2 variables , I don't want to give it any input document .
            • 3. Re: Giving Multiple Inputs to XSLT from OSB
              991448
              I guess yes you will have to give document as input.. I will try at my end and let you know. you have marked the thread as answered but forgit top mark the correct answer as correct. :)
              • 4. Re: Giving Multiple Inputs to XSLT from OSB
                918117
                hy .. now stuck in a more horrific issue . When I pass input parameters to the xslt , I cant use them in the xslt , no matter what syntax I use . As simple as this one in the code below which just outputs the value of parameters doesn't work . My inputs are xml documents .

                I used lot of options while selecting values of parameters like : document($A) , $A. Nothing seems to be working . Error which I get are : java.lang.RuntimeException: Invalid conversion from 'node-set' to 'org.apache.xmlbeans.impl.store.Xobj$DocumentXobj'.


                <xsl:param name="A"/>
                <xsl:param name="B"/>
                <xsl:template match="/">
                          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cla="http://webservices.zurich.com/zsoa/nac/claimmanagement/claimpredictivemodeling-v1_0" >
                               <soapenv:Body>
                                    <cla:calculateAndRetrievePredictiveModelScoresResponse>
                                    <Test>
                                    <xsl:value-of select = "$A"/>
                                    </Test>
                                         
                                    </cla:calculateAndRetrievePredictiveModelScoresResponse>
                               </soapenv:Body>


                pls help me out . m ysing styluss studio for dev and run time OSB 11G .
                • 5. Re: Giving Multiple Inputs to XSLT from OSB
                  918117

                  did you get any workaround for "Xobj$DocumentXobj" stuff ?