Mailing List Archive

how to source a global document-to-fo.xsl from my local one?
Hi,

I use 0.9dev but I think this applies to all versions:

I use a local document-to-fo.xsl to change the output to pdf.
However, I don't like to copy the complete global *fo.xsl files found in the
plugin (org.apache.forrest.plugin.output.pdf) and like to source them in
my xsl-file like this:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">

<xsl:import
href="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl"/>

<!-- ... my definitions follow -->

However this always gives an error from cocoon:

"The scheme is not conformant"

which is useless for me since I have found nothing on this error in
google etc.
When I use:

<xsl:import
href="/opt/apache-forrest-0.9dev/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl"/>

instead it works, but I don't like to use an absolute path here since we
use forrest on different machines.

Any idea?

Kind regards

Thomas
Re: how to source a global document-to-fo.xsl from my local one? [ In reply to ]
2009/2/26 EMMEL Thomas <thomas.emmel@3ds.com>:
> Hi,
>
> I use 0.9dev but I think this applies to all versions:
>
> I use a local document-to-fo.xsl to change the output to pdf.
> However, I don't like to copy the complete global *fo.xsl files found in the
> plugin (org.apache.forrest.plugin.output.pdf) and like to source them in
> my xsl-file like this:
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                xmlns:fo="http://www.w3.org/1999/XSL/Format"
>                version="1.0">
>
> <xsl:import
> href="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl"/>

http://forrest.apache.org/docs_0_90/your-project.html#skins
Re: how to source a global document-to-fo.xsl from my local one? [ In reply to ]
Ross Gardler schrieb:
>
> 2009/2/26 EMMEL Thomas <thomas.emmel@3ds.com>:
> > Hi,
> >
> > I use 0.9dev but I think this applies to all versions:
> >
> > I use a local document-to-fo.xsl to change the output to pdf.
> > However, I don't like to copy the complete global *fo.xsl files
> found in the
> > plugin (org.apache.forrest.plugin.output.pdf) and like to source
> them in
> > my xsl-file like this:
> >
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:fo="http://www.w3.org/1999/XSL/Format"
> > version="1.0">
> >
> > <xsl:import
> >
> href="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl"/>
>
>
> http://forrest.apache.org/docs_0_90/your-project.html#skins
>
Ross,

do I understand you correct:
This means I cannot import the global files, I need to copy them first
and then reference them by
../../../somewhere/etc/blabla
There is nothing like using variables?

Thanks

Thomas
Re: how to source a global document-to-fo.xsl from my local one? [ In reply to ]
Ross,

finally I managed what I liked to do:
I added

<xsl:include href="lm://globalpdf.transform.document.fo" />

to my local document-to-fo.xsl
and

<match pattern="globalpdf.transform.*.*">
<location
src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/{1}-to-{2}.xsl"/>
</match>

to my locationmap....

So, how can I add patches to the documentation? Should I send that to
the list, to you or submit it by svn???

Regards

Thomas

EMMEL Thomas schrieb:
> Ross Gardler schrieb:
>>
>> 2009/2/26 EMMEL Thomas <thomas.emmel@3ds.com>:
>> > Hi,
>> >
>> > I use 0.9dev but I think this applies to all versions:
>> >
>> > I use a local document-to-fo.xsl to change the output to pdf.
>> > However, I don't like to copy the complete global *fo.xsl files
>> found in the
>> > plugin (org.apache.forrest.plugin.output.pdf) and like to source
>> them in
>> > my xsl-file like this:
>> >
>> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> > xmlns:fo="http://www.w3.org/1999/XSL/Format"
>> > version="1.0">
>> >
>> > <xsl:import
>> >
>> href="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl"/>
>>
>>
>> http://forrest.apache.org/docs_0_90/your-project.html#skins
>>
> Ross,
>
> do I understand you correct:
> This means I cannot import the global files, I need to copy them first
> and then reference them by
> ../../../somewhere/etc/blabla
> There is nothing like using variables?
>
> Thanks
>
> Thomas
>


--
------------------------------------------------------------------------
[SIMULIA]


