XRX/Patching you Browser to Support XForms

< XRX

Motivation

edit

Your browser does not support the W3C XForms standards.

Method

edit

Browsers should detect the XForms namespace and just render the XForms controls per the XForms specification. But many browsers vendors do not do this, perhaps because they feel that supporting their own standards is in the best interest of their stockholders. Whatever the reason, it can make life difficult for the website developer.

If you are running Firefox, you can load an extension that will correctly recognize the XForms namespace and do the right thing.

Some XForms implementations, such as XSLTForms, require you to add an XML Processing instruction to correctly convert XForms controls into HTML+JavaScript.

Here is an example of how to do this using the XML processing-instruction function within eXist:

let $my-form :=
<html>
  ....
</html>

let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" href="/rest/xsltforms/xsltforms.xsl"'}

return ($xslt-pi, $my-form)

This will return a sequence of two items, the Processing instruction and the form itself.

You can also build your own "form assembler" that uses a title, model and content.


Back: Background Technologies Next: XSLTForms and eXist