ContentMap shows only those elements for which one or more csl:template instructions are found in the stylesheet. If more than one template matches the element, then first matching template is used. Thus more specific template should precede the less specific one.
When matching template is found for document element, it creates ContentMap item to be shown in ContentMap. All instructions of this template are then used to generate text for created ContentMap item.
When template is instantiated for an element then the child elements are processed recursively. If no template is found for the element, then this element and all its descendants are not shown in ContentMap.
All examples below are used with Syntext Serna Interactive Example distributed with Serna. (See ).
In following example we create a simple stylesheet that will show all document elements without text.
<?xml version='1.0'?> <csl:stylesheet xmlns:csl="http://www.syntext.com/Extensions/CSL-1.0"> <csl:template match="*"/> </csl:stylesheet>
To associate newly created CSL stylesheet add following element to your document template:
<t:csl-stylesheet>$SERNA_TEMPLATE_DIR/custom.csl</t:csl-stylesheet>