Thanks Lars,
I'd assumed that relevant could be used to do it to a certain extent
but was uncertain. I'm guessing though this won't start recalculation
events all the way down the line so that if
<a> has <b> and b is empty then b won't be output, then a being empty
won't be output either.
Cheers,
Bryan Rasmussen
On 3/23/07, Lars Oppermann <[EMAIL PROTECTED]> wrote:
Hi Bryan,
I think this can be done (up to a certain point) through the
xforms:relevant MIP. I have attached a test document that demonstrates
the basic approach:
The structure of the instance is like this:
<root>
<e1>
<sub></sub>
</e1>
<e2>
<sub></sub>
</e2>
</root>
There is a binding that binds to every child of the root-element, that
says that the node is only relevant if the text content of the element's
"sub"-child is non-empty:
<xf:bind nodeset="/root/*" relevant="string-length(./sub)>0"/>
Now, if only the second "sub"-element has text content (aaa) the
following XML is submitted:
[d:\]type sub2.xml
<?xml version="1.0"?>
<root><e2><sub>aaa</sub></e2></root>
Note that e1 is not submitted, because it got marked with relevant=false.
Cheers,
Lars
bryan rasmussen wrote:
> Hi,
>
> I've asked this before and haven't heard a response yet. In an Xform
> running in Open Office how do I stop output of elements that are
> empty? This should basically stop output of all elements where none of
> the descendant elements have input as well as stopping the more
> prosaic output of empty elements
>
>
> Cheers,
> Bryan Rasmussen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]