forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject RE: How do I add a custom fo.xsl
Date Tue, 16 Jan 2007 08:11:16 GMT
On Mon, 2007-01-15 at 18:31 +0000, Steve Odlind wrote: 
> Hi Thorsten,
> 
> If I understand your suggestion correctly, ALL files in my site will use
> the fo.xsl in the
> {properties:skins-dir}{forrest:forrest.skin}/xslt/fo/{1}-to-fo.xsl
> directory. Is that correct? 

Yes.

> If so, that's not quite what I wanted. I
> would like just a few specified files to use the new fo.xsl.
> 

Ok, I understand. Thanks for clarification.

> >> Hmm, not sure there is a space! {1} aNewFile.pdf That could cause the
> >>error.
> 
> The space was a typo in the email, and not present in the source file.
> Sorry for the confusion.

No worries, just thought to point it out. 

> 
> >> We would need some more information (stack trace) to see where the
> NPE
> >>is coming from.
> 
> Please find the stack trace attached.

FATAL_E (2007-01-15) 18:12.18:658   [core.xslt-processor] (Unknown-URI)
Unknown-thread/TraxErrorHandler: Error in TraxTransformer:
file:/C:/docs/documentation/src/documentation/skins/pelt/xslt/fo/document2fo.xsl; Line 50;
Column 59; 
; SystemID:
file:/C:/docs/documentation/src/documentation/skins/pelt/xslt/fo/document2fo.xsl; Line#: 50;
Column#: 59
javax.xml.transform.TransformerException: java.lang.NullPointerException

As I understand it the file
file:/C:/docs/documentation/src/documentation/skins/pelt/xslt/fo/document2fo.xsl is throwing
an exception at Line#: 50; Column#: 59. Makes me wonder what that might be.

I looked at your original mail again:
On Mon, 2007-01-15 at 15:45 +0000, Steve Odlind wrote:
> <map:match pattern="**aNewFile.xml">
>       <map:generate src="{project:content.xdocs}{1} aNewFile.pdf" />
>       <map:transform src="{project:resources}/myNewFile2fo.xsl" />
>       <map:serialize type="fo2pdf" />
>   </map:match>

The generator url is not valid (if you go with file naming conventions).
You are trying to generate SAX events from a binary file
({project:content.xdocs}{1}aNewFile.pdf). 

I think you want {project:content.xdocs}{1}aNewFile.xml and then e.g.
request http://localhost:8888/index-aNewFile.pdf. This would then
trigger your custom match with the file
{project:content.xdocs}index-aNewFile.xml. 

Then you need to change it to something like:

<map:match pattern="**aNewFile.pdf">
  <map:generate src="{project:content.xdocs}{1}aNewFile.xml" />
  <map:transform src="{project:resources}/myNewFile2fo.xsl" />
  <map:serialize type="fo2pdf" />
</map:match>

That should work fine. Please try and report back.

HTH

salu2


Mime
View raw message