Skip to content

Instantly share code, notes, and snippets.

View orbeon's full-sized avatar

Orbeon orbeon

View GitHub Profile
@orbeon
orbeon / Orbeon Bookshelf metadata.xml
Last active August 29, 2015 14:05
Example of form metadata produced by Orbeon Form 4.7 `send`
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<control for="49364616e2e4f1ae09b3d708b8f6800720fd33a8" name="details" type="section">
<resources lang="en">
<label>Book Details</label>
<help>This section contains details about the book.</help>
</resources>
<resources lang="fr">
<label>Détails du livre</label>
<help>Cette section contient les détails du livre.</help>
@orbeon
orbeon / gist:5d592bfa4640569b116f
Last active August 29, 2015 14:11
Test of repeated fr:grid component
<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:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xh:head>
<xf:model>
<xf:instance id="new">
<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/"
<!DOCTYPE html>
<html>
<head>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
#hidden-input { visibility: hidden }
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.js"></script>
<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script type="text/javascript">
<html xmlns="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:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<head>
<xforms:model>
<xforms:instance><value/></xforms:instance>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head>
<xforms:model id="model1">
<xforms:instance xmlns="">
<employees>
<employee>Joe</employee>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head>
<xforms:model id="model1">
<xforms:instance xmlns="">
<employee>Joe</employee>
</xforms:instance>
xquery version "1.0";
declare namespace text="http://exist-db.org/xquery/text";
let $count := count(for $resource in collection() let $resource-uri := document-uri($resource)
where (text:match-any($resource, 'gaga'))
return 1)
return
<foobar/>
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xhtml:head>
<xforms:model>
<xforms:instance id="instance">
<leased>true</leased>
</xforms:instance>
@orbeon
orbeon / form.xhtml
Created June 15, 2010 02:27
Super simple example of a dynamic dropdown with values ranging from 1 to a configurable maximum
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events">
<xh:head>
<xf:model>
<xf:instance id="instance">
<form>
<value>1</value>
<max>9</max>