deliverance/xslt编译器的服务器

dv.xdvserver的Python项目详细描述


XDV已重命名为Diazo等价的wsgi中间件是diazo包的一部分。有关详细信息,请访问Diazo websiteDiazo PyPI page

简介

xdvserver是一个简单的WSGI中间件,它可以执行两个 分步编译并运行xdv的xslt转换。

它需要两个必需的参数:

  • rules: a path to a file containing Deliverance rules
  • theme: a URI or path to a theme HTML file

此外,它还可以使用几个可选参数:

  • absolute_prefix: if given, relative urls in the theme file will be made
    into absolute links with this prefix.
  • notheme: a set of regular expression patterns (or just simple names) that
    will be matched against the incoming path to allow the theme to be switched off for some paths. Multiple patterns should be separated by newlines.
  • live: set to True to recompile the theme on each request, rather than on
    startup only.
  • compiler: a path to the XSLT file that can turn theme+rules into a compiled
    theme. The default, bundled version will probably suffice in most cases.
  • boilerplate: a path to the XSLT file that contains boilerplate XSLT
    instructions. The default, bundled version will probably suffice in most cases.

配置

您可以在粘贴部署管道中使用此中间件。下面是一个例子 在其上运行plone站点的应用程序的配置文件 http://localhost:8080/demo静态资源从/静态:

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 5000

[composite:main]
use = egg:Paste#urlmap
/static = static
/ = default

[app:static]
use = egg:Paste#static
document_root = %(here)s/static

[pipeline:default]
pipeline = egg:Paste#cgitb
           egg:Paste#httpexceptions
           theme.default
           zope.proxy

[filter:theme.default]
use = egg:dv.xdvserver#xdv
theme = %(here)s/static/index.html
rules = %(here)s/static/rules/default.xml
notheme =
    /emptypage

[app:zope.proxy]
use = egg:Paste#proxy
address = http://localhost:8080/VirtualHostBase/http/localhost:5000/demo/VirtualHostRoot/

更改日志

1.0b8-2010年8月22日

  • 使用lxml.html.tostring而不是lxml.tostring输出到 避免使用空标记,如<;script/>;,这会混淆浏览器 [汤姆斯特]

1.0b7-2010年8月19日

  • 使用lxml进行web解析。 [埃尔罗]
  • 删除xdvcompiler.py(现在在xdv中) [埃尔罗]
  • 应用Lukas Zdych的补丁修复绝对前缀。 [选项]
  • 通过规则文件的web解析添加。 [马歇尔·斯科西奥]

1.0b6-2009年10月27日

  • 更新的xdv编译器 [欠]

1.0b5-2009年10月12日

  • 重新获得BSD许可。 [选项]
  • 添加了对extrauri参数的支持。 [马托斯霍拉]

1.0b4-2009年3月30日

  • 将“theme-uri”参数重命名为“theme”,因为它还允许 文件名。 [选项]
  • 添加了对通过“notheme”选项声明一些非限定URL的支持, 基于模式修补。 [选项]
  • 修复了与windows相关的各种错误。 [选项]

1.0b3-2009-03-26

  • 我们现在允许本地文件路径作为主题uri,并让compiler.xsl选择 默认情况下,它自己的boilerplate.xsl(如果没有给出)。 [选项]

1.0b2-2009-02-25

  • 添加了用于脱机编译主题的控制台脚本 [选项]

1.0b1-2009-02-24

  • 初始版本

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
通过signingReport运行安卓应用程序时发生java错误   java我需要实现hashCode()和equals()方法吗?   javascript Selenium Java从Pinterest下载图像   java Tomcat(嵌入式),无需重新启动即可进行更改   java检查每个if是否有匹配的endif   的java接口。我也是。罐子   mysql java。sql。SQLException:列索引超出范围,0<1。使用准备好的语句   如何在java中修改json字符串?   javascript智能手机的独特功能   web服务java。lang.NoSuchMethodError:javax。ws。rs.core。响应$Status$Family   sockets通过浏览器/URL与ServerSocket建立Java连接   JavaSpring数据自定义存储库和接口隔离原则   swing从不同的java类访问jdialog的一个实例   java如何根据发出的事件有条件地缓冲分组的可观察/流量?   用java将电子邮件正文导出为html文件   JavaSpring获取ServletContext并将其作为Bean提供   setter不做java中应该做的事情