Embed Extension
Introduction
This extension embeds HTML in the Concordion output. It is similar to the echo command, except that it does not escape HTML text.
Configuration
To install the extension with no namespace declarations, either annotate the fixture class with:
@Extensions(EmbedExtension.class)
or set the system property concordion.extensions to
org.concordion.ext.EmbedExtension
Declaring additional namespaces
If the HTML fragment includes elements or attributes with a namespace prefix, the additional namespaces must be declared, both in the HTML specification, and to the extension.
The easiest way is to use the @Extension annotation on an EmbedExtension instance field within the fixture class.
For example, to map the myns prefix to the http://com.myco/myns namespace:
@Extension
public ConcordionExtension extension =
new EmbedExtension().withNamespace("myns", "http://com.myco/myns");
Embedding HTML
To use the embed command, add an attribute named embed
using the namespace "urn:concordion-extensions:2010"
to an element in your Concordion HTML. For example:
<html xmlns:concordion="http://www.concordion.org/2007/concordion"
xmlns:ext="urn:concordion-extensions:2010">
....
<span ext:embed="methodThatReturnsHtml()"/>
...
Specification
See also the embed specification.