Skip to content

Instantly share code, notes, and snippets.

@avernet
avernet / form.xml
Last active August 29, 2015 14:06
Test form for flat view
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
@avernet
avernet / form.xml
Created September 12, 2014 22:31
Test case for login and other fields autofill
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="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">
<xh:head>
<xf:model>
<xf:instance>
<person>
@avernet
avernet / country-selector.xbl
Created November 13, 2014 23:29
Very simple example XBL control for Orbeon Forms
<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:my="http://www.example.com/"
xmlns:saxon="http://saxon.sf.net/"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl">
<property as="xs:string" name="oxf.fr.detail.process.send.*.*">
require-uploads
then validate-all
then send(uri = "http://validate")
then success-message(message = "Everything good")
recover error-message(message = "Data invalid")
</property>
@avernet
avernet / form-defining-the-values.xml
Last active August 29, 2015 14:09
Sample for "dropdown from form control"
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
[INFO] Source code injection finished
[INFO] ------------------------------------------------------------------------
Buildfile: /media/ephemeral1/builder/ant/builds/build-458358110881756906/orbeon-forms/build.xml
BUILD FAILED
java.lang.IllegalStateException: java.net.ConnectException: Connection refused
at com.codenvy.ide.ant.tools.AntBuildListener.connect(AntBuildListener.java:41)
at com.codenvy.ide.ant.tools.AntBuildListener.buildStarted(AntBuildListener.java:66)
at org.apache.tools.ant.Project.fireBuildStarted(Project.java:2071)
at org.apache.tools.ant.Main.runBuild(Main.java:795)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
@avernet
avernet / gist:210a20bc3c704465706d
Created January 27, 2015 18:50
Properties to make internal requests go "over the wire", through Charles on port 8888
<property as="xs:string" name="oxf.http.internal-paths" value=""/>
<property as="xs:string" name="oxf.http.proxy.host" value="localhost"/>
<property as="xs:integer" name="oxf.http.proxy.port" value="8888"/>
@avernet
avernet / gist:6fe0fead6ac77e980a76
Created January 30, 2015 02:32
Dropdown with values from repeat
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"