【发布时间】:2014-01-29 08:03:21
【问题描述】:
我有一个 index.html 数据,我通过以下方式包含了模板:
<div xmlns="http://www.w3.org/1999/xhtml" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
在 index html 网站上,我包含了一个关键字搜索表单,其想法是当我单击搜索按钮时,它应该调用一个 .xq 文件来请求搜索结果:
<form method="GET" action="ksearch.xq">
当我提交表单时,ksearch.xq 页面打开,但即使我包含与上面相同的模板 div:
<div xmlns="http://www.w3.org/1999/xhtml" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
ksearch.xq 页面没有应用模板。
似乎当我调用 .xq 文件时没有应用模板,但是当我调用纯 HTML 文件时,应用了模板。
所以问题是如何在 .xq 文件的输出中也使用此模板?
提前致谢。
【问题讨论】:
标签: html templates xquery exist-db