XDocs (InfoPath)

Apache, HTML, XML Add comments

I keep seeing XDocs (a.k.a. InfoPath) popping up in peoples’ blogs, such as here and here. Maybe, just maybe, the tiniest bit of code that I wrote for XDocs way-back-when will make it through to the shipped version. *sigh* It sure would have been nice to get a ship award.

In other news, I would like to start a jihad against exposing the extension of (most) files on websites. That’s what MIME types and directories with default files are for! For example, DON’T link to http://www.deez.info/sengelha/index.html, link to http://www.deez.info/sengelha/. That way if I suddenly decide to rewrite my website using PHP everyone’s links still work. It will even work if I change everything to client-side XML/XSLT transformations, which will result in a change in the MIME type of the document.

If you don’t want to make one directory per file, then create an extensionless filename and use the following snippet in your .htaccess file to force the MIME type of the file to a particular value (for Apache):

<Files rss091>
ForceType application/rss+xml
</Files>

<Files rss1>
ForceType application/rss+xml
</Files>

The main downside to the above is that some URLs end with slashes and some do not. I’ll think about this one and get back to you.

Comments are closed.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in