topical media & game development
professional-xml-23-syntax-binding.xml / xml
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ex="someURI">
<head>
<title>Data binding</title>
<xf:model>
<xf:instance>
<ex:months selected="apr">
<ex:month value="jan">January</ex:month>
<ex:month value="feb">February</ex:month>
<ex:month value="mar">March</ex:month>
<ex:month value="apr">April</ex:month>
<ex:month value="may">May</ex:month>
<ex:month value="jun">June</ex:month>
<ex:month value="jul">July</ex:month>
<ex:month value="aug">August</ex:month>
<ex:month value="sep">September</ex:month>
<ex:month value="oct">October</ex:month>
<ex:month value="nov">November</ex:month>
<ex:month value="dec">December</ex:month>
</ex:months>
</xf:instance>
</xf:model>
</head>
<body>
<p>
<xf:input ref="@selected">
<xf:label>Selected: </xf:label>
</xf:input><br />
<xf:select ref="@selected">
<xf:itemset nodeset="/ex:months/ex:month">
<xf:label ref="." />
<xf:value ref="@value" />
</xf:itemset>
</xf:select>
</p>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.