Version 2.6

Historical note: OXF 2.6 was released on November 18, 2004


XForms upload

The XForms Upload control has been fixed. It comes with an example and is documented in the XForms reference documentation.

XForms conditionals

Two new extension controls provide a mechanism to selectively enable markup and other XForms controls depending of the values stored in the XForms instance. The syntax is modeled after the XSLT language: if and choose/when/otherwise. See the XForms Conditionals documentation for more information.

Itemset support

The XForms element <itemset> is now supported. You can use it in conjunction with XForms selection controls (<xforms:select and <xforms:select1>) when you want the list of items the end-user has to pick from to come from the instance, instead of being listed in view. For more details, see the XForms controls documentation and the XFormsControls example.

Support for ref attribute on label, alert, help, and hint

You can now use the ref attribute on <xforms:label>, <xforms:alert>, <xforms:help>, and <xforms:hint> to have the displayed message come from the instance instead of being specified in the view. For more details, see the Label, Alert, Help, and Hint documentation.

Support for ref attribute on submit controls

You can now bind a submit control (<xforms:submit>) to a node in the instance with the ref attribute. If you do so, the submit control will only be displayed if the node it is bound to is relevant. This way you can define in the XForms model rules that specify when a submit control is to be displayed.

Standard representation of binary and text documents

In OPS XPL and pipelines only deal with XML documents. In order to handle non-XML data such as binary and text documents in pipelines, OPS defines two standard XML document formats to embed binary and text documents within an XML infoset. This solution has the benefit of keeping XPL simple by limiting it to pure XML infosets, while allowing XPL to conveniently manipulate any binary and text document.

These document formats are widely used by processors such as the URL generator, the HTTP serializer, the Email processor, and converters.

Improved request body and uploaded files support

It was possible in the past with the Request generator to obtain the request body, which was automatically parsed as XML. This behavior has now been changed. It is instead possible to obtain the request body as xs:anyURI or xs:base64Binary (standard binary document format). Parsing may then be done using the URL generator. In addition, the body can now be read several times. This change brings consistency with the handling of uploaded files, and the support for binary files thoughout OPS.

In a related change, the Request generator now supports specifying whether uploaded files or the request body must be generated as xs:anyURI or xs:base64Binary.

URL generator

Binary mode

The URL generator now supports streaming binary files encoded with Base64. The XForms Upload example, among others, illustrates this capability.

Text mode

The URL generator now supports reading text files. The Employees example illustrates this capability.

XML content type

The URL generator now correctly detects as XML the following content types:

  • application/xml, the recommended content type for XML
  • text/xml, the now deprecated content type for XML
  • content types ending with +xml such as image/svg+xml


New serializer architecture

The pre-2.6 serializer architecture did not clearly separate the following concerns:

  • Conversion of XML documents to a character or byte stream.
  • Sending a character or text stream to a particular destination, such as a web browser through HTTP, or a file on disk.

The new architecture introduces converters in charge of the first task, and plain serializers in charge of the second task. It relies on the standard representation for binary and texts documents.

Backward compatibility for existing serializers is kept, but it is recommended to use the new converters and serializers whenever possible.

HTTP serializer

A new serializer, the HTTP serializer, supports decoding of binary or text data, and sending the resulting stream to an HTTP client. The XForms Upload example illustrates this capability. The HTTP serializer can be used for example in conjunction with converters and the URL generator.

The HTTP serializer uses the recommended application/xml content type by default rather than text/xml.

New configuration parameters

The omit-xml-declaration and standalone configuration parameters of the XML converter are now documented. The cache-control/use-local-cache configuration parameter of the HTTP serializer is now documented.


Bizdoc application changes

The data access layer of the BizDoc application has been refactored to support the following backends:

  • XML databases: XML documents are accessed through the XML:DB processors. Currently, the backend assumes the built-in open source eXist database.
  • SQL databases: XML documents are accessed as a text or native XML format.

It is now possible to visualize each document as XML from the user interface.

New "employees" example

The new Employees example application illustrates the following aspects of OPS:

  • CRUD operations, paging and sorting with a SQL backend
  • XForms controls and validation with XML Schema
  • XForms upload control
  • Reading plain text files
  • Using the Java processor
  • Exporting Comma-Separated Values (CSV) files
  • Exporting and importing Excel files
  • Calling and implementing Web Service
  • Authentication (login / logout) and roles
  • LDAP access

Page flow

XSLT views in Page Flow can now access the XForms instance using document('input:instance') or doc('input:instance'). In the past, it was often necessary for the model to aggregate its output with the XForms instance to make both documents accessible from the view.

Email processor

The Email processor features the following improvements:

  • Multipart hierarchy: it is possible to have multiple levels of multipart messages.
  • Binary attachments: binary files such as images and PDF files can be attached to an email.
  • Dynamic attachments: attachments can be generated dynamically. It is for example possible to attach a dynamically generated chart or PDF file.
  • Character encoding: character encoding can be specified for text content.

In addition, property naming has been revisted. The test-smtp-host and test-to replace the deprecated host and forceto properties.

Custom processors

There is a new facility to declare custom processors that does not involve modifying the original processors.xml file. To do this, create a file called oxf:/config/custom-processors.xml. Its format is the same as the original processors.xml.

The Processor API has been enhanced to provide access to the inputs and outputs actually connected (as opposed to just those that have been declared). This provides access to optional inputs and outputs. Please refer to the Javadoc for the Processor class for more information, as well as the ListInputs unit test.

Webdav resource manager

A WebDAV resource manager is now included. It supports basic authentication.

J2SE 5.0 support

The source code of OPS now compiles with Java 5.