Skip to content

Instantly share code, notes, and snippets.

@avernet
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avernet/21f693dfc7d8fdeda2eb to your computer and use it in GitHub Desktop.
Save avernet/21f693dfc7d8fdeda2eb to your computer and use it in GitHub Desktop.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:saxon="http://saxon.sf.net/">
<head>
<title>Push initial form data to XForms from Java</title>
<xf:model>
<xf:instance id="user-data">
<registration xmlns="">
<first-name />
<last-name />
</registration>
</xf:instance>
<xf:message ev:event="xforms-model-construct-done"
value="xxf:get-request-parameter('my-user-data')" />
<!--<xf:insert ev:event="xforms-model-construct-done"
ref="instance('user-data')"
origin="saxon:parse(xxf:get-request-parameter('my-user-data'))" />-->
</xf:model>
</head>
<body>
<fieldset>
<legend>Registration</legend>
<xf:input ref="first-name">
<xf:label>First name</xf:label>
</xf:input>
<xf:input ref="last-name">
<xf:label>Last name</xf:label>
</xf:input>
</fieldset>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment