Chapter 5. Filter Reference

5.1. Import Filters
5.1.1. (none)
5.1.2. RTF 1.6
5.1.3. Batch Processor
5.1.4. WordLink
5.2. Export Filters
5.2.1. XML (upCast DTD)
5.2.2. XHTML 1.0 (strict)
5.2.3. External CSS2
5.2.4. XML Validator
5.2.5. Commandline Processor
5.2.6. XSLT Processor

5.1. Import Filters

You set the active Import Filter by choosing it from the import settings filter list popup. It is immediately in effect.

After choosing an import filter, you may further customize its operation by setting parameters on it. For this purpose, an import filter may offer a configuration dialog which you can open by clicking the Configure… button next to the selection popup. The button will be disabled if the current filter does not have any configurable parameters.

upCast offers three different import filters: (none), RTF 1.6 and Batch Processor:

(none)

This filter does not do anything. It is mainly used for directly processing an input document with one of the export resp. porst-processing filters, e.g. the XML Validation filter or the XSLT Processor. You will mostly use it in a batch processing or workflow environment.

RTF 1.6

This filter imports Word and RTF documents and converts them to a unified internal format suitable for applying export filters.

Batch Processor

This filter reads Batch Configuration Files (BCFs) which control complete upCast configurations and sequences of parameterized conversion jobs. It is probably most useful in a workflow situation or when you need to convert many documents in one step.

5.1.1. (none)

Though it appears like a filter, it actually defeats any import filtering. This is used when you want to pass-through the input document without any processing to specific output filters capable of handling such a situation, that is all filters which take file names for their input.

Some of them are: XSLT Processor, Commandline, XML Validator.

5.1.2. RTF 1.6

This import filter handles conversion from RTF to the internal, unified format. With WordLink installed, the filter also can convert Word binary files (*.doc). The following parameters can be set:

Include Images

If checked, images will be retrieved from the given document and written to disk in the selected destination folder. Also, links to these files will be inserted into the document at the appropriate places.

IncludeImagesBooleantrue | false

Use document base name

If checked, images will be named after the document's base name in the form basename-x.ext , where x is an image counter for that document and ext the extension corresponding to the image format.

DocbaseImageNamingBooleantrue | false

Inline referenced images (if possible)

For images that have been included in the RTF document using both, reference and embedding, upCast tries to use the embedded substitute representation if this option is checked. This is important when images have been linked with a relative path so that after conversion to a different destination folder the link may break. This is even true with absolute paths when moving the result document to a different machine. This option essentially breaks the link to the original image file, if a substitute representation has been embedded in the RTF file, and instead links to an upCast-converted bitmap version of the original file.

When an image has only been linked and no substitute representation is available in the RTF, however, the original link to the image is preserved and used.

InlineReferencedImagesBooleantrue | false

For output, convert embedded images of type…

upCast can convert several types of images commonly present in RTF documents in embedded form into other common formats. You can specify for each input format separately, which output format is desired. This leaves you with the option to not process certain images at all, but extract them without changes.

With its built-in, Java based WMF renderer, upCast even allows for converting mostWindows Meta Files (WMFs) to any one of the supported pixel based output formats.[1]

You can convert each of the listed formats, i.e. WMF, EMF, JPEG, PNG and Macintosh PICT to any of the following formats:

(no change)

The embedded image is written to a file without any changes. Use this if you want to simply extract images in their native format.

*remove*

Discards the image completely. This means that you also won't get appropriate image elements in the output.

use WMF subst.

Note

Only available for EMF source.

Extended Meta File format images (EMFs) cannot be directly processed by upCast. However, you may use their WMF substitution which is always available in Word generated RTF. When you select this option, upCast uses the settings you have specified for WMFs and converts the image according to those settings. Think of this setting as a mere redirection to the WMF processing setting.

JPEG

Converts the source to JPEG. In the Options… dialog, you can specify the image quality in the range from 0 (lowest, smallest file) to 100 (maximum, largest file).

formatacronymDest§JPEG§QualityInteger0 .. 100

Note

The quality setting is set separately for each of the source formats where you specify JPEG as the destination format.

PNG

Converts the source to PNG. In the Options… dialog, you can specify the compression type. You can choose among the following values:

