forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: svn commit: r673630 - /forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
Date Thu, 03 Jul 2008 12:12:39 GMT
On Thu, 2008-07-03 at 12:26 +0300, Sjur Moshagen wrote:
> Hello,
> 
> Anybody able to help me? I thought that the following in document-to- 
> fo.xsl:
> 
>    <xsl:variable
>          name="sans-serif"
>          select="'sans-serif'" />
>    <xsl:variable
>          name="serif"
>          select="'serif'" />
>    <xsl:variable
>          name="monospace"
>          select="'monospace'" />
> ...
>    <xsl:include
>          href="helper-commonElements.xsl" />
> 
> 
> would automatically make the variables/params (I have tested both, no  
> difference) available to helper-commonElements.xsl, but no. How come?

Hmm, I do not understand.

BUT:
On Thu, 2008-07-03 at 10:08 +0000, Forrestbot@forrest.zones.apache.org
wrote:
[java]
file:/export/opt/forrest-trunk/build/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl;
Line #35; Column #94; org.apache.xml.utils.WrappedRuntimeException: Could not find variable
with the name of sans-serif
>      [java] X [0]
samples-b/sample.pdf      BROKEN: dispatcherError: 500 - Internal server
error
>      [java] The contract "content-main" has thrown an exception by
resolving the implementation from
"cocoon://resolve.contract.fo.content-main".
>      [java] 
>      [java] dispatcherErrorStack:
>      [java] org.apache.forrest.dispatcher.DispatcherException: 500 -
Internal server error
>      [java] component: ContractBean
>      [java] message:
>      [java] Could not setup transformer in the contractBean.
>      [java] Please check that the contract implementation is
wellformed and valid!
>      [java] 
>      [java] One reason that an implementation may not be valid is that
you are using variables that cannot be resolved.
>      [java] Please see the logs and the sysout for more information,
you may are see right away the error.


Reading this error it seems that there is a logical error. 

The contract "content-main" is not defining this variables neither do
helper-commonElements.xsl this explains why the forrestbot fails.

salu2

> 
> And sorry for the extra noise, I tested without restarting forrest,  
> and it seemed to work fine. But stopping forrest, then forrest clean,  
> then forrest run again displayed the problem. I assume that there's  
> some caching things going on with pdf that makes the edit - reload  
> cycle unreliable.
> 
> Best regards,
> Sjur
> 
> Den 3. jul. 2008 kl. 12.15 skrev sjur@apache.org:
> 
> > Author: sjur
> > Date: Thu Jul  3 02:15:48 2008
> > New Revision: 673630
> >
> > URL: http://svn.apache.org/viewvc?rev=673630&view=rev
> > Log:
> > The font-family params defined in document-to-fo.xsl were NOT  
> > available to this stylesheet, even though it is included after the  
> > param definitions.
> >
> > I have thus added the param definitions here as well, to make the  
> > pdf generation in Dispatcher work again, but this is really a cludge  
> > that goes against the idea of putting the font-family specifications  
> > into params/variables instead of as hard-coded strings.
> >
> > Anyway, pdf generation in Dispatcher is working again.
> >
> > Modified:
> >    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/ 
> > resources/stylesheets/helper-commonElements.xsl
> >
> > Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/ 
> > resources/stylesheets/helper-commonElements.xsl
> > URL: http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl?rev=673630&r1=673629&r2=673630&view=diff
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > = 
> > ======================================================================
> > --- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/ 
> > resources/stylesheets/helper-commonElements.xsl (original)
> > +++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/ 
> > resources/stylesheets/helper-commonElements.xsl Thu Jul  3 02:15:48  
> > 2008
> > @@ -18,6 +18,17 @@
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >   xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
> >
> > +<!-- Font-family variables defined here: -->
> > +  <xsl:param
> > +        name="sans-serif"
> > +        select="'sans-serif'" />
> > +  <xsl:param
> > +        name="serif"
> > +        select="'serif'" />
> > +  <xsl:param
> > +        name="monospace"
> > +        select="'monospace'" />
> > +
> >   <xsl:include href="lm://transform.xml.pathutils"/>
> >
> >   <xsl:template match="anchor">
> >
> >
> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message