Topic
  • 4 replies
  • Latest Post - ‏2012-10-05T00:12:02Z by HermannSW
Lakh
Lakh
22 Posts

Pinned topic dp:inflate not giving value

‏2012-10-03T12:02:18Z |
Hi,

I was able to defating string but when i inflating the deflated value getting null. Please advise me if i missing anything?

<xsl:variable name="shortVersion" select="dp:deflate($username)"/>
<xsl:variable name="longVersion" select="dp:inflate($shortVersion)"/>
Updated on 2012-10-05T00:12:02Z at 2012-10-05T00:12:02Z by HermannSW
  • Lakh
    Lakh
    22 Posts

    Re: dp:inflate not giving value

    ‏2012-10-04T03:08:59Z  
    to be more clear,

    for below code, we are getting value for dp:deflate function. when we use dp:inflate function on dp:defalte output we are getting null.
  • HermannSW
    HermannSW
    4877 Posts

    Re: dp:inflate not giving value

    ‏2012-10-04T10:46:49Z  
    • Lakh
    • ‏2012-10-04T03:08:59Z
    to be more clear,

    for below code, we are getting value for dp:deflate function. when we use dp:inflate function on dp:defalte output we are getting null.
    Please attach a small stylesheet (with hardcoded sample) here to look at.
    Also, please let us know which firmware level you are running.

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • Lakh
    Lakh
    22 Posts

    Re: dp:inflate not giving value

    ‏2012-10-04T13:52:46Z  
    • HermannSW
    • ‏2012-10-04T10:46:49Z
    Please attach a small stylesheet (with hardcoded sample) here to look at.
    Also, please let us know which firmware level you are running.

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    Firmware Rev:XI52.4.0.1.11.

    As part of our requirement, i am testing to see if i get compressed string. i am storing dp:inflate output in context variable like below

    <dp:set-variable name ="'var://context/txn/username'" value="string($longVersion)" />
  • HermannSW
    HermannSW
    4877 Posts

    Re: dp:inflate not giving value

    ‏2012-10-05T00:12:02Z  
    • Lakh
    • ‏2012-10-04T13:52:46Z
    Firmware Rev:XI52.4.0.1.11.

    As part of our requirement, i am testing to see if i get compressed string. i am storing dp:inflate output in context variable like below

    <dp:set-variable name ="'var://context/txn/username'" value="string($longVersion)" />
    I did test on 4.0.1.11 with deflate/inflate algorithms (the defaults) and that does work.
    Please create a PMR.

    You can use compress/uncompress as a workaround:
    
    $ echo 
    "<s>test123test</s>" | coproc2 definf.xsl - http:
    //dp7-l3:2223 test123test eJwrSS0uMTQyLgFSABh/BBc= test123test $ $ cat definf.xsl <xsl:stylesheet version=
    "1.0" xmlns:xsl=
    "http://www.w3.org/1999/XSL/Transform" xmlns:dp=
    "http://www.datapower.com/extensions" extension-element-prefixes=
    "dp" > <xsl:output omit-xml-declaration=
    "yes" /> <xsl:template match=
    "/"> <xsl:variable name=
    "username" select=
    "."/>   <xsl:variable name=
    "shortVersion" select=
    "dp:deflate($username,'compress')"/> <xsl:variable name=
    "longVersion" select=
    "dp:inflate($shortVersion,'uncompress')"/>   <xsl:value-of select=
    "$username"/><xsl:text>
    </xsl:text> <xsl:value-of select=
    "$shortVersion"/><xsl:text>
    </xsl:text> <xsl:value-of select=
    "$longVersion"/><xsl:text>
    </xsl:text> </xsl:template> </xsl:stylesheet> $
    


     
    Hermann<myXsltBlog/> <myXsltTweets/>