PDA

View Full Version : Can I constrain a datapath? (V2.0DE)


tspratt
02-26-2004, 10:16 AM
I know I can do it with script, but I would like to be able to use a constraint, like:

<textlistitem
datapath="myDD:/foo[@bar='" + otherNode.value + "']">

Of course, the above doesn't work because of the quotes, but is this possible at all?

Tracy

antun
02-26-2004, 12:08 PM
I just tried this and it worked:


<canvas debug="true">
<dataset name="myds">
<myroot>
<mynode txt="Hi there" />
</myroot>
</dataset>

<view datapath="myds:/myroot/mynode[1]">
<attribute name="attrName" value="txt" type="string" />
<text datapath="$once{'@'+parent.attrName}" />
</view>
</canvas>


-Antun

antun
02-26-2004, 12:26 PM
By the way, I thought this would make a really good Tip 'o the Week:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&postid=2482#post2482

-Antun