{
xmlWriter.writeText(" ");
}
else if (node instanceof RenderableReplacedContent)
{
final RenderableReplacedContent rc = (RenderableReplacedContent) node;
final ResourceKey source = rc.getSource();
// We have to do three things here. First, w have to check what kind
// of content we deal with.
if (source != null)
{
// Cool, we have access to the raw-data. Thats always nice as we
// dont have to recode the whole thing.
if (knownResources.containsKey(source) == false)
{
// Write image reference; return the name of the reference ..
final String name = writeRaw(source);
if (name != null)
{
// Write image reference ..
final AttributeList attrList = new AttributeList();
attrList.setAttribute(Namespaces.XHTML_NAMESPACE, "src", name);
// width and height and scaling and so on ..
xmlWriter.writeTag(Namespaces.XHTML_NAMESPACE, "img", attrList, XmlWriter.CLOSE);
knownResources.put(source, name);
return;
}
}
}
// Fallback: (At the moment, we only support drawables and images.)
final Object rawObject = rc.getRawObject();
if (rawObject instanceof Image)
{
// Make it a PNG file ..
xmlWriter.writeComment("Image content:" + source);
final String name = writeImage((Image) rawObject);