Documentation Center

TCDL configuration reference

The TCDL (Tridion Content Delivery Language) configuration file, tcdl-conf.xml, configures a custom TCDL Engine to be applied during publishing. The TCDL Engine transforms TCDL content into ASP.NET or JSP. Normally, the TCDL Engine requires no custom configuration. Only specify a custom configuration for the TCDL Engine if you have a pressing reason to do so.

Overall structure of file

The file has the following basic structure:
<TCDLEngine>
  <DocumentBuilder/>
  <Properties>
    <Property/>
    ...
  </Properties>
  <Tags>
    <Tag>
      <Handler/>
    </Tag>
    ...     	
  </Tags>
  <TagBundle>
  ...
</TCDLEngine>

TCDLEngine root element

The root element has a required Version attribute that is to be set to the version of the file, that is, the Content Delivery version (without specifying a service pack), which is 12.0 in this release. It also has two optional CodeStartMarker and CodeEndMarker attributes, allowing you to specify alternative markers for opening and closing a code block, respectively.

DocumentBuilder child element

You can use the optional DocumentBuilder child element to specify an alternative implementation of the DocumentBuilder responsible for generating the final output document. To use it, set the value of its Class attribute to the fully qualified name of a custom Java class to replace the built-in implementation of the DocumentBuilder.

Properties child section

Use the Properties section to define one or more Property elements to configure supplementary properties to control code generation, on top of the ones already provided out of the box by Content Delivery itself:
  • tcdl.dotnet.style, set to the value controls
  • tcdl.jsp.style, set to the value tags

Each Property element within this section has Name and Value attributes to specify its name-value pair.

Tags child section

Use the optional Tags section to define one or more Tag elements each defining a tag and its handler. When this section is omitted, TCDL uses the default set of tags and handlers. If you specify this section, you must define all default tags and handlers explicitly.

Each Tag element within this section has Namespace and Name attributes, plus a Handler child element to specify its handler. The Handler element has the following attributes:
  • a Class attribute for the Java class that implements the tag handler
  • a Boolean AllowCodeBlock attribute to specify whether this tag should generate code start and end markers. Set this attribute to false if this tag generates code within a code block.

TagBundle child element

You can use any number of TagBundle child elements to add the tags in a tag bundle to the TCDL Engine. A tag bundle is a JAR file containing a set of tags and a configuration file (specified in the Resource attribute) that defines the tags. The configuration file follows the same format as the TCDLEngine configuration here, except that it may only contain the Tags and Properties sections. The tag bundle JAR file and its configuration file must both be on the classpath.