Source to test.xml:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<category name="Cold Sandwiches">
<offering>
<price name="Regular" value="5.25" />
<price name="Large" value="6.80" />
<item name="Godfather">
Collo, Mortadella, Genoa, Salami, Ham, Lettuce,
Tomatoes, Onion and Cheese
</item>
<item name="Union">
Turkey, Avocado, Swiss Cheese, Sprouts, Tomatoes, Onion,
Olives and Mayo
</item>
</offering>
</category>
</menu>
 
Source to xml_test.lzx:
<?xml version="1.0" encoding="UTF-8" ?>
<canvas height="300" width="600">
<dataset name="menu">
<menu>
<category name="Cold Sandwiches">
<offering>
<price name="Regular" value="5.25" />
<price name="Large" value="6.80" />
<item name="Godfather">Collo, Mortadella, Genoa, Salami, Ham, Lettuce, Tomatoes, Onion and Cheese</item>
<item name="Union">Turkey, Avocado, Swiss Cheese, Sprouts, Tomatoes, Onion, Olives and Mayo</item>
</offering>
</category>
</menu>
</dataset>
<dataset name="menu2" src="test.xml"></dataset>
<simplelayout axis="x" />
<view datapath="menu:/menu/*" bgcolor="green">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
<view datapath="./*" x="20">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
<view datapath="./*" x="20">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
<view datapath="./*" x="20">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
</view>
</view>
</view>
</view>
<view datapath="menu2:/menu/*" bgcolor="blue">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
<view datapath="./*" x="20">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
<view datapath="./*" x="20">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
<view datapath="./*" x="20">
<simplelayout axis="y" />
<text datapath="name()" />
<text datapath="text()" />
</view>
</view>
</view>
</view>
</canvas>
Output varies with null returned from "text()" when dataset has a "src" attribute.


_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to