【发布时间】:2010-02-17 10:31:28
【问题描述】:
我对这整个网络内容真的很陌生,所以如果我错过了要发布的重要内容,请多多关照。
简短:是否有可能在序列化后更改已处理文件的名称(eXist-DB)?
在我的情况下,对我的 eXist-db 的以下请求:
http://localhost:8080/exist/cocoon/db/caos/test.xml
我想要在序列化之后进行以下操作(xslt 工作正常):
http://localhost:8080/exist/cocoon/db/caos/test.html
我正在使用带有茧的followong sitemap.xmap(希望对此负责)
<map:match pattern="db/caos/**">
<!-- if we have an xpath query -->
<map:match pattern="xpath" type="request-parameter">
<map:generate src="xmldb:exist:///db/caos/{../1}/#{1}"/>
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:parameter name="default.howmany" value="1000"/>
<map:parameter name="default.start" value="1"/>
<map:transform type="filter">
<map:parameter name="element-name" value="result"/>
<map:parameter name="count" value="{howmany}"/>
<map:parameter name="blocknr" value="{start}"/>
</map:transform>
<map:transform src=".snip./webapp/stylesheets/db2html.xsl">
<map:parameter name="block" value="{start}"/>
<map:parameter name="collection" value="{../../1}"/>
</map:transform>
</map:act>
<map:serialize type="html" encoding="UTF-8"/>
</map:match>
<!-- if the whole file will be displayed -->
<map:generate src="xmldb:exist:/db/caos/{1}"/>
<map:transform src="..snip../stylesheets/caos2soac.xsl">
<map:parameter name="collection" value="{1}"/>
</map:transform>
<map:transform type="encodeURL"/>
<map:serialize type="html" encoding="UTF-8"/>
</map:match>
所以我的问题是:在处理完 xml 文件后,如何将test.xml 的扩展名更改为test.html?
背景:我正在从一些 xml-dbs 中生成一些信息,这些信息将显示在 html 中(这是有效的),但我想在生成后稍后更改一些条目html网站。为了使这个舒适,我想使用 Jquery & Jeditable,但代码不适用于 xml 文件。保存生成的 html 不是一种选择。
tia 提供任何建议 [和|或] 帮助
抄送
编辑: 通读一遍后:会不会是扩展名无关紧要,这只是端口 8080 的问题?我很困惑……
【问题讨论】:
标签: xml xml-serialization exists apache-cocoon