Joerg Heinicke wrote:
On 11.05.2007 16:54, ypomonh wrote:
I have a simple pipelineQ
<map:pipeline>
<map:match pattern="patternA">
<map:generate src="cocoon:/patternB"/>
<map:transform src="style.xsl">
<map:parameter name="someParam"
value="cocoon:/patternC"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
and I want to handle the parameter "someParam" in my style.xsl:
<xsl:variable name="myVariable">
<xsl:value-of select="someParam/nodeA"/>
</xsl:variable>
but it returns empty.
What is the correct way to access a parameter passed to an XSL
transformation from within the XSL stylesheet..?
You are only injecting a string, not the content of the pipeline
cocoon:/patternC. Have a look on IncludeTransformer.
Joerg I supposed you meant "CInclude Transformer", so I just read
http://cocoon.apache.org/2.1/userdocs/cinclude-transformer.html and I
understood that I could first do my XSL transformation leaving a:
<cinclude:include src="cocoon:/patternC"/>
somewhere in the output and continue the pipeline with a CInclude
transformation that would fetch the date from cocoon:/patternC.
Besides the fact that it seems a bit complicated, I cannot use the
element cinclude:include since need the fetched data inside an attribute:
<elem someAttr="$myVariable"/>
and <elem someAttr="<cinclude:include src="cocoon:/patternC"/>"/> is
obviously wrong.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]