Hi all,
I need branching depending on the current contents of some tag in the
XML at a given pipeline step.
So the first thing comes up to my mind is to use a matcher.
I've found the WildcardParameterMatcher that allows me to use sitemap
variable and an input module called XmlFileModule.
This input module allows me to use any XPath expression of any pipeline.
The problem is how can I pass the current XML flow to the XmlFileModule?
The generator isn't file based, it parses the body of a post request.
Here is a possible sketch of this solution:
<map:match pattern="myurl">
<map:generate type="mygenerator"/>
<map:transform pattern="sheet1.xsl"/>
<!--I would like to branch here if /*/branching-tag='valueA'-->
<map:match type="wildcard-param" pattern="valueA">
<map:parameter name="parameter-name" value="my-param"/>
<map:parameter name="my-param"
value="{xml-file-module:/*/branching-tag}"/>
<map:transform pattern="sheet2a.xsl"/>
<map:serialize/>
</map:match>
<map:transform pattern="sheet2b.xsl"/>
<map:serialize type='myserializer'>
</map:match>
Has anyone tried any better solution?
Is this solution viable?
Thanks in advance for any hint.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
|