default

This is the default compression algorithm, yielding a good balance between file size and image quality.

fast

Produces a PNG that loads fast, i.e. is small in file size.

max

Produces a PNG that tries to achieve highest possible image quality. File size will be bigger than normal.

none

Produces a PNG that does not apply any compression to the image material and therefore does not alter the original image.

formatacronymDest§PNG§CmprTypeStringdefault | fast | max | none

Note

The compression type setting is set separately for each of the source formats where you specify PNG as the destination format.

BMP

Converts the source to Windows Bitmap (BMP) format.

PICT

Converts the source to Macintosh PICT format.

Note

The resulting file will only contain a bitmap. You cannot convert WMFs (being a vector based format) to a PICT containing QuickDraw operations.

Important

For PICT source format, upCast can only convert images which contain solely a bitmap object. upCast does not render QuickDraw operations like it does for e.g. WMFs.

Please note that this limitation causes most vector-based clip arts in PICT format to not be correctly converted using upCast. For best results, choose (no change) for embedded PICT source images to write them to a file and then post-process them with a third-party graphics application like Graphic Converter (Shareware) for Mac OS.

formatacronymDestFormatStringunchanged | dispose | UseWMFSubstitute | JPEG | PNG | BMP | PICT

Include original numbering info

If checked, numbering information (e.g. chapter numbering) as it occurs in the given document is preserved during the import process. This is useful in case you must ensure that chapter numbering remains exactly as it was in the original document or if you are exporting into the XHTML format in order to view a document in a browser.

Normally you would leave the numbering up to a style sheet processor or some other external XML processing engine.

OrigNumberingBooleantrue | false

Use literal pass-through styles

If checked, you can define two (Word-) styles, a paragraph style and a character style (by specifying their exact names) which should be treated as literals. This means that all text in the document set using these styles will be written to the output without any interpretation by upCast. This lets you write e.g. XHTML or XML code directly within your document the way it should appear at that location in the output.

Warning

This may create documents which are not well-formed if used incorrectly! Use this feature only if you know exactly what you are doing.

LiteralProcessingBooleantrue | false

LiteralParStyleStringparstylename

LiteralCharStyleStringcharstylename

Prepare document for … dpi output resolution

Lets you specify the output resolution of the document. This is used in export filters to correctly specify image and table cell widths and heights in pixels.

