Skip to content

Instantly share code, notes, and snippets.

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
@avernet
avernet / list-general.coffee
Created May 3, 2011 02:48 — forked from igstan/state-monad.coffee
State Monad in CoffeeScript
#### Monad - common code
# bind takes a step and processor,
# and combines them into a step
# (S t) -> (t -> S u) -> (S u)
bind = (step, processor) -> (container) ->
result = step container
(processor result.value) result.container
@avernet
avernet / xforms-submit-error.log
Created June 29, 2011 07:21
On error, the submission is somehow unable to read the body because of a "Stream closed"
2011-06-28 23:29:10,683 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - dispatchEvent - start dispatching {name: "xforms-submit", id: "run-rule"}
2011-06-28 23:29:10,683 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - dispatchEvent - start default action handler
2011-06-28 23:29:10,683 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - start submission {id: "run-rule"}
2011-06-28 23:29:10,684 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - dispatchEvent - start dispatching {name: "xforms-submit-serialize", id: "run-rule"}
2011-06-28 23:29:10,684 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - dispatchEvent - start default action handler
2011-06-28 23:29:10,684 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - dispatchEvent - end default action handler {time (ms): "0"}
2011-06-28 23:29:10,684 DEBUG org.orbeon.oxf.xforms.processor.XFormsServer - disp
@avernet
avernet / ajax.log
Created August 30, 2011 19:27
Event retargerting on value changed
2011-08-30 12:24:00,166 INFO ProcessorService - /xforms-server - Received request
2011-08-30 12:24:00,173 DEBUG XFormsServer - ajax request {body: "
<xxforms:event-request xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
<xxforms:uuid>4848B25A-6987-8135-F8D6-B463A6F6CFC7</xxforms:uuid>
<xxforms:sequence>2</xxforms:sequence>
<xxforms:action>
<xxforms:event name="xxforms-value-change-with-focus-change" source-control-id="us-section$xf-513$states-control">fRKNPPoeWLw=</xxforms:event>
</xxforms:action>
</xxforms:event-request>"}
2011-08-30 12:24:00,174 DEBUG XFormsServer - start handling external events and/or uploaded files
@avernet
avernet / gist:1243590
Created September 26, 2011 22:28
Updating another data structure when a value changes
<!--
More on this at:
http://stackoverflow.com/questions/7560527/orbeon-xforms-box-select-handle-selection-deselection-example
Copyright (C) 2011 Orbeon, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation; either version
2.1 of the License, or (at your option) any later version.
@avernet
avernet / gist:1254785
Created September 30, 2011 19:48
Using the XForms Test Suite Echo Service
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
<xhtml:title>Using the XForms Test Suite Echo Service</xhtml:title>
<xforms:model>
<xforms:instance id="data">
@avernet
avernet / gist:1254839
Created September 30, 2011 20:09
Using the jsFiddle echo service
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/">
<xhtml:head>
<xhtml:title>Using the jsFiddle Echo Service</xhtml:title>
<xforms:model>
@avernet
avernet / gist:1308302
Created October 24, 2011 03:27
Bind order
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
<xhtml:title>Bind order</xhtml:title>
<xforms:model>
<xforms:instance id="form">
@avernet
avernet / gist:1316955
Created October 26, 2011 16:47
CoffeeScript `v in a` in JavaScript
var __indexOf = Array.prototype.indexOf || function(item) {
for (var i = 0, l = this.length; i < l; i++) {
if (this[i] === item) return i;
}
return -1;
};
__indexOf.call(a, v) >= 0;
@avernet
avernet / gist:1365630
Created November 15, 2011 00:01
Disabling a specific radio button with XForms
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
<xforms:model>
<xforms:instance>
<instance>