You are using a browser which doesn't fully support Cascading Style Sheets. This site will look much better in a browser that supports web standards, but its content is accessible to any browser or Internet device.

Import filters: embed documents written in other formats

The inclusion of source files makes it possible to compose documents from various sources. Usually these files are written in PerlPoint as well, or they are Perl files that dynamically produce the PerlPoint to be included. But what if they are written in a format that has nothing to do with PerlPoint?

Till now we know two cases in which those files can be included: text files can be automatically tranformed into examples, and files written in a target format can be literally included, which means they are copied to the result if one produces the format in question (HTML fragments are made part of the result if HTML is produced, and so on).

But none of these methods covers the case that one has written a document in a language or format that is different to the target format, and that should not be copied plainly into the result (if there is any way to do this is). Let's say you are a Perl programmer and have a document in POD, Perls own documentation language. Or there is a document written in an Office Program like MS Word, or in LaTeX, or in a Wiki format, or in XML. Do you have to rewrite the document? Do you have to transform its content into PerlPoint in order to integrate it?

The answer to this question is no - if you can write or use a program that does the transformation for you. And of course this answer is always true, but I'm speaking of a way to let those programs work in the background, invoked by a simple directive. The feature that makes this possible is import filter capability, and the final syntax to use a filter is as simple as this:

    // import a document
    \INCLUDE{... ifilter=pod2pp ...}

The interface to implement such a filter requires programming knowledge, but finally it turns out these are definitions that can be included from a definition file. So, as a user don't worry about the definitions, if there is a filter you can just use it.