Skip to content

Instantly share code, notes, and snippets.

View ebruchez's full-sized avatar

Erik Bruchez ebruchez

View GitHub Profile
@ebruchez
ebruchez / gist:572933
Created September 10, 2010 01:52
[ #315434 ] Update to top-level repeat control nodeset causes exception if the nodeset refers to a preceding top-level variable
<xh:html 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">
<xh:head>
<xf:model>
<xf:instance>
<values>
<value>1</value>
</values>
@ebruchez
ebruchez / gist:574486
Created September 10, 2010 22:24
[ #315441 ] XPath analysis: button doesn't change state in dialog edit control
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xh:head>
<xf:model xxf:xpath-analysis="true">
<xf:instance>
<text readonly="false">All the world's a stage…</text>
@ebruchez
ebruchez / gist:595868
Created September 24, 2010 19:13
[ #315426 ] Spurious help icon appearing upon control becoming relevant
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xh="http://www.w3.org/1999/xhtml">
<xh:head>
<xf:model>
<xf:instance>
<instance>
<value/>
<show-help>false</show-help>
<help/>
<xbl:binding id="fb-input-email" element="xforms|input">
<metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">Email Address</display-name>
<display-name lang="fr">Adresse email</display-name>
<icon lang="en">
<small-icon>/apps/fr/style/images/silk/email.png</small-icon>
<large-icon>/apps/fr/style/images/silk/email.png</large-icon>
</icon>
<datatype>xforms:email</datatype>
<template>
@ebruchez
ebruchez / gist:600033
Created September 27, 2010 22:59
[ #315504 ] Regression: broken client-side handling of server error
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xh="http://www.w3.org/1999/xhtml">
<xh:head>
<xf:model/>
</xh:head>
<xh:body>
<xf:trigger>
<xf:label>Cause an error</xf:label>
<xf:message ev:event="DOMActivate" value="$foobar"/>
@ebruchez
ebruchez / gist:613816
Created October 6, 2010 18:10
[ #315523 ] XPath analysis: some expression with count() fail
<xh:html xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms">
<xh:head>
<xf:model id="model" xxf:xpath-analysis="true">
<xf:instance id="instance">
<instance/>
</xf:instance>
<xf:bind id="b1" ref="instance()" calculate="a/count(following-sibling::b)"/>
@ebruchez
ebruchez / gist:615693
Created October 7, 2010 19:09
[ #315525 ] XPath analysis: bug with xf:output pointing to complex content
<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">
<xh:head>
<xf:model xxf:xpath-analysis="true">
<xf:instance>
<name>
<first>Teddy</first>
<last>Bear</last>
</name>
@ebruchez
ebruchez / gist:623136
Created October 12, 2010 23:50
XForms without an instance element
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms">
<xh:head>
<xf:model id="model"/>
</xh:head>
<xh:body>
<xf:output value="'Hello!'"/>
</xh:body>
</xh:html>
@ebruchez
ebruchez / gist:623312
Created October 13, 2010 02:25
Example HTML label in XForms
<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">
<xh:head>
<xf:model id="model">
<xf:instance id="instance">
<instance/>
</xf:instance>
</xf:model>
</xh:head>
@ebruchez
ebruchez / gist:623354
Created October 13, 2010 03:07
Simple image upload and output
<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:ev="http://www.w3.org/2001/xml-events">
<xh:head>
<xf:model id="model">
<xf:instance id="instance">
<instance filename="" mediatype=""/>
</xf:instance>
<xf:bind ref="instance()" type="xs:base64Binary"/>