Search

Module: Editor

Version: 2.2.1 +

User: Developer

Object Type: Output Object

Parent of:

no children

Child of:

- Document

- Node

- WebPage

- WebPanel

 

Description

An XMLConverter object provides output on a website by converting XML data into HTML. The conversion is defined in an XSLT-file. The XML data can be generated using an XmlBuilder.

Properties

DebugLogMode (from version 4.1)

Indicates the level of detail of debug information that is logged when running a Futurama application (website, webservice, console application) to the trace, a logfile, a database etc. The possible values are:

  • None: no debug information is logged
  • Simple: only basic information is given
  • Extended: in addition to the information in the Simple mode the values of all the properties of the object are shown

IsPublic

Possible values are 'True' or 'False'. If the value is 'False', then the object can only be used within the document where it is created. If the value is 'True', then also from other Futurama documents can be referred to this object. This means that changes in the object also affect the document in which is referred to this object. If the value is 'True' and you attempt to move or delete the object, a warning will be given. To limit these warnings to a minimum it is recommended to set IsPublic to 'True' only when necessary.

Visible

Possible values are 'True' or 'False'. If the value is 'True', the object will be rendered and therefore displayed in your application. If the value is 'False', the object will not be rendered.

(Name)

The name of the object.

Comment

Here a comment can be entered. For example a short description of the object.

Data (from 17.12)

This is a reference to a variable containing the XML that you want to use.

EncodeOutput (from 21.05)

A boolean. True (default) to wrap the output in a CDATA element. False to treat the output as XML such as FICO for instance. In both cases the XMLConverter itself will be rendered with the attribute EncodeOutput set to 'true' or 'false' respectively. Developers can use this attribute to determine the content of the XMLConverter element.

ID

The unique identification number of the object. This number is automatically generated by Futurama on the moment of creation. This number can be used when searching for a certain object in the Find Window.

XSLTFileName

Here you can enter the path to the XSLT file in which is defined how the XML data is to be transofrmed into HTML. From Futurama version 18.02 it is also possible to define (a part of) the FileName within a ResourceDocument. See the page Text management and Multi-language.

Using the XmlConverter

You can use the XmlConverter by setting the Data property and the XSLTFileName. Before Futurama 17.12 you had to use an XmlConverter in conjunction with an Action. The TargetControl property of the Action that contains the XMLData (such as an XmlBuilder) has to refer to the XmlConverter. This behaviour is now only supported when the compatibility mode is set to Futurama_17_11 or earlier.

Relative path

If your XSLT file requires the relative path to your application, you can do this by including the attribute

REL_FOLDER

in your XSLT file. This attribute is added to the XML data that is used in the XMLConverter, and holds the relative path to your application folder as its value. This enables you, for instance, to link to graphics. See below for an example, when you want to include the graphic info.jpg out of the folder graphics, which is within your application folder. You then should add the following code in your XSLT file:

<img><xsl:attribute name="src"><xsl:value-of select="//@REL_FOLDER">/graphics/info.jpg</xsl:value-of></xsl:attribute></img>

You can use this feature instead of using the function Relative.Datafilesdirectory.

Related Topics

- Using XSLT to display data: This tutorial shows how the XMLConverter is used in combination with an XMLBuilder to display text on a website.

- XmlBuilder

- Action

 

Updated: 2012-11-12