[Xsltforms-support] repeat with //*[@attribute]
Brought to you by:
alain-couthures
|
From: christophe g. <chr...@e-...> - 2010-02-04 13:16:46
|
Hi all
just to report on this:
an expression like <xf:repeat nodeset="instance('data')//*[@id]"/> seems to
have some difficulties to be properly evaluated.
<?xml-stylesheet href="xsltForms/db/xsltforms/trunk/build/xsltforms.xsl"
type="text/xsl"?>
<?xsltforms-options debug="yes"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>test repeat with //</title>
<xf:model id="mod">
<xf:instance id="data" xmlns="">
<data>
<task id="1">
<name>1</name>
<task id="2">
<name>2</name>
</task>
</task>
<task id="3">
<name>3</name>
</task>
<task id="4">
<name>4</name>
<task id="5">
<name>5</name>
</task>
</task>
</data>
</xf:instance>
</xf:model>
</head>
<body>
<h1>test repeat </h1>
<div>
<p>working: nodeset="instance('data')//@id"</p>
<xf:repeat nodeset="instance('data')//@id" id="rep">
<xf:output ref="../name"/>
</xf:repeat>
</div>
<div>
<p>not working: nodeset="instance('data')//*[@id]</p>
<xf:repeat nodeset="instance('data')//*[@id]" id="rep2">
<xf:output ref="name"/>
</xf:repeat>
</div>
</body>
</html>
I will continue testing the features of xsltform against my application.
Till now, I must say that I am really happy with this solution - it is
pretty fast and intuitive.
Cheers
C.
|