<htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:xf="http://www.w3.org/2002/xforms"><head><xf:model><xf:instanceid="selected-values"xmlns=""><instance><pets/><favorite/></instance></xf:instance><xf:instanceid="pets"xmlns=""><root><itemname="Cat"value="cat"/><itemname="Dog"value="dog"/><itemname="Fish"value="fish"/><itemname="Cobra"value="cobra"/></root></xf:instance></xf:model></head><body><xf:selectref="pets"appearance="full"><xf:label>Please list all your pets:</xf:label><xf:itemsetnodeset="instance('pets')/item"><xf:labelref="@name"/><xf:valueref="@value"/></xf:itemset></xf:select><br/><xf:select1ref="favorite"><xf:label>Select your favorite pet:</xf:label><xf:itemset><xf:label/><xf:value/></xf:itemset><xf:itemsetnodeset="instance('pets')/item[@value = tokenize(context()/../pets, '\s+')]"><xf:labelref="@name"/><xf:valueref="@value"/></xf:itemset></xf:select1></body></html>