XForms/Picoforms
Getting XForms to work with Picoforms
[edit | edit source]Picoforms is commercial XForms client that is designed to work with mobile phones and IE 6.0 as a plugin.
To get IE to see the forms you have to do the following:
If your forms are stored in the server with an XHTML extension you must
- Make sure that IE knows to render .XHTML files as html file types. This can be done by using the registry edit tool.
- Add the following processing instruction for picoforms AFTER the html element
IE 6.0 Registry MIME-Type Fix
[edit | edit source]To change the IE registry to allow IE to know that .xhtml files should be rendered as html. To do this do the following. From the Windows start menu click Start/Run. Enter "regedit" and press enter. Use the Registry browser to navigate to the HKEY_CLASSES_ROOT folder and then find the MIME/Daatabase/Content Type folder.
From their add the following:
Binding for xhtml files:
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/xhtml+xml] "CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}" "Extension"=".xhtml" "Encoding"=hex:08,00,00,00
Binding for xq files:
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/xhtml+xml] "CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}" "Extension"=".xq" "Encoding"=hex:08,00,00,00
The CLSID above is for HTML rendering. You can copy this from the .htm MIME-type. If you want it to render in xml use the binding for XML files.
Sample HTML Header
[edit | edit source]<html xmlns="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" >
<?import namespace="xf" implementation="#default#pxf"?>
<head>
...
Note that if you are using eXist to generate your forms you need to put the PI inside braces and serialize as html.
declare option exist:serialize "method=html media-type=text/html indent=yes omit-xml-declaration=yes";
...
<html xmlns="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" >
{<?import namespace="xf" implementation="#default#pxf"?>}
<head>...
Also, make sure if you make changes you should be sure to use SHIFT-reload to clear the IE cache.
CSS Issues
[edit | edit source]Note that IE6 does not recognize the @namepsace directive in CSS files. These CSS files will need to be converted use xf\: instead of the CSS | standard.
References
[edit | edit source]