This property should usually be turned off in deployment, as line number handling with XSLT currently has a noticeable impact on performance.
Changes in Version 3.6
1. Introduction
Welcome to Orbeon Forms 3.6!
Orbeon Forms 3.6 features over 170 improvements since Orbeon Forms 3.5.1, including major improvements in the areas of state handling, XML Schema validation, error handling, deployment within Java applications, and performance.
This document describes changes made between Orbeon Forms 3.5.1 and Orbeon Forms 3.6.
2. Changes in Version 3.6
Orbeon Forms 3.6 is an update to Orbeon Forms 3.5.1.
2.1. Noteworthy Changes
-
The XForms engine features a disk-based state store. Before this version, when using
session
state handling, XForm state information was stored in the user's session. Because the size of the session information was limited, state information could expire and cause certain XForms pages to no longer function when too much memory was used.Orbeon Forms now implements a disk-based state store, which allows state information to be stored on disk when the memory state store becomes too large. You enable this state store with the new
server
configuration value for theoxf.xforms.state-handling
property. This is now the default state handling configuration, and when migrating to this version or Orbeon Forms we recommend that you update your properties with the following:<!-- Store state on the server --><property as="xs:string" name="oxf.xforms.state-handling" value="server"/>The memory state store is now global and shared among all users and pages. Its size is configured with the following property:
<!-- Allow a maximum of 20 MB of state information among all users --><property as="xs:integer" name="oxf.xforms.store.application.size" value="20000000"/>For more information about configuration, see State Handling.
-
Bindings support types imported from XML Schemas. In previous versions, only built-in types such as
xs:integer
,xs:date
, etc. were supported on thetype
attribute of<xforms:bind>
element. In this version, simple types declared in an imported XML Schema can be used. For example, assume the following schema declaring a type calledmy:state
:<xs:schema targetNamespace="http://orbeon.org/oxf/examples/my" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:my="http://orbeon.org/oxf/examples/my"><xs:simpleType name="state"><xs:restriction base="xs:string"><xs:enumeration value="AL"/><xs:enumeration value="AK"/><xs:enumeration value="AZ"/>...<xs:enumeration value="GU"/><xs:enumeration value="MP"/><xs:enumeration value="PR"/></xs:restriction></xs:simpleType></xs:schema>You use
<xforms:bind>
to assign this type as follows:<xforms:bind nodeset="address/state" type="my:state"/>Note that with XForms 1.1, the
type
attribute only supports simple types, or complex types with simple content. Orbeon Forms only support simple types at the moment.See issue #306753.
-
Improved XML Schema validation. In previous versions, XML Schema validation always followed a strict mode where all instances had to be strictly valid as per imported schema definitions. In particular, this meant that if you imported a schema, the top-level element of an instance had to have a valid schema definition or the instance would be entirely invalid.
In this version, Orbeon Forms implements a "lax" validation mode by default, where only elements that have definitions in the imported schemas are validated. Other elements are not considered for validation. This is in line with XML Schema and XSLT 2.0 lax validation modes.
In addition, the author can specify the validation mode directly on each instance with the extension
xxforms:validation
attribute, which takes valueslax
(the default),strict
(the root element has to have a definition in the schema and must be valid), orskip
(no validation at all for that instance).Nodes validated through a schema now receive datatype annotations, which means that if an element or attribute is validated against
xs:date
in a schema, an XForms control bound to that node will display a date picker. Previously, you had to bind the type with a binding even if you used a schema:<xforms:bind nodeset="..." type="xs:date"/>This is now no longer necessary if you use a schema. Of course if you don't use a schema, or if you want to perform validation in addition to what is picked-up by a schema, then using
<xforms:bind>
is still the correct way of binding types. -
Support for XForms 1.1 types allowing empty content. Several built-in XML Schema data types, such as
xs:date
, do not consider an empty string as a valid value. This makes it difficult, for example, to specify the type "optional date" in XForms. With XForms 1.1, every built-in data type has a counterpart in thexforms
namespace, which adds the empty string as a valid value. These types are now supported in Orbeon Forms. For example, you denote an optional date in an instance with:<xforms:bind nodeset="..." type="xforms:date"/>See issue #307162.
-
Memory usage improvements. The way XForms Model Item Properties (MIPs) are implemented has changed since Orbeon Forms 3.5.1. A memory profiler has revealed that a very large number of objects related to MIPs were created. The implementation has been modified to drastically reduce the number of such objects, with an expected benefit of reduced memory usage and less garbage collection time.
Thanks to Adrian Baker and to CSC for their work and support regarding this issue.
See issue #307388.
-
Help displayed as separate help panel. Orbeon Forms now displays help messages (defined with
xforms:help
) in a separate help panel:The help panel appears when the user selects a help icon. It stays open until closed by the user, and can be moved around the page. See the XForms Reference for more information.
-
Hints displayed as tooltips. Orbeon Forms now displays control hints (defined with
xforms:hint
) as tooltips:Hints appear when you mouse over a field, and disappear after a while. See the XForms Reference for more information.
-
Better display of JavaScript and Ajax errors. Orbeon Forms now displays JavaScript and Ajax errors in a user-friendly error dialog:
An initially collapsed section containing details of the error useful to the developer:
See issue #307198. Also visit the updated error page and error dialog documentation.
-
Improved XForms error location information. What's more frustrating during form development than seeing cryptic errors and not being able to find out what exact line of code caused the problem? Orbeon Forms now supports much enhanced file name and line number reporting in XForms. In many cases, error messages now indicate an exact file name and line number, along with a better call stack:
Note that this currently requires setting the following property in
properties.xml
:<property as="xs:boolean" processor-name="oxf:saxon8" name="generate-source-location" value="true"/>NoteSee issue #306558.
-
Support for deployment as separate WAR. Orbeon Forms can now be deployed as a Java web application archive (WAR) separate from your Java application. This is most useful when you want to produce XForms using Java technology (whether using JSP, Java Servlets, or other frameworks).
Using XForms with your Java applications was already possible in the past, but you had to either copy over all the Orbeon Forms JAR files and configuration files into your application, or the other way around. The new deployment method allows you to deploy Orbeon Forms separately. You just need to include a very small Orbeon Forms JAR file in your application (
ops-xforms-filter.jar
), and to add a short configuration for a filter to yourweb.xml
.Separate deployment has several benefits including:
-
Easier upgrades of both your application and Orbeon Forms.
-
Preventing situations where different versions of JAR files could conflict.
-
Cleaner application architecture.
See Using the Orbeon Forms XForms Engine with Java Applications for more information.
Thanks to Adrian Baker and Leigh Klotz for their input.
-
-
Improved support for built-in JSP deployment. Deploying JavaServer Pages (JSP) directly into Orbeon Forms is now better documented and uses the same mechanism used when deploying Orbeon Forms as a separate WAR. In addition, using
setContentType()
at the beginning of JSP files is no longer necessary.See Using the Orbeon Forms XForms Engine with Java Applications for more information.
-
Support for boolean type in input fields. Previously,
<xforms:input>
controls bound to nodes of typexs:boolean
would display a regular input field. The control now shows a checkbox allowing to better select a boolean value. See issue #306628. -
Support for
<xforms:group>
around<xhtml:tr>
. This didn't work reliably in previous versions. This in particular allows controlling the visibility of table rows using<xforms:group>
, for example:<xhtml:table><xhtml:tr><xhtml:th>Name</xhtml:th></xhtml:tr><xforms:group ref="person[address/state = 'CA']"><xhtml:tr><xhtml:td><xforms:output ref="name"/></xhtml:td></xhtml:tr></xforms:group></xhtml:table>Note that whether XForms implementations should support XForms elements around table rows and cells is a matter of debate, but Orbeon Forms already supports
<xforms:repeat>
around table rows for the convenience of form authors, and supporting groups is a matter of consistency.See issue #306259.
-
Support for optimization hint on selection controls. The new
xxforms:refresh-items
attribute on selection controls allows for performance improvements in certain cases. See Controlling Item Sets Refreshes with xxforms:refresh-items.See issue #307152.
-
Firebug Lite ships with Orbeon Forms. If you wish to debug JavaScript with Firebug Lite, you don't need anymore to include your own copy of Firebug Lite. Instead you can use the one that comes by default with Orbeon Forms.
2.2. Complete List of Issues Addressed in this Release
Orbeon Forms 3.6 addresses over 170 bugs and features:
- #307983: Regression: read-only date fields show date picker icon
- #307948: xforms:date type doesn't apply to newly inserted repeat items
- #307917: Instance replaced flag is not correctly restored from dynamic state
- #307913: Use "orbeon" as project name instead of "ops"
- #307915: Servlet initialization and destruction listeners must be commented out by default
- #307767: RFE: Make unit tests for persistent XForms state store
- #307867: Activating an HTML link containing an xforms:output may cause later browser back to fail
- #307810: Form field values are sometimes not sent to the Ajax server
- #305901: xforms:help does innerHTML instead of handling the content as text
- #307455: Logout example: still shows the page as if logged in after logging out
- #306794: XPL, XQuery, XSLT, XPath and XUpdate sandboxes don't show results anymore
- #307831: Google Suggests example doesn't work anymore
- #307821: Combined JavaScript and CSS files should include an Orbeon Forms version number
- #307812: Two submissions with replace="all" in a row throw an exception
- #307811: "There is already an active submission." error when going back and forth quickly
- #307803: Submitting an instance with bound upload controls doesn't work upon xforms-ready
- #307701: Issue with adjacent itemsets
- #307454: Inspector does not show initial XML (in some cases)
- #307579: Label is not hidden when repeat iteration is added
- #307777: RFE: Client error dialog should provide a link to reload the page
- #307744: Error when using browser back button when using xforms:instance[@src = 'input:*']
- #307770: Control hints should display as tooltips
- #307766: Make xforms:select work in non-destructive mode
- #307691: RFE: Implement persistent XForms state store
- #307748: Upgrade log4j to latest 1.2
- #307745: Cookies and authorization credentials may be sent across different page invocations
- #307718: YUI connection: do not catch exception and do nothing
- #307719: JS error in IE when canceling navigation away from current page
- #307717: JavaScript error: element.hasAttribute is not a function
- #307715: NPE upon submission with upload when no session is available
- #307707: Instance replacement upon xforms-ready causes type="xs:date" bind to malfunction
- #307690: xforms:output must require @ref or @value
- #307674: Regression: Instance submission with upload no longer dispatches xforms-submit-done
- #307644: NPE when dispatching event with xforms:dispatch to invalid target ID
- #307612: HTML help does not update correctly upon Ajax response
- #307608: oxf:pdf-template processor outputs malformed XML document
- #307607: RFE: oxf:pdf-template does not support XSLT date and time formatting functions
- #307604: Ajax retry code causes duplicate submission and JavaScript error
- #307599: Reduce contention in DatabaseContext
- #306446: xforms:group/@appearance="xxforms:fieldset" must support change of label value
- #307556: Type of node a group is bound to (date) is incorrectly used for child controls of the group bound to nodes that are not of that type
- #307524: XForms upload control does not become read-only when the read-only MIP is changed after the page loads
- #306668: RFE: Instance Inspector should have XPath evaluator
- #307503: RFE: Retry mechanism for Ajax queries
- #307470: RFE: Optimize Ajax response to not include default attribute values
- #307483: Turning off the XForms document cache causes invalid controls updates when relevance changes
- #307482: Submission with replace="all" and xxforms:target causes source form to behave incorrectly
- #306625: RFE: Support target window on xf:submission/@replace="all"
- #307474: HTML and XHTML serialization in epilogue should have zero indent level to reduce document size
- #307446: JavaScript exception when using innerHTML with non-escaped markup with XHTML in Firefox
- #307472: RFE: Connection pooling for HTTP connections
- #307439: Rewrite does not change applet/@archive
- #307442: Government Forms example summary initially shows repeat index value of 0
- #307434: Optimize refresh upon instance replacement
- #307407: xforms-value-changes called more times than expected
- #307431: Avoid dom4j conversion when using JTidy used by xforms:output
- #305588: RFE: Support instance/src="input:data"
- #307425: SAXStore keeps references to Locator, causing memory leaks
- #306695: XPathCache.getXPathExpression doesn't cache across requests
- #307424: XFormsFunctionLibrary leaks by keeping references to XFormsModel and XFormsControls objects
- #307367: Deployment in Liferay 4.3.0 is broken
- #307416: java.lang.ClassCastException: ElementImpl cannot be cast to NodeWrapper
- #307403: Non-relevant group label is initially visible
- #307401: Regression: XInclude processor no longer caches
- #307384: SOAPAction HTTP header is not set
- #307355: RFE: dispatchEvent to provide additional attribute ignoreErrors
- #307363: neighbor attribute should be on xxforms:show
- #307390: RFE: Government Forms example needs button to discard changes and go back to summary
- #307389: Date input should use img instead of label to work around background image IE bug
- #307388: Lazily create MIP information
- #307386: Special characters are not supported in submission authentication
- #307380: xforms:group generates HTML markup for a label even if no child xforms:label is present
- #307377: Cursor not visible in input fields
- #307356: Image in label set on file upload shown as escaped text
- #307361: Submission must perform rebuild/recalculate before submitting if needed
- #307358: Update to HSQLDB version 1.8.0.7
- #307354: Incorrect current value of repeat index when clicking on external trigger
- #307255: "Error while processing response" appears when you follow a link and Ajax requests are being processed
- #307281: RFE: Solution to fire MIP events upon initialization
- #307336: The first click on an item in a list does not send an xforms-value-changed to the server
- #306597: Client doesn't support updates to hierarchical itemsets
- #307327: Remove obsolete Struts configuration files from WEB-INF
- #307331: ClassCastException in submission with redirection
- #307330: Error when closing orange error dialog when there is only one form on the page
- #307231: Document error.xsl configuration
- #307283: RFE: Upgrade to Xerces 2.9
- #307268: position() within repeat: works with output value="..., but not in ref="..."
- #307261: XPath expression not evaluated in the correct context?
- #307267: Government Forms detail: switching language no longer switches birth date format
- #307252: Add section about support (mailing-list, commercial) in FAQ
- #307240: DMV form's zip code definition is incorrect
- #307238: Mediatype text/html does not process HTML iframe element
- #306498: Some CSS files are duplicated between resources and ops-resources-public.jar
- #307237: URL rewriting does not rewrite attributes of xhtml:object
- #307236: Missing or incorrect location data when certain errors occur within xforms:repeat
- #307232: Inaccurate description of how to customize the jscalendar
- #307229: Required but empty selection controls are not properly styled
- #307227: Regression: MIPs are lost upon submission
- #304746: Default date formatting improvements
- #306558: RFE: Improve error location information
- #307224: RFE: Application shared instances should have expiration option
- #307198: Errors occurring during Ajax requests must also indicate location data and stack trace
- #306408: XSLT errors no longer show in stack traces
- #307210: Move current error.xpl to private resources
- #307056: Session cache stores too much information and causes early expiration of entries
- #307209: Incorrect request id returned to client upon back/reload
- #307208: Document cache not used in client state mode
- #307207: Control with xxforms:refresh-items="false" doesn't show correct items when becoming relevant
- #307025: XForms controls: "add carrier" has no effect with client-side event handling
- #307202: Should restore authentication example
- #307201: RFE: oxf:request-security should provide access to the user principal when available
- #307191: Error page no longer shows XML elements
- #307165: RFE: Implement "Human Readable Resource Identifiers"
- #307176: Upgrade to FOP 0.93
- #307174: Error: Pipeline input "forms" is not connected, while the input is indeed connected
- #307007: Fix back how client obtains server name
- #307162: RFE: Support XForms 1.1 datypes to allow empty content
- #307161: Disable verbose logging of eXist storage access
- #307160: Rename theme-portal.xsl to theme-examples.xsl
- #307159: Schemas for XPL must support foreign attributes
- #306570: Evaluation of XPath expressions in repeat returns incorrect result
- #306421: Non-required blank date does not appear invalid
- #304934: Incorrect validation when using xsi:type on root element
- #305063: xs:date bound through schema doesn't cause date picker to display
- #304152: Schema validation should be checked against spec
- #306010: Schema validation doesn't check if a schema definition is "applicable"
- #307153: XML Schema validation must support complex types with simple content
- #307152: RFE: Support constant itemsets for xforms:select1 and xforms:select
- #307151: Split XForms reference documentation into two pages
- #307140: Implement lax XML Schema validation
- #307141: RFE: Support user-controlled "lax", "strict" and "skip" validation
- #306628: RFE: Support xforms:input bound to xs:boolean value
- #307108: Migrate to recent MSV library
- #306753: type MIP must support types defined in imported XML schemas
- #307089: PDF Template processor must not require config input
- #307093: p:choose should use TinyTree, not dom4j, in order to consume less memory and run faster
- #307087: Handle case where the initial value for the select1 tree is empty
- #307073: Group around tr: classes are not correct upon page load
- #307083: Read-only triggers in Government Forms summary don't work anymore
- #307082: JavaScript error in some cases when using the upload control with replace="instance"
- #307064: Instance replacement no longer causes xforms-value-changed to be fired
- #307059: Read-only instance cannot be submitted
- #307051: RFE: Select tree: make the currently selected value visible
- #307046: NPE in XInclude processor
- #306991: xforms:select1[@appearance="xxforms:tree"] should support updating its structure
- #306979: Tree does not appear hierarchical when itemset comes from readonly shared instance
- #306259: RFE: Make xforms:group around xhtml:tr work
- #307031: Select tree: parent value is considered selected even if not all the children are selected
- #307030: Items in select tree incorrectly selected
- #306974: Submission replace="all" is opening a new window in IE
- #306983: Itemsets are re-evaluated everytime the controls are rebuilt
- #306982: Orbeon Forms uses Saxon linked tree instead of TinyTree for read-only instances
- #306971: Delegation processor: Incorrect use of XSLT in example
- #306969: Calling ORBEON.xforms.Document.setValue with non-existent id causes unexpected JS error
- #306960: RFE: XSLT transformer should leverage Saxon input document location information
- #306959: SAXStore only keeps track of a single system ID per document
- #306958: XInclude processor does not adjust system ID in output locator
- #306957: Dialog: cursor now showing in text fields on Firefox when multiple dialog in the same page
- #306728: Tree shouldn't send Ajax requests as you click on it, unless incremental mode is set
- #306950: XForms: document xxforms:target
- #306942: XSLT Templates object still indirectly refers to some PipelineContext objects
- #306919: Submission: can't use serialize="false" with method="post"
- #306937: theme-plain.xsl must not refer to orbeon.css
- #306931: Schemas and instance URIs don't resolve against URI of JSP page
- #306927: Exception with trigger appearance="minimal" and empty label
- #306911: Group with appearance="xxforms:fieldset" generates xhtml:legend outside xhtml:fieldset
- #306641: RFE: Integrate "Deploying Orbeon Forms as a separate WebApp" changes
- #306703: Orbeon 3.5 doesn't compile with Java 6
- #306897: XPath cache mixes up XPath expressions with AVT expressions
- #306896: Submission with replace="all" is broken after background upload
- #306869: Remove handling of xforms-help from themes
- #306894: Should rename cli-ops.jar to ops-cli.jar for consistency
- #306859: XForms schema: xsd:any conflicts with xsd:element ref="xsd:schema"
- #306858: XPL schema is invalid
2.3. Upgrade Notes
When upgrading from Orbeon Forms 3.6, please note the following:
-
The following files have been renamed:
ops.war
toorbeon.war
,ops.jar
toorbeon.jar
,ops-resources-public.jar
toorbeon-resources-public.jar
,ops-resources-private.jar
toorbeon-resources-private.jar
-
We recommend that you update your properties with the following:
<!-- Store state on the server --><property as="xs:string" name="oxf.xforms.state-handling" value="server"/><!-- Allow a maximum of 20 MB of state information among all users --><property as="xs:integer" name="oxf.xforms.store.application.size" value="20000000"/>For more information about configuration, see State Handling.
-
Error resources moved to private location. The files
error.xpl
anderror.xsl
underRESOURCES/config
have been moved toorbeon-resources-private.jar
. If you haven't modified these files, make sure that you remove the old files fromRESOURCES/config
. If you have made modification, you will have to merge the changes introduced inorbeon-resources-private.jar
. -
Theme CSS stylesheets moved to private location. The files under
RESOURCES/config/theme
have been moved toorbeon-resources-public.jar
. This includesxforms.css
andxforms-widgets.css
. If you haven't modified these files, make sure that you remove the old files fromRESOURCES/config/theme
. If you have made modification, you will have to merge the changes introduced inorbeon-resources-public.jar
, or better, don't modify these CSS files but override CSS definitions in your own CSS files instead. -
XML parser upgrade requires XInclude namespace change. The Xerces XML parser has been upgraded to version 2.9. The previous version supported an obsolete version of the XInclude namespace:
http://www.w3.org/2003/XInclude
. The new version supports the correct namespace as specified by XInclude 1.0:http://www.w3.org/2001/XInclude
.Note that the correct version has the older year,
2001
, instead of the newer year,2003
. If you are usinghttp://www.w3.org/2003/XInclude
in your namespace declarations for XInclude, you will need to change these declarations tohttp://www.w3.org/2001/XInclude
. -
Plain theme no longer copies attributes in XHTML namespace. The plain theme, under
RESOURCES/config/theme-plain.xsl
, used to convert attributes in the XHTML namespace to attributes in no namespace. If you wrote:<div xhtml:style="background-color: red"/>then the plain theme would convert this to:
<div style="background-color: red"/>There does not seem to be much use for this feature, so for reasons of simplification it was removed. If you do need it then you can add again the following XSLT template:
<!-- Copy attributes in XHTML namespace to no namespace --><xsl:template match="@xhtml:*"><xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute></xsl:template>