You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Rolando Isidoro <rl...@uninova.pt> on 2005/05/30 16:49:30 UTC

Problem linking CSS to XSL in Lenya

Hi there, I've managed to show information stored in an OAI compliant 
tool in my Lenya pub, by inserting a new pipeline under 
publication-sitemap.xmap with several matches similar to the one below:

<map:match pattern="live/people/asg/profile">
  <map:generate src="**** XML SOURCE ****"/>
  <map:transform src="xslt/OAI2xhtml.xsl"/>
  <map:serialize type="html"/>
</map:match>


The file OAI2xhtml.xsl is stored in the xslt dir in my publication and 
contains a link to a CSS file like this:
<link href="../resources/shared/css/oai.css" type="text/css" 
rel="stylesheet"/>


The problem is that the XSL transformations occurs but the CSS file is 
not detected:
The requested document '/people/resources/shared/css/oai.css' with 
document-id '/people/resources/shared/css/oai' does not exist.


I've looked into page2xhtml.xsl in order to see how page.css is called, 
several parameters are passed on in publication-sitemap.xmap; one of 
them, root, is them used to define the location of the file. My match is 
very different from the one used to call page2xhtml.xsl and there seems 
to be no way form me to pass those parameters into OAI2xhtml.xsl 
dynamically. My oai.css file is located in the same dir as page.css, how 
can I hard code the location of the file? I've tried several solutions 
but always got the same result.

Thanks in advance, regards,
Rolando

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Problem linking CSS to XSL in Lenya

Posted by Rolando Isidoro <rl...@uninova.pt>.
Farhdine Boutzakhti wrote:

>You can try using $root,
><link rel="stylesheet" href="{$root}/css/oai.css" type="text/css"/>
>
Thanks for the reply, as I said before:

>>My match is very different from the one used to call page2xhtml.xsl and there seems 
>>to be no way form me to pass those parameters into OAI2xhtml.xsl 
>>dynamically.
>>
Meanwhile I've managed to find a solution, when consulting the css file 
location, it returned 
http://localhost:8080/lenya/gris/live/people/css/oai.css, so I took a 
look into the url of page.css and the result was 
http://localhost:8080/lenya/gris/live/css/page.css, so I just added an 
additional ../ to the href in my css call under OAI2xhtml.xsl, which 
worked just fine.

Thanks once again,
Rolando

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Problem linking CSS to XSL in Lenya

Posted by Farhdine Boutzakhti <fu...@axidea.fr>.
----- Original Message ----- 
From: "Rolando Isidoro" <rl...@uninova.pt>


> Hi there, I've managed to show information stored in an OAI compliant 
> tool in my Lenya pub, by inserting a new pipeline under 
> publication-sitemap.xmap with several matches similar to the one below:
> 
> <map:match pattern="live/people/asg/profile">
>   <map:generate src="**** XML SOURCE ****"/>
>   <map:transform src="xslt/OAI2xhtml.xsl"/>
>   <map:serialize type="html"/>
> </map:match>
> 
> 
> The file OAI2xhtml.xsl is stored in the xslt dir in my publication and 
> contains a link to a CSS file like this:
> <link href="../resources/shared/css/oai.css" type="text/css" 
> rel="stylesheet"/>

    You can try using $root,
    <link rel="stylesheet" href="{$root}/css/oai.css" type="text/css"/>

> The problem is that the XSL transformations occurs but the CSS file is 
> not detected:
> The requested document '/people/resources/shared/css/oai.css' with 
> document-id '/people/resources/shared/css/oai' does not exist.
> 
> 
> I've looked into page2xhtml.xsl in order to see how page.css is called, 
> several parameters are passed on in publication-sitemap.xmap; one of 
> them, root, is them used to define the location of the file. My match is 
> very different from the one used to call page2xhtml.xsl and there seems 
> to be no way form me to pass those parameters into OAI2xhtml.xsl 
> dynamically. My oai.css file is located in the same dir as page.css, how 
> can I hard code the location of the file? I've tried several solutions 
> but always got the same result.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org