<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
xmlns:xfm="http://www.w3.org/2000/12/xforms">
<head>
<title>Sample XForms Document</title>
<xform xmlns="http://www.w3.org/2000/12/xforms">
<submit id="sub-a" target="http://example.com/app1" />
<submit id="sub-b" target="http://example.com/app2" />
<!-- Define the XForms Model for the opinion poll -->
<model id="poll">
<simple>
<number name="choiceCode" enum="closed">
<value>-1</value>
<value>10</value>
<value>20</value>
<value>30</value>
</number>
</simple>
</model>
<!-- Define the XForms Model for the search -->
<model id="search">
<schema xmlns="http://www.w3.org/2000/10/XMLSchema">
<element name="query">
<complexType>
<attribute name="searchstring" type="string" />
</complexType>
<element>
<schema>
</model>
<!-- pre-initialized instance data for the search form -->
<instance model="search" xmlns="http://example.org/ns">
<query searchstring="Enter your Query Here" />
</instance>
<bind id="Query" ref="instance::search/query/searchstring"/>
</xform>
</head>
<body>
<!-- ... -->
<!-- Site Search Markup -->
<xfm:textbox ref="id('Query')">
<xfm:caption>Search our Web Site<xfm:caption>
<xfm:help>Enter your search term here and hit "Go!"</xfm:help>
</xfm:textbox>
<xfm:submit ref="instance::sitesearch" to="sub-a">
<xfm:caption>Go!</xfm:caption>
</xfm:button>
<!-- ... -->
<!-- Daily Poll Markup -->
<xfm:exclusiveSelect style="list-ui: radio" ref="model::poll/choiceCode">
<xfm:caption>When do you plan to implement XForms?</xfm:caption>
<xfm:item value="-1">Don't know</xfm:item>
<xfm:item value="10">0-6 Months</xfm:item>
<xfm:item value="20">6-12 Months</xfm:item>
<xfm:item value="30">More than 12 Months</xfm:item>
</xfm:exclusiveSelect>
<xfm:submit ref="model::poll" to="sub-b">
<xfm:caption>Submit</xfm:caption>
</xfm:submit>
<!-- ... -->
</body>
</html>
|