Altova StyleVision 2023 Professional Edition

The Contents command inserts a (content) placeholder at the cursor location point. There (content) placeholder can be inserted within two types of node, element and attribute, and it indicates that all children of the current node will be processed.  

 

If the current node is an element node, the node's children element nodes and text nodes will be processed. For the processing of children element nodes, global templates will be used if these exist. Otherwise the built-in template rule for elements will be used. For the processing of text nodes, the built-in template rule for text nodes will be used, the effect of which is to output the text. Effectively, the built-in template rule for elements, outputs the text of all descendant text nodes. It is important to note that the values of attributes will not be output when the (content) placeholder is used—unless a global template is defined for the attribute's parent element or one of its ancestors and the attribute is explicitly output, using either the (content) placeholder or any other content-rendering component.

If the current node is an attribute node, the built-in template rule for the attribute's child text node will be used. This template copies the text of the text node to the output, effectively outputting the attribute's value.

 

The (content) placeholder can also be inserted for a node by placing the cursor inside the node tags, right-clicking, and selecting Insert | Contents or by clicking the Insert Contents icon in the Insert Design Elements toolbar, and then clicking the location in the design where the element is to be inserted.

 

Styling the contents

The (content) placeholder can be formatted by selecting it and using a predefined format and/or properties in Styles sidebar. This formatting is visible in the design, and, in the output, it will be applied to the contents of the node.

 

Replacing contents

If another node from the schema tree is dropped into a node containing a (content) placeholder, then the existing (content) placeholder is replaced by the new node.

 

Deleting contents

The (content) placeholder can be deleted by selecting it and pressing the Delete key on the keyboard.

 

 

Note:You can create an empty template rule by deleting the (content) placeholder of a node. An empty template rule is useful if you wish to define that some node have no template applied to it, i.e. produce no output.

 

© 2017-2023 Altova GmbH