Using the XML validation of browsers to debug .xml/.fsi files

Reason:

Using the browser’s built in XML validation of XML files is very useful for debugging the .fsi configuration files. You can open the .fsi file in your browserand use its built-in XML validation to detect possible faulty code easily.

Solution:

To make use of the debugging capabilities, the according mimteype must be registered to the webserver:

Adding MIME Types to Apache

When using Apache webserver, it is possible to register the .fsi extension as an XML mimetype, by opening the file “mime.types”, that is usually located at /etc/httpd/ in a text editor.

Find the line
application/xml xml xsl

and add “fsi” to it, so it reads
application/xml xml xsl fsi

then save the file and restart the Apache webserver.


Adding MIME Types to IIS 5.0

MIME types can be registered in IIS 5.0 using the IIS snap-in.

For example, to add the XML MIME type to the default Web site using the IIS snap-in:

1. Select Default Web Site and bring up the Properties dialog box.
2. Select the HTTP Headers tab.
3. Under MIME Map, click the File Types tab and select New Type.
4. Type .fsi in the Extension field and text/xml in the Content Type field, and then click OK

Posted in: