Topic
  • 6 replies
  • Latest Post - ‏2013-07-15T14:19:56Z by Raul Alejandro Sosa
Raul Alejandro Sosa
Raul Alejandro Sosa
6 Posts

Pinned topic Using Stylesheets Inside a Variable

‏2013-07-14T01:48:54Z |

Dear all, i need some help.

I have made a policy where as a first step i make a xsl stylesheet (with namespace-alias I generate an XSLT as output of a transformation), but how can I use it in a second step (another transformation)? i try setting a variable with the (var://context/mycontext/myvar) so it use this as URL but it says store:///notfound, then i try to do an xsl:import or xsl:include but didn't work. 

 

Can you please give me some advice or the solucion (i hope this one).

 

 

Thanks in advance.

Updated on 2013-07-14T01:49:45Z at 2013-07-14T01:49:45Z by Raul Alejandro Sosa
  • NILAY97
    NILAY97
    222 Posts

    Re: Using Stylesheets Inside a Variable

    ‏2013-07-14T04:33:23Z  

    Hi Raul,

    What do you want to do with the Output of your first XSL. Do you want to use it as the Input for the second Processing Action?

    Or do you want to call template? You can name the first xsl as a template like

    <xsl:template name="MyFirstXSL" match="/"/>

    and then simply call the template in the second processing action.

    <xsl:call-template name="MyFirstXSL">

     </xsl:call-template>

    Let me know if this helps.

  • Raul Alejandro Sosa
    Raul Alejandro Sosa
    6 Posts

    Re: Using Stylesheets Inside a Variable

    ‏2013-07-14T06:12:32Z  
    • NILAY97
    • ‏2013-07-14T04:33:23Z

    Hi Raul,

    What do you want to do with the Output of your first XSL. Do you want to use it as the Input for the second Processing Action?

    Or do you want to call template? You can name the first xsl as a template like

    <xsl:template name="MyFirstXSL" match="/"/>

    and then simply call the template in the second processing action.

    <xsl:call-template name="MyFirstXSL">

     </xsl:call-template>

    Let me know if this helps.

    Hi thanks for your response (on weekend by the way), I want to execute the result of the first transformation in the second processing action, the input will the the message on INPUT context. I tried saving the result in a variable but it seems impossible to access in the second action.

    The example that you give me is passing by the OUTPUT context like a normal result an then in a fixed xsl call by the name of the template?

  • HermannSW
    HermannSW
    4657 Posts

    Re: Using Stylesheets Inside a Variable

    ‏2013-07-14T10:49:07Z  

    > I have made a policy where as a first step i make a xsl stylesheet (with namespace-alias I generate an XSLT as output of a transformation), but how can I use it in a second step (another transformation)?
    >

    you generate a XSLT (stylesheet) as output and want to use that to transform the original input?

    If so, you will do
    INPUT -- transform(xform1) -- xsl
    INPUT -- transform(xform1) -- OUTPUT

    in WebGUI.

    Then change to "Object->XML Processing->Processing Action" and open the 2nd transform action from your rule above.

    Please change "XSL style sheet" field to "xsl" there  and apply -- that will use the stylesheet generated into "xsl" context for transformation.

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
     

  • Raul Alejandro Sosa
    Raul Alejandro Sosa
    6 Posts

    Re: Using Stylesheets Inside a Variable

    ‏2013-07-14T14:59:25Z  
    • HermannSW
    • ‏2013-07-14T10:49:07Z

    > I have made a policy where as a first step i make a xsl stylesheet (with namespace-alias I generate an XSLT as output of a transformation), but how can I use it in a second step (another transformation)?
    >

    you generate a XSLT (stylesheet) as output and want to use that to transform the original input?

    If so, you will do
    INPUT -- transform(xform1) -- xsl
    INPUT -- transform(xform1) -- OUTPUT

    in WebGUI.

    Then change to "Object->XML Processing->Processing Action" and open the 2nd transform action from your rule above.

    Please change "XSL style sheet" field to "xsl" there  and apply -- that will use the stylesheet generated into "xsl" context for transformation.

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
     

    Thanks Hermann yes, I generate an XSLT as an output.

    you mean save the result in the first in var://context/xsl instead od OUTPUT? and then use that context as stylesheet in the second?

     

    Thanks!

    Updated on 2013-07-15T00:37:33Z at 2013-07-15T00:37:33Z by Raul Alejandro Sosa
  • Raul Alejandro Sosa
    Raul Alejandro Sosa
    6 Posts

    Re: Using Stylesheets Inside a Variable

    ‏2013-07-15T14:19:44Z  
    • NILAY97
    • ‏2013-07-14T04:33:23Z

    Hi Raul,

    What do you want to do with the Output of your first XSL. Do you want to use it as the Input for the second Processing Action?

    Or do you want to call template? You can name the first xsl as a template like

    <xsl:template name="MyFirstXSL" match="/"/>

    and then simply call the template in the second processing action.

    <xsl:call-template name="MyFirstXSL">

     </xsl:call-template>

    Let me know if this helps.

    It works! thanks!

  • Raul Alejandro Sosa
    Raul Alejandro Sosa
    6 Posts

    Re: Using Stylesheets Inside a Variable

    ‏2013-07-15T14:19:56Z  
    • HermannSW
    • ‏2013-07-14T10:49:07Z

    > I have made a policy where as a first step i make a xsl stylesheet (with namespace-alias I generate an XSLT as output of a transformation), but how can I use it in a second step (another transformation)?
    >

    you generate a XSLT (stylesheet) as output and want to use that to transform the original input?

    If so, you will do
    INPUT -- transform(xform1) -- xsl
    INPUT -- transform(xform1) -- OUTPUT

    in WebGUI.

    Then change to "Object->XML Processing->Processing Action" and open the 2nd transform action from your rule above.

    Please change "XSL style sheet" field to "xsl" there  and apply -- that will use the stylesheet generated into "xsl" context for transformation.

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
     

    It works! thanks!