Skip to content

Commit fff80fd

Browse files
committed
New demo form: "Orbeon Demo: Image Annotation"
1 parent 36efb17 commit fff80fd

File tree

4 files changed

+219
-0
lines changed

4 files changed

+219
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?><xh:html xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:array="http://www.w3.org/2005/xpath-functions/array" xmlns:math="http://www.w3.org/2005/xpath-functions/math" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:exf="http://www.exforms.org/exf/1-0" xmlns:saxon="http://saxon.sf.net/">
2+
<xh:head>
3+
<xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true">
4+
5+
6+
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
7+
<form>
8+
<section-1>
9+
<grid-1><control-1><image filename="cat.jpg" mediatype="image/jpeg" size="56803">/fr/service/persistence/crud/orbeon-features/image-annotation/form/e4e9e23794cb05bb8e6ba5c04f83556a38c733d7.bin</image><annotation>/fr/service/persistence/crud/orbeon-features/image-annotation/form/e4e9e23794cb05bb8e6ba5c04f83556a38c733d7.bin</annotation></control-1><readonly>false</readonly></grid-1>
10+
11+
</section-1>
12+
</form>
13+
</xf:instance>
14+
15+
16+
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
17+
<xf:bind id="section-1-bind" name="section-1" ref="section-1">
18+
<xf:bind id="grid-1-bind" ref="grid-1" name="grid-1"><xf:bind id="control-1-bind" ref="control-1" name="control-1" readonly="$readonly/string() = 'true'"/><xf:bind id="readonly-bind" ref="readonly" name="readonly" type="xf:boolean"/></xf:bind>
19+
20+
</xf:bind>
21+
</xf:bind>
22+
23+
24+
<xf:instance id="fr-form-metadata" xxf:readonly="true" xxf:exclude-result-prefixes="#all">
25+
<metadata>
26+
<application-name>orbeon-features</application-name>
27+
<form-name>image-annotation</form-name>
28+
<title xml:lang="en">Orbeon Demo: Image Annotation</title>
29+
<description xml:lang="en"/>
30+
31+
<library-versions>
32+
33+
</library-versions>
34+
<created-with-version>2024.1-SNAPSHOT PE</created-with-version>
35+
<email><templates><template name="default"><headers/><exclude-from-all-control-values/></template></templates><parameters/></email><updated-with-version>2024.1-SNAPSHOT PE</updated-with-version><migration version="2019.1.0">{"migrations":[{"containerPath":[{"value":"section-1"}],"newGridElem":{"value":"grid-1"},"afterElem":null,"content":[{"value":"control-1"},{"value":"readonly"}],"topLevel":true}]}</migration></metadata>
36+
</xf:instance>
37+
38+
39+
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
40+
<attachments/>
41+
</xf:instance>
42+
43+
44+
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
45+
<resources>
46+
<resource xml:lang="en"><control-1><label>Annotate the image</label><hint/></control-1><readonly><label>Make the annotation form control readonly</label><hint/></readonly>
47+
<section-1>
48+
<label/>
49+
</section-1>
50+
51+
</resource>
52+
</resources>
53+
</xf:instance>
54+
55+
</xf:model>
56+
</xh:head>
57+
<xh:body>
58+
<fr:view>
59+
<fr:body xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:oxf="http://www.orbeon.com/oxf/processors">
60+
<fr:section id="section-1-section" bind="section-1-bind">
61+
<fr:grid id="grid-1-grid" bind="grid-1-bind">
62+
<fr:c y="1" x="1" w="6"><fr:wpaint xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" id="control-1-control" bind="control-1-bind">
63+
<xf:label ref="$form-resources/control-1/label"/>
64+
<xf:hint ref="$form-resources/control-1/hint"/><xf:alert ref="$fr-resources/detail/labels/alert"/>
65+
66+
67+
</fr:wpaint>
68+
69+
</fr:c>
70+
<fr:c y="1" x="7" w="6"/><fr:c x="1" y="2" w="6"><fr:checkbox-input xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" id="readonly-control" bind="readonly-bind">
71+
<xf:label ref="$form-resources/readonly/label"/>
72+
<xf:hint ref="$form-resources/readonly/hint"/><xf:alert ref="$fr-resources/detail/labels/alert"/>
73+
74+
75+
</fr:checkbox-input></fr:c><fr:c x="7" y="2" w="6"/>
76+
</fr:grid>
77+
</fr:section>
78+
</fr:body>
79+
</fr:view>
80+
</xh:body>
81+
</xh:html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
2+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:ev="http://www.w3.org/2001/xml-events"
5+
xmlns:xi="http://www.w3.org/2001/XInclude"
6+
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
7+
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
8+
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
9+
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
10+
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
11+
xmlns:exf="http://www.exforms.org/exf/1-0"
12+
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
13+
xmlns:saxon="http://saxon.sf.net/"
14+
xmlns:sql="http://orbeon.org/oxf/xml/sql"
15+
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
16+
xmlns:fb="http://orbeon.org/oxf/xml/form-builder">
17+
<xh:head>
18+
<xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true">
19+
20+
<!-- Main instance -->
21+
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
22+
<form>
23+
<section-1>
24+
<grid-1>
25+
<control-1>
26+
<image filename="cat.jpg" mediatype="image/jpeg" size="56803">/fr/service/persistence/crud/orbeon/builder/data/3908640e295e7e5dc7088c0d2024d95f87e9fa9d/e4e9e23794cb05bb8e6ba5c04f83556a38c733d7.bin</image>
27+
<annotation>/fr/service/persistence/crud/orbeon/builder/data/3908640e295e7e5dc7088c0d2024d95f87e9fa9d/e4e9e23794cb05bb8e6ba5c04f83556a38c733d7.bin</annotation>
28+
</control-1>
29+
<readonly>false</readonly>
30+
</grid-1>
31+
32+
</section-1>
33+
</form>
34+
</xf:instance>
35+
36+
<!-- Bindings -->
37+
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
38+
<xf:bind id="section-1-bind" name="section-1" ref="section-1">
39+
<xf:bind id="grid-1-bind" ref="grid-1" name="grid-1">
40+
<xf:bind id="control-1-bind" ref="control-1" name="control-1"
41+
readonly="$readonly/string() = 'true'"/>
42+
<xf:bind id="readonly-bind" ref="readonly" name="readonly" type="xf:boolean"/>
43+
</xf:bind>
44+
45+
</xf:bind>
46+
</xf:bind>
47+
48+
<!-- Metadata -->
49+
<xf:instance id="fr-form-metadata" xxf:readonly="true" xxf:exclude-result-prefixes="#all">
50+
<metadata>
51+
<application-name>orbeon-features</application-name>
52+
<form-name>image-annotation</form-name>
53+
<title xml:lang="en">Orbeon Demo: Image Annotation</title>
54+
<description xml:lang="en"/>
55+
56+
<library-versions>
57+
<_>1</_>
58+
<orbeon>1</orbeon>
59+
</library-versions>
60+
<created-with-version>2024.1-SNAPSHOT PE</created-with-version>
61+
<updated-with-version>2024.1-SNAPSHOT PE</updated-with-version>
62+
<email>
63+
<templates>
64+
<template name="default">
65+
<headers/>
66+
<exclude-from-all-control-values/>
67+
</template>
68+
</templates>
69+
<parameters/>
70+
</email>
71+
</metadata>
72+
</xf:instance>
73+
74+
<!-- Attachments -->
75+
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
76+
<attachments/>
77+
</xf:instance>
78+
79+
<!-- All form resources -->
80+
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
81+
<resources>
82+
<resource xml:lang="en">
83+
<control-1>
84+
<label>Annotate the image</label>
85+
<hint/>
86+
</control-1>
87+
<readonly>
88+
<label>Make the annotation form control readonly</label>
89+
<hint/>
90+
</readonly>
91+
<section-1>
92+
<label/>
93+
</section-1>
94+
95+
</resource>
96+
</resources>
97+
</xf:instance>
98+
99+
</xf:model>
100+
</xh:head>
101+
<xh:body>
102+
<fr:view>
103+
<fr:body xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xbl="http://www.w3.org/ns/xbl"
104+
xmlns:oxf="http://www.orbeon.com/oxf/processors">
105+
<fr:section id="section-1-section" bind="section-1-bind">
106+
<fr:grid id="grid-1-grid" bind="grid-1-bind">
107+
<fr:c y="1" x="1" w="6">
108+
<fr:wpaint xmlns:xxbl="http://orbeon.org/oxf/xml/xbl" id="control-1-control"
109+
bind="control-1-bind">
110+
<xf:label ref="$form-resources/control-1/label"/>
111+
<xf:hint ref="$form-resources/control-1/hint"/>
112+
<xf:alert ref="$fr-resources/detail/labels/alert"/>
113+
114+
115+
</fr:wpaint>
116+
117+
</fr:c>
118+
<fr:c y="1" x="7" w="6"/>
119+
<fr:c x="1" y="2" w="6">
120+
<fr:checkbox-input xmlns="http://orbeon.org/oxf/xml/form-builder"
121+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
122+
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
123+
id="readonly-control"
124+
bind="readonly-bind">
125+
<xf:label ref="$form-resources/readonly/label"/>
126+
<xf:hint ref="$form-resources/readonly/hint"/>
127+
<xf:alert ref="$fr-resources/detail/labels/alert"/>
128+
129+
130+
</fr:checkbox-input>
131+
</fr:c>
132+
<fr:c x="7" y="2" w="6"/>
133+
</fr:grid>
134+
</fr:section>
135+
</fr:body>
136+
</fr:view>
137+
</xh:body>
138+
</xh:html>

0 commit comments

Comments
 (0)