forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: question to FOR-1136 and locationmap.xml not found
Date Sun, 22 Feb 2009 06:49:21 GMT
EMMEL Thomas wrote:
> 
> I have (maybe) small problem, which I cannot resolve following the docs
> and the mailing lists:
> 
> I use my own DTD which enhances the default one by adding
> an element for figures with a caption and an automatic counter
> and another element with a reference to this first element which could
> be used
> like this
> 
> <sfigure id="somepic" src="imgaes/some.png" alt="some explanation"
>  caption="This is a picture"/>
> 
> See <sref ref="somepic" label="Figure"/> ...
> 
> This works very good as long as I need output to html and I implemented
> my changes in my skins 'document-to-html.xsl' mainly.
> 
> Now I like to add these elements to 'document-to-fo.xsl' to get it in
> PDF too.
> However, following FOR-1136 my local file isn't used anymore (/-#).
> Now, I follow the path and like to understand how I could use the
> locationmap.xml
> to add my changes again.
> 
> The problem seems that my project locationmap.xml isn't recognized.
> I cannot find any reference to it in the locationmap.log-file, the same
> happens
> for locationmap-project.xml...
> 
> I use 0.9dev (not fully up to date) and my locationmap.xml is in
> PROJECT_HOME/src/content/locationmap.xml
> (Note: I removed the 'documentation' directory for my project)
> 
> I added this to it to try to use my old document-to-fo.xsl again:
> 
>     <match pattern="pdf.transform.*.*">
>       <select>
>         <location
> src="{properties:skins-dir}/abaqus/xslt/fo/{1}-to-{2}.xsl"/>
>       </select>
>     </match>
> 
> and I added this to my document-to-fo.xsl:
> 
> <xsl:import
> href="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl"/>
> 
> hoping it will work...

Better to understand how the locationmaps work ;-)

I just use the default skin, so i don't what you really
need to do. Ditto for the Forrest project website.

When i look at Forrest's core locationmaps, it seems
that it already tries in your project first. So you
should not need to do any locationmap nor import.

Look at $FORREST_HOME/main/webapp/locationmap-transforms.xml
and search in file for "skin transforms".

 32 <!-- ================================== -->
 33 <!-- skin transforms                    -->
 34 <!-- ================================== -->
 35     <match pattern="transform.*.fo">
 36       <select>
 37         <location src="{properties:skins-dir}{forrest:forrest.skin}/xslt/fo/{1}-to-fo.xsl"
/>
 38         <location src="{forrest:forrest.context}/skins/{forrest:forrest.skin}/xslt/fo/{1}-to-fo.xsl"/>
 39         <location src="{forrest:forrest.context}/skins/common/xslt/fo/{1}-to-fo.xsl"/>
 40       </select>
 41     </match>

So first in your project's relevant skin dirrectory,
then in forrest core relevant skin dirrectory,
then in forrest core common skin dirrectory.

Hope that helps.

-David


Mime
View raw message