Lautaro Brasseur wrote:
I have the following entry in sitemap.xmap:
<map:match pattern="*.pppp">
<map:generate type="myGenerator"/>
<map:transform src="c:/temp/xsl/{1}_entrada.xsl"/>
<map:serialize/>
</map:match>
I want to change the src parameter for the transformator, depending on a element that comes from the generator. There is any way to do this (without writing a custom transformer)? Can I modify that parameter from the generator?
One possiblity is to merge both style sheets. If there are no
template clashes, this is probably all you need.
If there are template clashes, use modes:
 <xsl:template match="foo" mode="style1"/>
   ...
 </xsl:template>
 <xsl:template match="foo" mode="style2"/>
   ...
 </xsl:template>
and decide in the root node templede which mode to use:
 <xsl:template match="/">
   <xsl:choose>
     <xsl:when test="//some-element">
       <xsl:apply-templates select="node()" mode="style1"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates select="node()" mode="style2"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>

HTH
J.Pietschmann


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to