The default value is 96 dpi (used e.g. by Microsoft's Internet Explorer). You may need to change this when outputting for Netscape Navigator 4.7 on the Mac, which by default displays at 72 dpi.

This value also affects the WMF to pixmap renderer built into upCast. This means that WMF (or EMF) images will be rendered into a pixmap with pixel dimensions for width and height that correspond to this value.

Suppose you have a WMF image in your document that is 2 by 1 inches in size. With 96 dpi output resolution, this will yield a pixmap of size 192 by 96 pixels.

However, if you set the output resolution to only 72 dpi, the resulting pixmap will be 144 by 72 pixels in size.

DocDestResolutionInteger20 .. 300

5.1.3. Batch Processor

The Batch Processor can be thought of a meta-import filter in that it itself calls either the (none) or RTF 1.6 import filter repeatedly. A Batch Job, that means the details on when to call which filters with which input documents, is controlled by so-called Batch Configuration Files (BCFs) that describe the batch job operations to be executed on source documents. They are interpreted and executed by the Batch Processor import filter.

Note

Note that the input file to be specified for the Batch Processor is the BCF file that defines the batch job, not the file(s) the batch is supposed to operate on.

5.1.3.1. Performing a batch job

In order to perform a batch job you click on Start Conversion. This initiates a detailed check of the chosen batch configuration file.

This check comprises the following:

  • A test for the existence of all specified documents to be converted. You will get a warning for all files that were not found.

  • A test for files that are already converted and therefore may be ignored (see skipexisting ). You will be informed about all the files that will be skipped.

At the end of the check you get a survey about the number of documents to be converted and their accumulated size.

If you want to proceed with the execution of the batch job, click Execute Batch, otherwise click Cancel Batch.

5.1.3.2. Aborting a batch job

A batch job consists of several phases, as determined in the batch configuration file. During the processing of these phases a progress bar will be displayed that provides a Cancel button. You can abort the batch job at any time by clicking this button. All already successfully written files will remain untouched.

5.1.4. WordLink

If you're running upCast on Windows 95/98/2000/NT/XP and have a working installation of Word 97 or later, you can also convert Microsoft Word binary (*.doc) files directly. For this to work, you need to install some additional software included in the upCast distribution. To do this, choose the ExtrasInstall WordLink command. After relaunching upCast, WordLink should be available and active. You can check this in the HelpSystem Information… window.

This additional software lets upCast remote-control the installed copy of the Word application for invisibly and automatically converting the Word binary file to RTF, which then is processed as usual by upCast. Once installed, WordLink performs transparently in the background when needed.

Note

The WordLink feature is not available on Macintosh and Unix platforms. Therefore, when running on these platforms, the ExtrasInstall WordLink command will always be disabled.

5.2. Export Filters

This section describes the standard set of export filters upCast is distributed with. You can also write your own custom export filters; see Chapter 10, Export Filter API or download optional filter implementations (which may have their own parameter set and are not discussed at this place) from the Support section of infinity-loop's website .

5.2.1. XML (upCast DTD)

This is the standard, most important export filter within upCast. Any custom DTD will be targetted by using the document structure created by this filter as conversion basis.

Documents created by this export filter are valid against the upCast DTD (see Chapter 14, upCast DTD). This generic DTD is based on the implicit DTD any RTF document is made up of (i.e. essentially headings, lists, tables, paragraphs and inlines). The original style names are added as class attributes to the generic elements par and inline. This enables a constant DTD across all converted documents and facilitates generalized post-processing of the exported XML documents with tools like validators or XSLT processors.

The element tag names in the resulting document are therefore not based on the style names used in the source document, but taken from the upCast DTD or XML Schema, respectively.

This export filter has the following configuration options:

General. This group aggregates general export parameters.

Name

Lets you specify a name for the instance of this filter so you can identify it easily in the list of active export filters.

FilterNameStringname

Remove empty elements

If checked, all elements which do not contain information (i.e. essentially empty paragraphs) are removed from the generated output. However, empty table cells are not removed, of course. This is a convenient option to strip empty paragraphs from the source documents that have been inserted by the author for layout reasons only.

DeleteEmptiesBooleantrue | false

Combine CLASS and STYLE attributes

When on, this option allows that both a class and style attribute may be present on an element. Otherwise, the two are separated and an anonymous inline element is used instead.

Option checked:

This is <inline class="slang" style="color: blue;">True Blue</inline>.

Option unchecked:

This is <inline class="slang"><inline style="color: blue;">True Blue</inline></inline>.

You might want to use this option to have named Word styles always separated out in a dedicated element so that additional override styles can be recognized quickly by the additional inline element.

CombineWithLogicalStyleBooleantrue | false

Validate result

When checked, the output is automatically validated against the upCast DTD and any errors will be reported.

Note

Though this filter generates its XML based on the upCast DTD, this does not mean that any generated document is valid against this DTD. For example, the DTD requires that a table that has a thead element, must have also a tbody element. However, RTF allows for creating tables that exclusively consist of header rows, and such a document will therefore not validate successfully.

ValidateBooleantrue | false

Include <hidden> contents

When checked, this includes document contents that is visually hidden in the original document. Such document contents will be marked-up by the element hidden and must be handled in a special way by post-processors. See also the technical discussion of the hidden element (Section 13.4, “The hidden element”).

IncludeHiddenContentsBooleantrue | false

Output file extension

Specifies the extension of the output file. This will replace the original extension of the input file or, if there was none, will be simply appended to the given source file name. Output files will always be created in the destination folder.

The default extension is .xml.

ExtensionString.ext

Output file encoding

Lets you specify a name of a supported output file encoding, e.g. UTF-8 or iso-8859-1.

OutputEncodingStringxml-encoding-name

XML. This group aggregates parameters special to the XML (upCast DTD) export filter.

Include layout information

When this is checked, style properties are added to the elements by adding the style attribute containing overriding CSS style information. Additionally, a stylesheet PI is automatically added to the document (depending on the setting of the Stylesheet PI parameter on the Advanced tab).

Otherwise, only the class attribute is present on certain elements, and carries the original RTF style name.

IncludeVisualBooleantrue | false

Include <toc> element

When this is on, the position of the RTF generated table of contents field is marked with the toc element, and the generated contents at the time of writing the original document is included as its content.

WriteTOCBooleantrue | false

Use upCast namespace (prefix: 'uc')

When checked, the elements of the upCast DTD are put into the namespace http://www.infinity-loop.de/DTD/upcast/4.0/, and the fixed namespace prefix uc is used on the elements.

UseNamespaceBooleantrue | false

DTD type

Choose which type of document structure definition you want to use:

XML DTD

Selects the XML DTD version of the document structure definition.

XML Schema

Selects the XML Schema version of the document structure definition.

Note

XML Schema support is not implemented in the current release.

DTDTypeStringDTD | XMLSchema

Table model

This parameter lets you choose which table model should be used for tables. You can either choose the HTML 4 table model, or the OASIS XML-EM (CALS) (OASIS XML Exchange Table Model, a subset of CALS) table model.

The HTML 4 table model uses the namespace prefix html for the HTML namespace http://www.w3.org/HTML/1998/html4.

TableModelStringHTML | CALS

Advanced. This group aggregates parameters that are only relevant in special, advanced cases.

DOCTYPE declaration

Here, you can override the default DOCTYPE declaration (indicated by a simple '*' character) with a custom one. If you leave this field empty, no DOCTYPE declaration is written in the resulting file at all.

DOCTYPEDeclString'' | '*' | customDOCTYPE

Stylesheet PI

Lets you specify your own stylesheet inclusion or reference processing instruction. For the default one that references the stylesheet written by the External CSS2 export filter, use '*'. To suppress writing a stylesheet PI completely, leave this field empty.

Note

A stylesheet PI will only be written if the Include layout information parameter is checked, regardless of the setting of this parameter.

CustomStylesheetPIString'' | '*' | customStylesheetPI

Unicode translation map

upCast has a built-in mechanism for converting any Unicode character to any other Unicode character or even entity notation on export. This is done by means of the Unicode translation map, which is a plain ASCII text file. For a description of the format, see Section 15.3, “Unicode translation map”.

With this parameter, you decide whether you want to use any of the built-in maps or provide your own one by specifying its location in the file system. The default value is upcast:xml-map.

UnicodeTranslationMapStringupcast:xml-map | upcast:html-map | customUnicodeMapURI

CSS property unit table

Here, you can specify indicate a mapping table that associates any CSS <length> property with a pair unit, precision. When the filter needs to write length or size information in form of CSS properties, it consults this list to determine which length unit to use at which precision. For a description of the format, see Section 15.4, “CSS property unit table”.

With this parameter, you decide whether you want to use the built-in map or provide your own one by specifying its location in the file system. The default value is upcast:default-map.

CSSUnitMapStringupcast:default-map | customUnitMapURI

5.2.2. XHTML 1.0 (strict)

This export filter creates a valid XHTML 1.0 (strict) document. It is intended to be used in conjunction with the External CSS2 export filter to include layout information of the original document. Footnotes are gathered and displayed at the end of the document, and an Index is also created from index entries found in the document. Splitting the document into several files is not part of this implementation.

Note

This export filter creates a valid XHTML 1.0 (strict) document. The implementation of this filter is based on the Export Filter API (see Chapter 10, Export Filter API) and the Java source code is available for download from infinity-loop's website.

This export filter has the following configuration options:

General. This group aggregates general export parameters.

Name

Lets you specify a name for the instance of this filter so you can identify it easily in the list of active export filters.

FilterNameStringname

Remove empty elements

If checked, all elements which do not contain information (i.e. essentially empty paragraphs) are removed from the generated output. However, empty table cells are not removed, of course. This is a convenient option to strip empty paragraphs from the source documents that have been inserted by the author for layout reasons only.

DeleteEmptiesBooleantrue | false

Combine CLASS and STYLE attributes

When on, this option allows that both a class and style attribute may be present on an element. Otherwise, the two are separated and an anonymous inline element is used instead.

Option checked:

This is <span class="slang" style="color: blue;">True Blue</span>.

Option unchecked:

This is <span class="slang"><span style="color: blue;">True Blue</span></span>.

You might want to use this option to have named Word styles always separated out in a dedicated element so that additional override styles or manually applied formatting can be recognized quickly by an inline element missing a class attribute.

CombineWithLogicalStyleBooleantrue | false

Validate result

When checked, the output is automatically validated against the XHTML 1.0 strict DTD and any errors will be reported.

Note

Note that by default, the DOCTYPE declaration points with its SYSTEM identifier to the DTD on the web, so validation will only succeed when you have an active internet connection. To work around this, you should download a copy of the DTD to your machine locally and add an appropriate entry in upCast's catalog file; see Section 15.5, “XML Catalog”.

ValidateBooleantrue | false

Output file extension

Specifies the extension of the output file. This will replace the original extension of the input file or, if there was none, will be simply appended to the given source file name. Output files will always be created in the destination folder.

The default extension is .html.

ExtensionString.ext

Output file encoding

Lets you specify a name of a supported output file encoding, e.g. UTF-8 or iso-8859-1.

OutputEncodingStringxml-encoding-name

XHTML. This group aggregates parameters special to the XHTML export.

Include layout information

When this is checked, style properties are added to the elements by adding the style attribute containing overriding CSS style information. Additionally, a stylesheet link element is automatically added to the document suitable for linking to the CSS stylesheet created by the External CSS2 export filter, except when the style is inlined by checking the Add inline CSS stylesheet option (see below).

Otherwise, only the class attribute is present on certain elements, and carries the original RTF style name.

IncludeVisualBooleantrue | false

Add inline CSS stylesheet

When checked, a CSS stylesheet is placed directly into the XHTML document by using the style element. This makes the resulting document a self-contained unit inlcuding style information.

InlineStylesheetBooleantrue | false

Allow empty table cell elements

Some browsers consolidate empty adjacent table cells into bigger areas. This might not be what you want, e.g. if the table is meant to provide empty fields where input is expected or the whole table is a time table. upCast therefore may fill empty cells with a non-breaking space entity (&nbsp;) to hinder browsers from consolidating empty cells. In this case the check box has to be deselected.

AllowEmptyCellsBooleantrue | false

Include <toc> element contents

When enabled, the contents of a toc element is included in the output. The toc element contains the generated table of contents as it was at the time of saving the original document.

WriteTOCBooleantrue | false

Form elements

Determines handling of form elements found in the source document.

Discard

Discard any form elements completely.

Render as Text

Renders the current selection or choice of form elements as text into the document.

Create HTML Form

Creates corresponding form elements in HTML. The complete document body content is surrounded by a <form> element with empty action attribute. Use an XSLT post processing step to populate the action attribute with the desired value.

FormHandlingStringdiscard | text | form

External stylesheet

By default, a link to the CSS stylesheet as produced by the External CSS2 export filter is inserted into the XHTML document. To link the XHTML document to a different stylesheet, you can specify the destination here.

The default value is %F.css, with the parameter %F being resolved to the base file name of the original document that is currently processed.

CSSRefStringpath/to/styles.css

Advanced. This group aggregates parameters that are only relevant in special, advanced cases.

DOCTYPE declaration

Here, you can override the default DOCTYPE declaration (indicated by a simple '*' character) with a custom one. If you leave this field empty, no DOCTYPE declaration is written in the resulting file at all.

DOCTYPEDeclString'' | '*' | customDOCTYPE

Unicode translation map

upCast has a built-in mechanism for converting any Unicode character to any other Unicode character or even entity notation on export. This is done by means of the Unicode translation map, which is a plain ASCII text file. For a description of the format, see Section 15.3, “Unicode translation map”.

With this parameter, you decide whether you want to use any of the built-in maps or provide your own one by specifying its location in the file system. The default value is upcast:html-map.

UnicodeTranslationMapStringupcast:xml-map | upcast:html-map | customUnicodeMapURI

CSS property unit table

Here, you can specify indicate a mapping table that associates any CSS <length> property with a pair unit, precision. When the filter needs to write length or size information in form of CSS properties, it consults this list to determine which length unit to use at which precision. For a description of the format, see Section 15.4, “CSS property unit table”.

With this parameter, you decide whether you want to use the built-in map or provide your own one by specifying its location in the file system. The default value is upcast:default-map.

CSSUnitMapStringupcast:default-map | customUnitMapURI

5.2.3. External CSS2

This export filter writes an external Cascading Style Sheets, level 2 (CSS2) file comprising all styles (paragraph styles and character styles) used in the given input file, matching their visual appearance as closely as reasonably possible. The output also includes information on the page setup like paper size and margins.

The CSS2 file written may be referenced by a file created by the XHTML 1.0 (strict) or XML (upCast DTD) export filter.

This export filter has no configuration options. The extension of the output file is always .css and will replace the original extension of the input file or, if this is not there, will be simply appended to the given source file name. The output file will always be created in the destination folder.

This export filter does not have any parameters.

5.2.4. XML Validator

This is a post-processing filter.

This filter serves for validating arbitrary XML documents.

This export filter has the following configuration options:

Name

Lets you specify a name for the instance of this filter so you can identify it easily in the list of active export filters.

FilterNameStringname

Validate

The file to validate. You can use the following variables upCast provides:

%F

gets replaced by the basic input file name.

If the current input file is /Data/Source/RTF/article.rtf, then %F will evaluate to article.

%S

gets replaced by the full input file name.

If the current input file is /Data/Source/RTF/article.rtf, then %S will evaluate to /Data/Source/RTF/article.rtf.

%I

gets replaced by the path to the input file, including path separator character at the end.

If the current input file is /Data/Source/RTF/article.rtf, then %I will evaluate to /Data/Source/RTF/.

%O

gets replaced by the current output folder, including path separator character at the end.

If the current output directory is /Data/Dest/html, then %O will evaluate to /Data/Dest/html/.

%G

gets replaced by the current image destination folder, including path separator character at the end.

If the current image destination folder is /Data/Dest/html/images, then %G will evaluate to /Data/Dest/html/images/.

%D

gets replaced by the expected destination file, excluding extension.

If the current input file is /Data/Source/RTF/article.rtf and the current output directory is /Data/Dest/html/, then %D will evaluate to /Data/Dest/html/article .

InputFileString/path/to/file.xml

Validate only when grammar specified

When checked, the parser will validate the document only if a grammar is specified.

http://apache.org/xml/features/validation/dynamicBooleantrue | false

Include external parameter entities

When checked, include external parameter entities and the external DTD subset.

http://xml.org/sax/features/external-parameter-entitiesBooleantrue | false

Include external general entities

When checked, include external general entities.

http://xml.org/sax/features/external-general-entitiesBooleantrue | false

Warn on duplicate attribute definition

When checked, a warning is issued when an attribute is defined more than once on an element.

http://apache.org/xml/features/validation/warn-on-duplicate-attdefBooleantrue | false

Warn on duplicate entity declaration

When checked, a warning is issued when an entity is declared more than once.

http://apache.org/xml/features/warn-on-duplicate-entitydefBooleantrue | false

Report invalid URIs

When checked, requires that a URI has to be provided where a URI is expected.

http://apache.org/xml/features/standard-uri-conformantBooleantrue | false

5.2.5. Commandline Processor

This is a post-processing filter.

This filter serves for executing external system commands by way of the standard commandline interpreter available on the respective execution platform.

This filter has the following configuration options:

Name

Lets you specify a name for the instance of this filter so you can identify it easily in the list of active export filters.

FilterNameStringname

Commandline

The command to be executed by the underlying system command line interpreter. You can use the following variable substitutions provided by upCast:

%F

gets replaced by the basic input file name.

If the current input file is /Data/Source/RTF/article.rtf, then %F will evaluate to article.

%S

gets replaced by the full input file name.

If the current input file is /Data/Source/RTF/article.rtf, then %S will evaluate to /Data/Source/RTF/article.rtf.

%I

gets replaced by the path to the input file, including path separator character at the end.

If the current input file is /Data/Source/RTF/article.rtf, then %I will evaluate to /Data/Source/RTF/.

%O

gets replaced by the current output folder, including path separator character at the end.

If the current output directory is /Data/Dest/html, then %O will evaluate to /Data/Dest/html/.

%G

gets replaced by the current image destination folder, including path separator character at the end.

If the current image destination folder is /Data/Dest/html/images, then %G will evaluate to /Data/Dest/html/images/.

%D

gets replaced by the expected destination file, excluding extension.

If the current input file is /Data/Source/RTF/article.rtf and the current output directory is /Data/Dest/html/, then %D will evaluate to /Data/Dest/html/article .

InputFileString/path/to/file.xml

To create a new directory images in the current output directory on a Unix system, you would use the following commandline: mkdir %Oimages

Wait for command completion

When checked, the command is executed synchronously, i.e. upCast waits until the external command has completed before continuing execution.

Important

Checking for errors occurring during external command execution can only be performed when this option is on. upCast considers any return value other than 0 (zero) an error.

http://apache.org/xml/features/validation/dynamicBooleantrue | false

5.2.6. XSLT Processor

This is a post-processing filter.

This filter offers the possibility to automatically apply an XSLT stylesheet to some result file(s) of earlier running export filters. It utilizes the Xalan XSL processor from the Apache Software Foundation (ASF; http://xml.apache.org/).

This filter has the following configuration options:

Name

Lets you specify a name for the instance of this filter so you can identify it easily in the list of active export filters.

FilterNameStringname

Input file

Specify the absolute file name for the input file, i.e. the file an XSLT stylesheet is to be applied on. You can use the following variable substitutions provided by upCast:

%F

gets replaced by the basic input file name.

If the current input file is /Data/Source/RTF/article.rtf, then %F will evaluate to article.

%S

gets replaced by the full input file name.

If the current input file is /Data/Source/RTF/article.rtf, then %S will evaluate to /Data/Source/RTF/article.rtf.

%I

gets replaced by the path to the input file, including path separator character at the end.

If the current input file is /Data/Source/RTF/article.rtf, then %I will evaluate to /Data/Source/RTF/.

%O

gets replaced by the current output folder, including path separator character at the end.

If the current output directory is /Data/Dest/html, then %O will evaluate to /Data/Dest/html/.

%G

gets replaced by the current image destination folder, including path separator character at the end.

If the current image destination folder is /Data/Dest/html/images, then %G will evaluate to /Data/Dest/html/images/.

%D

gets replaced by the expected destination file, excluding extension.

If the current input file is /Data/Source/RTF/article.rtf and the current output directory is /Data/Dest/html/, then %D will evaluate to /Data/Dest/html/article .

InputFileString/path/to/file.xml

To create a new directory images in the current output directory on a Unix system, you would use the following commandline: mkdir %Oimages

XSLT file

Specify the absolute file name for the XSLT stylesheet to be applied to the Input File. You may also browse for the file by clicking the Choose… button.

You may use the same variable substitutions as described for Input File.

StylesheetString/path/to/procsheet.xsl

Output file

Specify the absolute file name for the output file, that is the file where the result of the XSLT stylesheet application should be written to.

You may use the same variable substitutions as described for Input File.

OutputFileString/path/to/result.ext

Stylesheet parameters

Lets you specify parameters to be passed into the stylesheet. A parameter definition must follow this syntax:

paramname '=' '"'
                                value '"'

Parameter definitions must be separated by at least one whitespace character. Quotes within the parameter value must themselves be quoted using the backslash character '\'.

You may use the same variable substitutions as described for Input File anywhere in the parameter defintion. Be careful that you need to quote the percent character '%' by writing %% and the backslash character '\' by writing \\.

XSLTParametersStringdestfile="%O%F_proc.xml"



[1] The built-in, fully Java based WMF renderer is not an industrial-strength image conversion tool. It is provided as a convenience for converting documents quickly for preview. Problems may arise when you use custom and/or symbol fonts as is the case in mathematical formulae. Also, the WMF format defines some opcodes which have no counterpart in imaging options available in the standard Java imaging API, so WMF files using these opcodes will not be rendered correctly.

If you require accurate conversion of WMF images into a bitmap representation, we highly recommend to have upCast write the WMF images out to disk without processing and use a specialized external third-party image processing tool for the rendering and/or converison.