English 中文(简体)
xf: 装入
原标题:multiple get parameter with xf:load

I m building a webapplication with eXist as backend. I wanna load a new ressource with the xf:load element.

我所做的就是这个:

<xf:trigger>
  <xf:label>Trigger</xf:label>
    <xf:action ev:event="DOMActivate">
     <xf:load>
       <xf:resource value="concat( start.xql?floor={$floor}&amp;room={$room} ,   )" />
     </xf:load>
    </xf:action>
</xf:trigger>

但当我按下触发器时,这个url是上膛的:

start.xql?floor=0&amp;room=E.01

很明显,这不是我所期望的。当我无法逃脱安珀斯时,我犯了一个错误:

Invalid character in entity name (=) or missing ;

So, what is the correct way to pass multiple parameters via the xf:load element? Can I workaround this problem with the ampersand or am I just missing something?

感谢任何帮助

Kind regards Christian

问题回答

您确定这是发送的 URL 吗?

在一般的 XML 文档中, 必须写入 , 即使它们被用于 URIs 值, 但其字符串值仍然是 , 并且提交请求的软件( 在这种情况下为 XForms 处理器) 不应该混淆...

总之,在 XForms 中处理查询字符串还有另一种方式,您也可以通过 HTTP 获取以查询字符串提交实例。

应该处理好这些安培和"细节"

<xf:trigger>
  <xf:label>Trigger</xf:label>
  <xf:send ev:event="DOMActivate" submission="trigger-submission"/>
</xf:trigger>

当然,假设将正确的价值放在这个例子中。

在更改资源/ @ value 的 XPath 表达式后, 我检查了 XSLTForms, 因为 AVT 实际上不需要..., 而且 XSLTForms 仍然不支持变量 :

<xf:resource value="concat( start.xql?floor= ,floor, &amp;room= ,room)"/>

FireBug网络配置程序指出:

http://localhost/xsltforms/trunk/src/testsuite/misc/start.xql?floor=FL&room=RM

所以,我认为你最好把这个问题 放到你正在使用的 XForms 执行的支持列表上。

-阿兰





相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签