如果我有外国网页地址,如
http://example.com/ex1
http://example.com/ex2
http://example.com/ex3
http://example.com/ex4和实例
<xforms:instance id="temp">
<temp>
<links>
<item>ex1</item>
<item>ex2</item>
<item>ex3</item>
<item>ex4</item>
</links>
</temp>
</xforms:instance>和一个循环
<xforms:group ref="instance('temp')/links">
<xforms:output value="[concat('<a href="http://example.com/',string(item)),'">',string(item),'</a>']">
<xforms:label>Roll</xforms:label>
</xforms:output>
</xforms:group>如何将这种表达式中的链接放在orbeon xform中的value属性中?谢谢。
发布于 2014-02-05 01:53:41
您没有说出您想要实现的目标,但我认为它将输出一系列的<a href="...">。如果是这样的话,以下工作如下:
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms">
<xh:head>
<xf:model>
<xf:instance id="temp">
<temp>
<links>
<item>ex1</item>
<item>ex2</item>
<item>ex3</item>
<item>ex4</item>
</links>
</temp>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<xf:repeat ref="instance('temp')/links/item">
<xh:a href="http://example.com/{.}">Roll</xh:a>
</xf:repeat>
</xh:body>
</xh:html>https://stackoverflow.com/questions/21551473
复制相似问题