Altova StyleVision 2025 Basic Edition

New Document Templates and Design Structure

Home Prev Top Next

When creating multiple output-documents, you must create the different New Document templates on the appropriate nodes of the source document. Therefore, you must consider both the output structure as well as the input (source XML document) structure when designing multiple output-documents.

 

Main output document and additional output documents (output structure)

When the first New Document template is added to the design, all design content outside this New Document template is automatically assigned to a separate document. This separate document is considered to be the main output document, and, in the output previews of StyleVision, it is referred to as Main Output Document.

 

In the generated output-documents (created using the command File | Save Generated Files), the name of the main output document will be the name you assign it when generating the output-document files using the Save Generated Files command. The names of the additional output-document files will be the names assigned in the URLs of the respective New Document templates.

 

New Document templates and source document structure

When a New Document template is created, the hierarchical location where it is created is significant. Two possibilities exist:

 

1.The node within which the New Document template is created is processed only once. In this case the New Document template is also processed only once. The filename in the URL property of the New Document template can therefore be a static name.

2.The node within which the New Document template is created is processed multiple times. As a result, the New Document template will be processed as many times as the node is processed. An example of such a situation would be the following. An Office element has multiple Department element children (for its various departments). If a New Document template is created within the Department node in the design, then, since the Department node will be processed multiple times (for all the different Department elements in that Office element), the New Document template also will be processed multiple times, once for each Department element in the source XML document. The filename in the URL property of the New Document template must therefore be a dynamic name. Otherwise, the output-documents created for the Department elements will each have the same filename.

 

© 2018-2024 Altova GmbH