thegladio
10-27-2004, 02:31 AM
I must be doing something really stupid but I cannot for the life of me figure out why the following code does not work the way I would like it to.
<canvas>
<combobox defaulttext="Choose One...">
<textlistitem
datapath="myData:/myXML/person[show = 'simpsons']"
text="$path{'firstName/text()'}"
value="$path{'lastName/text()'}" />
</combobox>
<dataset name="myData">
<myXML>
<person>
<firstName>Homer</firstName>
<lastName>Simpson</lastName>
<show>simpsons</show>
</person>
<person>
<firstName>Marge</firstName>
<lastName>Simpson</lastName>
<show>simpsons</show>
</person>
<person>
<firstName>Vinny</firstName>
<lastName>Barbarino</lastName>
<show>Welcome Back, Kotter!</show>
</person>
</myXML>
</dataset>
</canvas>
Obviously, the combox box should only display two entries not three. What am I doing wrong? Is this not legal XPath?
<canvas>
<combobox defaulttext="Choose One...">
<textlistitem
datapath="myData:/myXML/person[show = 'simpsons']"
text="$path{'firstName/text()'}"
value="$path{'lastName/text()'}" />
</combobox>
<dataset name="myData">
<myXML>
<person>
<firstName>Homer</firstName>
<lastName>Simpson</lastName>
<show>simpsons</show>
</person>
<person>
<firstName>Marge</firstName>
<lastName>Simpson</lastName>
<show>simpsons</show>
</person>
<person>
<firstName>Vinny</firstName>
<lastName>Barbarino</lastName>
<show>Welcome Back, Kotter!</show>
</person>
</myXML>
</dataset>
</canvas>
Obviously, the combox box should only display two entries not three. What am I doing wrong? Is this not legal XPath?