This discussion is archived
4 Replies Latest reply: Jan 7, 2011 4:43 AM by 764189 RSS

OSB XSLT trasformations with input parameter

764189 Newbie
Currently Being Moderated
Hi,
how can I pass input parameters at XSLT trasformation in Assign activity?


Thk
L.
  • 1. Re: OSB XSLT trasformations with input parameter
    Anuj Dwivedi Guru
    Currently Being Moderated
    Please refer section "4.20.7 XSLT Resource Page" at below link -

    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/ui_ref.htm#i1342963

    Also refer -

    http://blog.jayway.com/2010/05/07/xslt-transformations-in-oracle-service-bus/

    Regards,
    Anuj
  • 2. Re: OSB XSLT trasformations with input parameter
    764189 Newbie
    Currently Being Moderated
    Hi checked these links, but I didn't solve my problems :-(.
    I have this xslt resource:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
    <xsl:template match="/">
         <xsl:param name="in_stringSearch"/>
         <fields>
              <xsl:for-each select="//*[starts-with(text(),$in_stringSearch)]">
                   <field>
                        <xsl:for-each select="ancestor-or-self::*">
                             <xsl:text>/</xsl:text>
                                  <xsl:value-of select="$in_stringSearch"/>
                             </xsl:for-each>
                   </field>
              </xsl:for-each>
         </fields>
    </xsl:template>
    </xsl:stylesheet

    I created an assign activity, in the expression field I selected xslt resource and linked above xslt resource, my question is, how I can pass 'in_stringSearch' to xslt from assign?

    Thk
    L.

    Edited by: user8874385 on 7-gen-2011 4.12

    Edited by: user8874385 on 7-gen-2011 4.13
  • 3. Re: OSB XSLT trasformations with input parameter
    Anuj Dwivedi Guru
    Currently Being Moderated
    I think your XSLT should be like -

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
    <xsl:param name="in_stringSearch"/>
    <xsl:template match="/">
    <fields>
    <xsl:for-each select="//*[starts-with(text(),$in_stringSearch)]">
    <field>
    <xsl:for-each select="ancestor-or-self::*">
    <xsl:text>/</xsl:text>
    <xsl:value-of select="$in_stringSearch"/>
    </xsl:for-each>
    </field>
    </xsl:for-each>
    </fields>
    </xsl:template>
    </xsl:stylesheet>

    Regards,
    Anuj
  • 4. Re: OSB XSLT trasformations with input parameter
    764189 Newbie
    Currently Being Moderated
    I adjusted trasformations and now when I select xslt in Assign activity, it show me Binding variables.

    Thk
    L.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points