Skip to content

Instantly share code, notes, and snippets.

Created February 11, 2009 14:02
Show Gist options
  • Save anonymous/62019 to your computer and use it in GitHub Desktop.
Save anonymous/62019 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Add a new entry</title>
<xf:model>
<xf:instance xmlns="" id="data">
<entry xmlns="http://www.w3.org/2005/Atom">
<author>
<name/>
</author>
<published/>
<updated/>
</entry>
</xf:instance>
<xf:bind id="author" nodeset="atom:author/atom:name"/>
<xf:bind id="now" nodeset="//*[name() = 'atom:published' or name() = 'atom:updated']" type="xs:dateTime"/>
<xf:submission id="save" includenamespaceprefixes="" replace="none" method="put">
<xf:resource>/exist/rest/db/nestor/org/marketing/news/results.xml</xf:resource>
</xf:submission>
<xf:setvalue ev:event="xforms-ready" bind="author">Somebody</xf:setvalue>
<xf:setvalue ev:event="xforms-ready" bind="now" value="now()"/>
<xf:send ev:event="xforms-ready" submission="save"/>
</xf:model>
</head>
<body>
<h1>Add a new entry</h1>
<p>
<xf:output bind="author">
<xf:label>Author:</xf:label>
</xf:output>
</p>
<p>
<xf:output bind="now">
<xf:label>Now:</xf:label>
</xf:output>
</p>
<p>
<xf:output ref="atom:published">
<xf:label>Published:</xf:label>
</xf:output>
</p>
<p>
<xf:output ref="atom:updated">
<xf:label>Updated:</xf:label>
</xf:output>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment