📄 install
字号:
INSTALLInstalling mod-xslt is currently a rather maual task.First make sure that the required packages are installed. - libxml2 - libxslt - apache (> 2.0.35)When you have those done, make sure your paths are correct.there are a few presumptions ,made. I work on a Redhat 7.2and used the rpms to install the libraries. Furthermore I choseto install apache under /usr/local/apache which is what the makefileis geared toward. If you chose another location you need to modify the Makefile to reflect that.After all this is done you can just type make install, or if you wantto build yourself type make clean first.mod-xslt is now installed. Now you will have to modify your httpd.confI usually choose to have it filter all xml content, which can be achieved by adding:AddOutputFilterByType xslt text/xmlto the <Directory "/usr/local/apache/htdocs"> section or wherever your webspace is.Optionally you can use a configuration DirectiveXSLTSetStylesheet <mime-type> <url to stylesheet>in a <Directory> directive to se a default Stylesheet to be used for a given MimeTypeBe aware that the URL is still relative to the XML. If you want an absolute URL, specify it as such!!! (Changed just before 1.0.5a)One further Pitfall to be aware of is that Apache assigns the mime-type text/xml to XSL-Files. Therefore with the AddOutputFilterByType from above mod-xslt also parses XSL-Files. This will cause a mess if a default Stylesheet is specified and the Stylesheet resides in that Directory and the Stylesheet is specified using a full url like http://somhost.com/stylesheet.xslA simple solution would be to assign the extension xsl the mime-type text/xsl (which is also valid according to Danny Vellard(Author of libxml/lixslt). If you don't want to do that you can always have your Stylesheets reside in a different directory. If you don't heed this warning, Apache might get caught in a loop. Trying to parse a stylesheet with itsself parsed with itsself...XSLTUnsetStyleSheet <mime-type> is now supported. This way you can clear a stylesheet setting for a subdirectory.After restarting Apache all content of type text/xml will be parsed by mod-xsltYou could also addAddOutputFilter xslt .xmlif you wanted to handle a specific extension, but you need to make surethat the extension is mime-typed text/xml within your mimeconfigHave Funphilipp@dunkel.org
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -