Topic
7 replies Latest Post - ‏2014-08-29T13:58:32Z by RubenRandall
RubenRandall
RubenRandall
85 Posts
ACCEPTED ANSWER

Pinned topic FFD Stylesheet Delimiter

‏2014-08-19T21:31:00Z |

Hi Experts,

I am trying to write an FFD stylesheet to split up name value pairs in a Http Post Message that has a delimiter ampersand, I know this splitting can be achieved using Http Convert action but, I would like to see if there is possiblity of achieving this using FFD stylesheet with Specified delimiter.

I am trying with this FFD... Apparently this is failing, could you please let me know where am I going wrong

FFD


<File name="PostPayload">
        <Field name="arg" minOccurs="0" maxOccurs="unbounded"  delim="amp;"/>
</File>

Stylesheet

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:dp="http://www.datapower.com/extensions"
                version="1.0">

    <dp:input-mapping href="message.ffd" type="ffd"/>

    <!-- This stylesheet copies the input to the output -->
    <xsl:output method="xml"/>

    <xsl:template match="/">

        <xsl:copy-of select="." />

    </xsl:template>
</xsl:stylesheet>

Thanks,

Ruben

 

  • HermannSW
    HermannSW
    4127 Posts
    ACCEPTED ANSWER

    Re: FFD Stylesheet Delimiter

    ‏2014-08-20T08:37:40Z  in response to RubenRandall

    Hi Ruben,

    handcrafted FFDs are not supported.

    Find more information and alternatives in this posting:
    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014779966#77777777-0000-0000-0000-000014780892



    Hermann <myBlog/> <myTweets/> | <GraphvizFiddle/> | <xqib/> | <myCE/> <myFrameless/> | 

  • UlrikAndersen
    UlrikAndersen
    167 Posts
    ACCEPTED ANSWER

    Re: FFD Stylesheet Delimiter

    ‏2014-08-20T09:04:26Z  in response to RubenRandall

    As you will see in the great material referenced (and produced!) by Hermann, you CAN use a simple FFD treating the whole input as a single string. And then you can use the EXSLT split or tokenize functions in your stylesheet to sort out the name/value pairs. HTTP Convert action would be a more natural choice, though.

    • RubenRandall
      RubenRandall
      85 Posts
      ACCEPTED ANSWER

      Re: FFD Stylesheet Delimiter

      ‏2014-08-27T14:28:35Z  in response to UlrikAndersen

      Hi Hermann & Ulrik,

      Thanks for the reply, I have researched a little bit and your link has helped me understand the efficient Non Xml transformation through WTX and FFD for different payload sizes.A  WTX  license is required to do a mapping and deploy executable to datapower while,Dataglue is an alternative that ships with datapower with prebuilt FFD stylesheets that can help you do Non Xml data transformation using string manipulative functions in XSLT. I kind of used the option that Ulrik has pointed out. So, I would like to know to make custom FFD's rather than the one's that are are existing would I have to buy a Contivo Analyst License.

      Please let me know

      Thanks,

      Ruben