【发布时间】:2014-07-01 11:20:43
【问题描述】:
我在调试 xhtml 文件中的 xform 时遇到问题。以前它可以工作,但现在我在 xf:model 的命名空间中更改了一些内容,现在当我按下提交按钮时它什么也没做。我将举一个简单的例子,以便您更好地理解我的问题,但请记住,我正在处理一个包含 400 多行的 xhtml 文件,而且我一直在浪费时间(上周几乎 40 小时)逐行调试,反复试验以找出我的表单出了什么问题。
<html namespaces come here>
<head>
<title>Example</title>
<xf:model schema="foobar.xsd">
<xf:instance>
<Persons xmlns="">
<name></name>
</Persons>
<xf:/instance>
</xf:model>
<xf:bind id=name nodeset="/Person/aluno" type="xs:string"/>
<xf:submission id="submit" action="http://localhost:8080/exist/rest/db/apps/foo/bar.xquery" method="post"/>
</head>
<body>
<h1>Type the name of the Person</h1>
<xf:input bind="name">
<xf:label>
<b>Name:</b>
</xf:label>
</xf:input>
<xf:submit submission="submit">
<xf:label>SUBMIT</xf:label>
</xf:submit>
</body>
</html>
好的,这是一个简单的例子(它可能有一些错误,没关系),但想象一下,每次我按 SUBMIT 时它什么也没做。 我怎样才能找到导致错误的原因?
【问题讨论】:
-
我的意思是,有什么调试工具可以用吗?
-
您是使用 BetterFORM 还是 XSLTForms 作为 XForms 引擎???
-
@loveMeansNothing 哈哈,这真的让我发笑:) 我确信 Alain 想知道您使用的是这两个引擎中的哪个 XForm 引擎。但我不得不说,严格来说你的答案是正确的:-)
-
@dirkk 感谢您指出这一点,我真的很累 LOL
-
@Alain Couthures 我正在使用 BetterFORM
标签: xml xhtml xquery xforms exist-db