forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: different templates for same element
Date Thu, 28 Jul 2005 11:19:32 GMT
HANAX wrote:
> While rendering voice output, I think that should be goof to render some simple visual
output, for example section titles as <H1> and so on... 
> I have something like
> 
> <xsl:template match="body">
>   <xsl:call-template name="voiceNavigation"/> 
>   <xsl:call-template name="visualRender"/> 
> </xsl:template>
> 
> 
> in "voiceNavigation" I have somthing like
> 
>  <xsl:for-each select="//section"> 
>    ...
>    <xsl:apply-templates/>
>    ...
>  </xsl:for-each>
> 
> 
> And having templates like
>   <xsl:template match="p">
>     <xsl:value-of select="."/>
>     <vxml:break/>
>   </xsl:template>
> 
>   <xsl:template match="title">
>     Title: <xsl:value-of select="."/>.
>     <vxml:break/>
>   </xsl:template>
> 
> I should do the same in "visualRender".
> But if I call apply-templates, the "p" template will be applied, but I want to render
only text not <vxml:break/> and for example for title I want something like:
> 
>   <xsl:template match="title">
>     <h1>
>       <xsl:value-of select="."/>
>     </h1>
>   </xsl:template>
> 
> 
> Any solution?

You want to be able to reuse the existing visual navigation stuff rather 
than rewrite it. This means it is time to start considering moving your 
code into a forrest:views. In order for us to understand how to do this 
we really need to see the full code and understand exactly how the 
voiceNavigation stuff works.

Perhaps it is time for you to upload what you have,a s you have 
suggested in another thread.

Ross

Mime
View raw message