是一个XML web发布系统
分离了context,style,logic和managementpseudo protocol
"cocoon:" is a pseudo protocol and refers to another pipeline. "cocoon:/" refers to a pipeline from the current sitemap while "cocoon://" refers to a pipeline from the root sitemap.
"context:" is another pseudo protocol, "context://" is refering to a resource using the servlet context.
"resource:" is yet another pseudo protocol, "resource://" is refering to a resource from the context classloader.
An XSP(eXtensible Server Pages) page is used by a generator to generate XML document. 在work的cocoon-files/org/apache/cocoon/www/目录中可以找到xsp生成的java文件. XSP中的逻辑单相当与jsp的tag,逻辑单是通过使用 XSLT 转换实现的XSLT 转换将 Java 代码添加到 XSP 文档来创建所期望的功能。
xsp的几种形式
Sitemap文件包括: matchers,generators,transformers,readers,serializers,selectors,pipelines
A Matcher attempts to match an URI with a specified pattern for dispatching the request to a specific processing pipeline.
Forrest是在cocoon基础上开发的Xml发布系统,基本使用的看它的RELEASE文件
webapp的目录结构
context -内容
xdocs/site.xml --网站的information content
xdocs/tabs.xml--网站的主菜单项目
resources --资源,包括图像,dtd,。。。
skins--界面
WEB—INF--web配置
samples/faq.html文件的处理过程
-
在sitemap.xmap中配备**/*.html
-
用map:aggregate生成一个xml文件.
-
最后用site2xhtml来生成整个page,用skinconf.xml来做变量. site2xhtml.xsl is the final stage in HTML page production. It merges HTML from document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,footer, searchbar, css etc. As input, it takes XML of the form
所以forrest把一个page分成了4个部分。tab,menu,context和全局的一些配置
linkrewriter有什么用, 用xdoc/site.xml来生成linker Rewrites links, e.g. transforming href="site:index" to href="../index.html"
![]() | 重要 |
---|---|
如何解决查找dtd文件的问题, 把forrest中的catalog.xcat文件copy 过来,在上面加就可以了 |
把xml转换成utf-8后,文件的比较就比较麻烦了!!!