Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mod_xslt2 problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
devraj
n00b
n00b


Joined: 11 Mar 2006
Posts: 1

PostPosted: Sat Mar 11, 2006 5:53 am    Post subject: mod_xslt2 problems Reply with quote

I am trying to get mod_xslt working on a Gentoo/Apache2 installation

Tried to follow the mod_xslt2 guide and failed to install the product. I have already got /etc/conf.d/apache2 loading mod_xslt and have added When I refered to the module as mod-xslt in my Apache 2 configuration files I was getting these error mesasges. I refered to the module as mod_xslt and it worked.

[Sat Mar 11 05:36:22 2006] [notice] Apache configured -- resuming normal operations
[Sat Mar 11 05:36:38 2006] [error] an unknown filter was not added: mod-xslt
[Sat Mar 11 05:36:41 2006] [error] an unknown filter was not added: mod-xslt

Well I still don't believe that the module is doing anything for two reasons

1. When I look at the source delivered its still the XML file source, so the browser is doing the transformation
2. I can't add any mod_xslt directives in Apache configuration files

Any similar experiences? Tips tricks?

Devraj
Back to top
View user's profile Send private message
xglad
n00b
n00b


Joined: 13 Aug 2002
Posts: 53
Location: Ft. Lauderdale, FL, USA.

PostPosted: Tue Mar 14, 2006 10:33 pm    Post subject: Reply with quote

It works great for me. I'll post my configs and maybe you can spy an error:

modules.d/25_mod_xslt.conf:
<IfDefine XSLT>
        <IfModule !mod_xslt.c>
                LoadModule mod_xslt    modules/mod_xslt.so
        </IfModule>
</IfDefine>


vhosts.d/a_vhost:
<Location /some/location>
  # other location specific stuff
  AddOutputFilterByType mod_xslt text/xml
  XSLTProcess on
  XSLTCache off
</Location>

I haven't fooled with the cache yet. If you step up the LogLevel to 'debug', the module spews quite a bit of information. If your config seems solid, verify that the module can find and has permission to access the xsl files you are wanting to use.

In my setup, I'm generating the xml dynamically and, depending on request, using the xml-stylesheet directive to select the right xsl file so the above config might not be exactly what you are looking for.
Back to top
View user's profile Send private message
xglad
n00b
n00b


Joined: 13 Aug 2002
Posts: 53
Location: Ft. Lauderdale, FL, USA.

PostPosted: Wed Mar 15, 2006 12:25 am    Post subject: Reply with quote

xglad wrote:
It works great for me. I'll post my configs and maybe you can spy an error:

modules.d/25_mod_xslt.conf:
<IfDefine XSLT>
        <IfModule !mod_xslt.c>
                LoadModule mod_xslt    modules/mod_xslt.so
        </IfModule>
</IfDefine>


vhosts.d/a_vhost:
<Location /some/location>
  # other location specific stuff
  AddOutputFilterByType mod_xslt text/xml
  XSLTProcess on
  XSLTCache off
</Location>

I haven't fooled with the cache yet. If you step up the LogLevel to 'debug', the module spews quite a bit of information. If your config seems solid, verify that the module can find and has permission to access the xsl files you are wanting to use.

In my setup, I'm generating the xml dynamically and, depending on request, using the xml-stylesheet directive to select the right xsl file so the above config might not be exactly what you are looking for.


edit:
eh, xml-stylesheet processing instruction rather.
Back to top
View user's profile Send private message
Havin_it
Veteran
Veteran


Joined: 17 Jul 2005
Posts: 1272
Location: Edinburgh, UK

PostPosted: Wed May 03, 2006 11:59 am    Post subject: Re: mod_xslt2 problems Reply with quote

@devraj, I was getting this problem too:

devraj wrote:

[Sat Mar 11 05:36:38 2006] [error] an unknown filter was not added: mod-xslt


I figured out that this was a typo in the provided config file, /etc/apache2/modules.d/25_mod_xslt.conf. I use the first example (the others are b0rked too though).

Code:
<IfDefine XSLT>
        <IfModule !mod_xslt.c>
                LoadModule mod_xslt    modules/mod_xslt.so
        </IfModule>
</IfDefine>

### EXAMPLE 1: transform all .xml files
###
        <IfModule mod_xslt.c>
                AddOutputFilter mod-xslt .xml
        </IfModule>


As you can see, the module name has an underscore in the LoadModule line (mod_xslt), but the AddOutputFilter line has a hyphen (mod-xslt). Change either one, so they match. This gets rid of the error message, and explains why xglad's different config was unaffected.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum