condition

Parent Previous Next

condition


The condition attribute utilizes Path Grammar or an $Object Selector to dynamically show/hide the associated node based on whether or not the Path Grammar or $Object Selector returns at least one object. The condition is always scoped to the parent node.


Syntax


This ChildObjectsSubStructure node will only return the "Databases" node if the "Database" nodes contains at least one child node:



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



This Object node will only return the parent node if the Property named "Edition" found on the Information node is not equal to "SQL Azure" or the Information node is not present within metadata:



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

</Object>



This Object node will only return the "UserDefinedTypes" node if the object with path "UserDefinedTypes/" exists:



<Object selector="UserDefinedTypes" condition="$Object(Path:'UserDefinedTypes/')" >

</Object>



Associated Optional Nodes

ChildObjects - Used to create child pages within the documentation for each object that matches the selector.  


ChildObjectsSubStructure - Used to explicitly search for another Structure Map that matches the object type for each object that matches the selector.  


Object - Used to create a single child page within the documentation for each the first object that matches the selector.


RecursiveChildObjects - Used to recursively create the entire metadata tree for each object that matches the selector. This child node is most often used during the creation of a Structure Map to help display the entire structure of a set of objects.