Hi

I am try to figure out how to set a variable in an xsl process using a value from a previous XML fragment loaded into a pipeline.

The pipeline receives, as one of it's input parameters (called from another pipeline) the following XML

These are the parameter declarations

<p:param name="instance" type="input"/>
<p:param name="action" type="input"/>
<p:param name="data" type="output"/>  

Using a debug statement in Studio, I can tell that the contents of "#action" is:

<root>
    <varAction>change</varAction>
</root>


Then I need to use this variable in an XSL statement in the xsl processor as below. The #data_flow refers to xml that is obtained from an external file earlier in the pipeline.

<p:processor name="oxf:xslt">
            <p:input name="data" href="#data_flow"/>
            <p:input name="config">                              
                <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="p oxf">    
                        <xsl:variable name="varAction">
                                <xsl:value-of select="document('#action')/root/varAction"></xsl:value-of>
                        </xsl:variable>          
                    <xsl:template match="/">                                                        
                            <screenFlowManager><pageURL>                                    
                                         <xsl:copy-of select="/screenFlowManager/pageURL/[EMAIL PROTECTED]"/>                                                                                
                                        <varAction><xsl:copy-of select="document('#action')/*"></xsl:copy-of></varAction>
                                        </pageURL></screenFlowManager>
                    </xsl:template>                            
                </xsl:stylesheet>              
            </p:input>
            <p:output name="data" ref="data" debug="data_output"/>
        </p:processor>

I placed the <varAction> node in just so I could see what was being seen in the document('#action'). When I view the output using the debug statement in Studio, and from the results of the transform, I find that $varAction is empty (=' ') and the document('#action) seems to be empty as well.

Any assistance would be greatly appreciated. What am I doing wrong. What does document('#action') actually refer to? It does not seem to reference the action xml document.

Thanks,

Brian Bacsu

Reply via email to