[Laszlo-user] XPath/datapath question
Henry Minsky
henry.minsky at gmail.com
Thu Jul 12 14:38:48 PDT 2007
Maybe something like this, with an intermediate view for each item?
<canvas width="100%" height="80%" debug="true">
<debug fontsize="12"/>
<dataset name="maindata">
<maindata>
<item cell1="alpha" cell2="beta" cell3="gamma" />
<item cell1="delta" cell2="epsilon" cell3="zeta" />
</maindata>
</dataset>
<grid datapath="maindata:/maindata">
<view datapath="item[1]/@*">
<gridtext/>
</view>
</grid>
</canvas>
On 7/12/07, Yang <a1pwak602 at sneakemail.com> wrote:
>
> I'd like to do something like the following:
>
> <dataset name="maindata">
> <maindata>
> <item cell1="alpha" cell2="beta" cell3="gamma" />
> <item cell1="delta" cell2="epsilon" cell3="zeta" />
> </maindata>
> </dataset>
> <grid datapath="maindata:/maindata">
> <gridtext datapath="item[1]/@*"/>
> </grid>
>
> However, this doesn't work. $* returns a set of name-value pairs as a
> dictionary object, not an array of values. Is there any way to get
> this to work?
>
> Similarly, the following doesn't work.
>
> <dataset name="maindata">
> <maindata>
> <item>
> <cell1>alpha</cell1>
> <cell2>beta</cell2>
> <cell3>gamma</cell3>
> </item>
> <item>
> <cell1>delta</cell1>
> <cell2>epsilon</cell2>
> <cell3>zeta</cell3>
> </item>
> </maindata>
> </dataset>
> <grid datapath="maindata:/maindata">
> <gridtext datapath="item[1]/*/text()"/>
> </grid>
>
> Thanks for any pointers.
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20070712/0da3c387/attachment.html
More information about the Laszlo-user
mailing list