Structure Maps

Parent Previous Next

Structure Maps


Structure maps are XML files that are used during documentation generation that help organize the layout (table of contents) of your documentation and determine which templates are used for each object within the structure map. A basic knowledge of XML file structure is necessary in order to edit Structure Map files.


Table of Contents

  Nodes

o   StructureMap

  Structure

  ChildObjects

  ChildObjectsSubStructure

  Object

  RecursiveChildObjects

  Rules

  Rule

  Attributes

o   condition

o   flag

o   nameMatch

o   templateKey

o   typeMatch

o   selector


Due to the vast number of Object Types that can be found within a Carbon Tree, there are not structure maps that correspond to every object type. A detailed list of all object types that currently have structure maps included within DOC xPress Server upon installation can be found here.


Additionally, there is another way to know whether or not an object currently present within your Solution's documentation does not have a corresponding Structure Map:


Important Note:

DOC xPress' Metadata Viewer is an invaluable asset when taking on the task of creating custom Structure Maps as it provides you with an exact structure of a carbon tree, including object types and its properties.


When generating documentation for the root object found within the layout, DOC xPress will look for all files within the templates folder that follows the naming pattern "StructureMap.*.xml". After gather all Structure Map files, DOC xPress will use the StructureMap's typeMatch to find all matching Structure Maps. If DOC xPress finds more than one Structure Map that matches, DOC xPress will use the first match, otherwise, it will use the default Structure Map (StructureMap.Default.xml). After a structure map is found, DOC xPress will use the structure map to generate the layout (table of contents) of your documentation and apply the correct templates are for each object within the structure map.


Below can be found a simplified Structure Map for a SQL Server Instance that includes links for further details of the expected behavior for each Node and Attribute:


<?xml version="1.0" encoding="utf-8" ?>

<StructureMap typeMatch="Microsoft\.SqlServer\.Management\.Smo\.Server">

<Structure>

<Object selector="." templateKey="SqlServer" condition="./[/Information[@Edition != &quot;SQL Azure&quot;] || !(/Information)]" >

<Object selector="." templateKey="SqlConfigurations" flag="SQL.Configurations" condition="./Configuration/" />

<ChildObjectsSubStructure selector="./Databases" condition="./Databases/" />

<Object selector="$Object(Path:'.[./Logins/ || ./Credentials/]')" templateKey="SqlSecurity" flag="SQL.Security" >

<Object selector="Logins" templateKey="SqlLoginsCollection" condition="Logins/" >

<ChildObjects selector="./[@IsDisabled == &quot;False&quot;]" templateKey="SqlLogin" flag="SQL.SecurityDetail" />

<ChildObjects selector="./[@IsDisabled == &quot;True&quot;]" templateKey="SqlLoginDisabled" flag="SQL.SecurityDetail" />

</Object>

<Object selector="Credentials" condition="Credentials/" >

<ChildObjects selector="./" flag="SQL.SecurityDetail" />

</Object>

</Object>

</Object>

</Structure>

<Rules>

<Rule templateKey="SqlCredentialsCollection" nameMatch="Credentials" />

<Rule templateKey="SqlCredential" typeMatch="Smo\.Credential$" />

<Rule templateKey="GlobalDefault" />

</Rules>

</StructureMap>