Hello Markus,

no guarantee that it works, but what about the following:

<xsl:import href="cocoon:/trignm.xsl"/>

Now you must add a pipeline to your sitemap:

<map:match pattern="trignm.xsl">
  <map:read src="path/to/xsl/trignm.xsl" mime-type="text/xml"/>
</map:match>

With this solution you have added a further mapping layer: You can change the location of your trignm.xsl without changing the import statements in every refering stylesheet.

If you have different sub sitemaps, you can add the above pipeline to the root sitemap and change the import path to "cocoon://trignm.xsl" (double slash).

Another possibility is to use the context:// protocol which refers to the servlet context. Now you were working on the file system: "context://resources/stylesheets/trignm.xsl".

Find more about the cocoon protocols at http://cocoon.apache.org/2.0/userdocs/concepts/sitemap.html (in the middle of the page).

Joerg

Markus Alin wrote:
Hi!!

I'm using a computational stylesheet with alot of trigonometry templates
which I include into whatever style sheet which needs it with the
<xsl:import> tag. I ofcourse want the computational stylesheet to be
available all over the application and I don't want to keep duplicate
copies of it. The only way i found to achieve this was to work with
relative directory paths. It currently looks like:

<xsl:import href="../../../../../resources/stylesheets/trignm.xsl"/>

This ofcource makes the system very static and is from my point of view
a violation against the whole sitemap philosophy. Are there any plans to
change this or are there any alternative ways to achieve the same
thing??

/Thnxs Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to