Den 3. jul. 2008 kl. 15.12 skrev Thorsten Scherler:
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.
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/
stylesheets/document-to-fo.xsl
does already contain an inclusion of helper-commonElements.xsl, as
showed above. I didn't see any other place where helper-
commonElements.xsl would be included or called, thus I thought that by
adding the variables to document-to-fo.xsl would make them available
also to helper-commonElements.xsl. But I was apparently mistaken:)
BUT:
On Thu, 2008-07-03 at 10:08 +0000, [EMAIL PROTECTED]
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.
I agree, but I can't see where...
The contract "content-main" is not defining this variables neither do
helper-commonElements.xsl this explains why the forrestbot fails.
Are you saying that helper-commonElements.xsl is called/included
*outside of* or *independent from* document-to-fo.xsl? That would of
course explain the behaviour.
My ultimate goal is to move the whole font-family specification to a
configuration file (skinconf + the relevant place for dispatcher -
where would that be?), but I wanted to make sure that the variables
were working fine before I took the next step.
Best regards,
Sjur