我正在处理一个 Apache Cocoon 项目,我想以 PDF 格式发布 XML 文档。我使用了以下管道:
<map:pipeline id="pdf">
<map:match pattern="pd/*/*/data.pdf">
<map:generate src="PD{1}{2}.xml" type="file"/>
<map:transform src="doc2pdf.xslt" type="xslt"/>
<map:serialize type="fo2pdf"/>
</map:match>
</map:pipeline>
.xslt是从 Apache Cocoon How-Tos 复制而来的。我的 XML 文件包含希腊字符。样品在这里。
这个转换的输出是这样的:
http://localhost:8888/GRLegislation/pd/2011/54 ####### ####### ######### ##µ#####
##### #######µµ###### ########## ### ######## ### ####µ## ##### ### ###
########µ## ### (#### #####) text text/xml gr 2011-05-20 ###### A' 135 2011 ##
(######### ########) 54 2011 ######## ######### true ########## ######µ####
########## ##### true ########## ######µ###, ################## &#########
####### ########## true ########## #####µ##, ######### & ####### #######
######### true ######## ### ##µ######## ########## ### ####### ##### ########
#####