Altova StyleVision 2024 Professional Edition

The Change-To Feature

Home Prev Top Next

The Change-To feature is available when a template or the contents of a template are selected, and enables you to change: (i) the node for which that template applies, or (ii) how the node is created in the design.


What can be changed with the Change-To feature

Either a node or its contents can be changed. In the image below left, the node is selected. In the image at right, the node's contents are selected.


SSChangeTo_SelectNode        SSChangeTo_SelectNodeCont


The n1:Name element in the screenshot above has been created as (contents), and so the node's contents are represented by the (contents) placeholder. Alternatively, the node could have been created as another type of content, for example, as an input field or combo box. Other types of content can also be selected.


The Change-To command

Access the change to comannd by right-clicking your selection. In the context menu that pops up, select Change To (screenshot below).




Changing template matches

If a template is selected, you can change the node for which that template applies. This is useful if, for instance, the name of an element has been changed in the schema. When you mouse over the Change To command and select Template from the sub-menu that pops up, you are presented with a list off all the nodes that may be inserted as a child of the selected node's parent element. Click one of these nodes to make the template apply to that node.




If the selected node has a content model that does not match that described in the template, there will be structural inconsistencies. Such inconsistencies are errors and are indicated with red strikethroughs in the tags of nodes that are invalid.


You can also change the template-match to match, not a node, but a variable template.


Changing the content type of the node

If a template or its contents are selected, then you can change the type of content the node is created as. On hovering over the Change To command in the context menu, the type of content that the selected node can be changed to is displayed as options in the sub-menu that pops up (screenshot below).




The screenshot above has been taken with a combo box selected.


© 2018-2024 Altova GmbH