topical media & game development

talk show tell print

professional-xml-23-syntax-multiplemodels.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:ex="someURI" xmlns:my="someOtherURI">
    <head>
      <title>Hosting multiple models</title>
      <xf:model id="model1">
        <xf:instance>
          <ex:contact>
            <ex:name>Foo deBar</ex:name>
            <ex:title>Consultant</ex:title>
          </ex:contact>
        </xf:instance>
      </xf:model>
      <xf:model id="model2">
        <xf:instance>
          <my:company>
            <my:name>Foobar Ent.</my:name>
          </my:company>
        </xf:instance>
      </xf:model>
    </head>
    <body>
      <h1>Hosting multiple models</h1>
      <xf:input ref="/ex:contact/ex:name" model="model1">
        <xf:label>Name: </xf:label>
      </xf:input><br /><br />
      <xf:input ref="/my:company/my:name" model="model2">
        <xf:label>Company: </xf:label>
      </xf:input>
    </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.