Re: [Xsltforms-support] inlining repeats with description
Brought to you by:
alain-couthures
From: Ihe O. <ihe...@gm...> - 2013-01-19 19:58:34
|
Solved. I avoided CSS. First let me state the problem more accurately. Instance looks likes <lineItem description="Asset"> <figure year="2005">100</figure> <figure year="2006">200</figure> ...... </lineItem> If we do this below the input box will not be inlined with the and output labels <repeat nodeset="lineItem"> <input ref="@description"><label etc ..../> <repeat nodeset="figure"> <output ref="figure"/> </repeat> </repeat> Do this instead. We make the nodeset of the inner repeat to be the union of lineItem's attributes and elements. Then shift the input box into the inner repeat. If the context does not have a year attribute then it's the description attribute -> display the input control. If it does have a year attribute display the output control. Probably better to have done a node-kind test to distinguish the cases but can't remember off the top of my head what you have to do for XPath 1.0. Code below. <repeat nodeset="lineItem"> <repeat nodeset="@*|*"> <input ref=".[not(@*)] ........ <output ref=".[@year]"/> </repeat> </repeat> On Tue, Jan 15, 2013 at 11:58 PM, Ihe Onwuka <ihe...@gm...> wrote: > I have something like > > <repeat> > <input ref="description"><label etc ..../> > <repeat> > <output ref="yearlyfigure"/> > </repeat> > </repeat> > > Where there are several yearly figures for each description. > > I have inlined the yearly figures but they still print on a different > line to the description. > > Can anyone help with the CSS incantations to achieve my goal. > > thanks > > ihe |