Dr.-Ing. Thomas EMMEL
Application Engineer
Abaqus Deutschland GmbH
Tel. +49 241 474 01 0
Fax +49 241 474 01 810
Thomas.EMMEL@3ds.com <mailto:Thomas.EMMEL@3ds.com>
Dassault Systèmes | www.3ds.com <http://www.3ds.com/>

Besuchen Sie uns auf: www.simulia.com/de <http://www.simulia.com/de>
Abaqus Deutschland GmbH, Elisabethstraße 16, D-52062 Aachen
Sitz der Gesellschaft: HRB Nr. 4749 Amtsgericht Aachen
Geschäftsführer: Dr. Martin Küssner, Dr. Gerhard Deeken, Frans J.H. Peeters




Bauen Sie Ihre Abaqus-Kenntnisse aus
und besuchen Sie unsere zahlreichen
Einführungs- und Spezialseminare in
Aachen, Stuttgart und München.
Den Schulungsplan 2009 finden Sie hier
<http://www.simulia.com/locations/germany/seminare.html>.

[Seminare] <http://www.simulia.com/locations/germany/seminare.html>
Re: how to source a global document-to-fo.xsl from my local one? [ In reply to ]
On Thu, Feb 26, 2009 at 7:37 AM, EMMEL Thomas <thomas.emmel@3ds.com> wrote:
> Ross,
>
> finally I managed what I liked to do:
> I added
>
> <xsl:include href="lm://globalpdf.transform.document.fo" />
>
> to my local document-to-fo.xsl
> and
>
> <match pattern="globalpdf.transform.*.*">
> <location
> src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.pdf/resources/stylesheets/{1}-to-{2}.xsl"/>
> </match>
>
> to my locationmap....
>
> So, how can I add patches to the documentation? Should I send that to the
> list, to you or submit it by svn???

http://forrest.apache.org/contrib.html#patch

--tim
Re: how to source a global document-to-fo.xsl from my local one? [ In reply to ]
2009/2/26 EMMEL Thomas <thomas.emmel@3ds.com>:
> Ross,
>
> finally I managed what I liked to do:
> I added
>
> <xsl:include href="lm://globalpdf.transform.document.fo" />

Yes, that works. I forgot we added that. Can you please update the
docs and provide a patch. But you don't need to add anything to your
locationmap, see
http://forrest.apache.org/docs_0_80/locationmap.html#namingConvention

So it should be (I've not checked that the PDF plugin conforms to the
naming convention:

<xsl:include href="lm://pdf.transform.document.fo" />

(just for completeness, the old method does allow the inclusion of
global files as the plugin and skins files are copied by Forrest into
a single location when forrest is run, thus relative paths work
regardless of where the source comes from).

> So, how can I add patches to the documentation? Should I send that to the
> list, to you or submit it by svn???

http://forrest.apache.org/contrib.html

Ross
Re: how to source a global document-to-fo.xsl from my local one? [ In reply to ]
Ross Gardler schrieb:
>
> 2009/2/26 EMMEL Thomas <thomas.emmel@3ds.com>:
> > Ross,
> >
> > finally I managed what I liked to do:
> > I added
> >
> > <xsl:include href="lm://globalpdf.transform.document.fo" />
>
> Yes, that works. I forgot we added that. Can you please update the
> docs and provide a patch. But you don't need to add anything to your
> locationmap, see
> http://forrest.apache.org/docs_0_80/locationmap.html#namingConvention
>
> So it should be (I've not checked that the PDF plugin conforms to the
> naming convention:
>
> <xsl:include href="lm://pdf.transform.document.fo" />
>
> (just for completeness, the old method does allow the inclusion of
> global files as the plugin and skins files are copied by Forrest into
> a single location when forrest is run, thus relative paths work
> regardless of where the source comes from).
>
> > So, how can I add patches to the documentation? Should I send that
> to the
> > list, to you or submit it by svn???
>
> http://forrest.apache.org/contrib.html
>
> Ross
>
Ross,

no that will not work, since I call it from document-to-fo.xsl:

(StylesheetHandler) file:///home/emmel/...../xslt/fo/document-to-fo.xsl is directly or indirectly including itself!

I need to go the 'globalpdf'-way.

Thomas