forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HANAX" <hanax_forr...@centrum.sk>
Subject RE: Re: voice stylesheet and views
Date Fri, 23 Sep 2005 15:15:52 GMT
> HANAX wrote:
> > As I understood, contracts are points where to place xsl templates.
>  
> Yes, templates, but not complete stylesheets...

Ok, then how to import some namespace? My namespace is "vxml" but now it's ignored...

>  
> > I noticed some some structure naming convention but I can't find where it's explained.

>  
> Because they are not, at least not in an easily accessible way. There 
> will be discussion in the mail archives, but they are not documented 
> anywhere. I'm afraid I can't tell you what they are.
>  
> > Now my problem:
> > 1. Originally I had my template for generating "voice head"
> > 2. I have contract voice-markup.ft 
> > 3. I added my original voice stylesheet template under some forrest:template node
in contract and rename it to voice-markup-head
> > 4. No results :(
>  
> What do you mean "no result", do you get any output at all?


As no result I mean:

I have:
  <xsl:template name="voice-markup-head">
    <xsl:apply-templates select="//document"/>
  </xsl:template>
  
  <xsl:template match="document">
    <xsl:apply-templates select="//body"/>
  </xsl:template>

  <xsl:template match="body">
    <xsl:call-template name="voiceNavigation"/>
  </xsl:template>

  <xsl:template name="voiceNavigation">
    ...
  </xsl:template>

but nothing in header in result page...
Anyway, why it must be named "voice-markup-head"?

>  
> What does your contract look like now?
>  
> > 
> > If I look to some examples (plugins that use views and contracts), I note that all
contracts are very small and I can't see any xsl manipulations...
>  
> Small because they are not doing major transformations, they are simply 
> working with specific parts of the source document. However, yours will 
> be much larger since you are processing the whole document into a new 
> format.
>  
> Similarly, not all contracts do any XSL transformation stuff on the 
> source, some just add fixed content (like the search box for example) 
> For an example of a contract that does do transformations on the source see:
>  
> http://svn.apache.org/repos/asf/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-main.ft
> http://svn.apache.org/repos/asf/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-title.ft
>  

Still not helping... :(

> > So what is the magic? How to link xsl processing with contract? Or am I totally
wrong?
>  
> The short answer is that the templates defined in the view (voice.fv in 
> this case) are all pulled together to create a single stylesheet that is 
> applied to the source document.
>  
> For the full answer see:
>  
> http://marc.theaimsgroup.com/?l=forrest-dev&m=112612768505585&w=2
>  
> Note that views are a moving target and have changed a little since that 
>   mail, but the basic concept (and the part you are asking about) 
> remains the same.
>  
> Ross
> Ross
>  


Mime
View raw message