Re: Style Sheet difficulties

garry espe <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
Grant McLean <grant@...> writes:


> 
> It appears that your stylesheet is being interpreted as a Perl script.
> This is definitely not a Petal problem, but possibly an Apache config
> issue.

Yes, I believe this was the problem.
> 
> Are you calling Petal from a CGI script?  If so, the stylesheet probably
> shouldn't be in the CGI directory.  Perhaps you could move it to the
> docroot directory and change you template to include a leading /
> 
>    <at> import url(/style.css);
> 
I am using mod_perl.  I moved the style sheet and other html files to  the doc
root directory, and the problems vanished -- all except one.

> By the way, is there any reason why you're using import rather than a
> <link> tag?:
> 
>   <link rel="stylesheet" type="text/css" href="/style.css" />

I tried this, which produced a PETAL tokenizer error.  PETAL does not bark when
I use the <at> import construct.  Even with the <at> construct, PETAL coughs
when I tryin to reference a style sheet class, like this:
<td CLASS=sidebar> Goodbye </td>  
Here is the error message:
[Fri May  6 09:38:00 2005] [error] [PETAL ERROR] cannot tokenize: <td
CLASS=sidebar> Goodbye  at /usr/lib/perl5/site_perl/5.6.1/MKDoc/XML/Tokenizer.pm
line 89. . Debug info written in /tmp/petal_debug.8605.1115390280.ucwdsnhgwi. at
/usr/lib/perl5/site_perl/5.6.1/Petal.pm line 473.

Any ideas?

Garry

p.s.   Thanks for helping me get untracked.  I was not thinking clearly at all
about the apache config.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.