sitence
05-05-2009, 06:47 PM
I want to set the text name getting from an xml file or dataset, but I get a Compilation Warning. Can anybody give me suggestions. My code as follow.
<canvas height="500" debug="true" proxied="false">
<dataset name="mybook">
<unit>
<lesson name="s1" text="hello1"/>
<lesson name="s2" text="hello2"/>
<lesson name="s3" text="hello3"/>
</unit>
</dataset>
<view x="400" layout="axis:y">
<text datapath="mybook:/unit/lesson" name="$path{'@name'}" text="$path{'@text'}"/>
</view>
</canvas>
Compilation Warnings
lab.lzx:11:85: The name attribute of this node, "$path{'@name'}", is not a valid javascript identifier
<canvas height="500" debug="true" proxied="false">
<dataset name="mybook">
<unit>
<lesson name="s1" text="hello1"/>
<lesson name="s2" text="hello2"/>
<lesson name="s3" text="hello3"/>
</unit>
</dataset>
<view x="400" layout="axis:y">
<text datapath="mybook:/unit/lesson" name="$path{'@name'}" text="$path{'@text'}"/>
</view>
</canvas>
Compilation Warnings
lab.lzx:11:85: The name attribute of this node, "$path{'@name'}", is not a valid javascript identifier