I have looked in the VP documents and searched on-line, but cannot find an easy answer to what I am trying to do.
I have a project that I want to document. From the trunk I have a series of models. Some of these models have sub-models. The models also have packages, some of which also contain packages. Finally, we get down to the classes within the packages. As an aside, I currently have some classes under models, not under packages - but I can clean those up if required.
I woudl like to create a document that lists/explains all the classes in the project. This, by itself, is relatively easy through . But I would like to structure this document through the Models and Packages. For example:
1 Model X
1.1 Sub-Models
Model 1
Model 2
1.2 Package List
Package 1
Package 2
1.3 - 1.n [Package Details] Package:
1.3.1 Sub-Package list
Sub-package 1
Sub-package 2
1.3.2 Classes
Class 1
Class 2
While a sub-model would be listed as belonging to a particular model, the sub-model would get its own Level-1 heading when exposing the details (i.e. the document is not intended to be infinitely recursive). Similarly for packages under a model.
The key thing for me is that the classes are described under the relevant packages, and not just listed without context. Particularly because a couple of the packages have similar class names within.
What I have tried is to call a document template XML snippet recursively, but did not get any results from that. Any guidance would be greatly appreciated.
I can’t believe I did not find the linked How-To article in all my searching! I would like to post my snippet, but in my various attempts I think I totally destroyed my logic. Looking back over my two main attempts:
one specific example I created a copy and called the original snippet instead of the new one (i.e. ‘Report2’ called ‘Report’, not ‘Report2’
the other example I did have the correct ‘Reference’ call, but something may have been not happening, because I commented it out. I include this snippet below:
Thanks for that help. This is the current draft of code which gives me the result I desire - I am posting here for future reference as it may help someone else. I currently (as you noted in your answer above) have this duplicated in both the Model and Package sections. As such, I have given it a slightly different name for each section - a descriptive name, so ‘ModelDetails’ doesn’t make as much sense under Package.
Would I be better coding this as a General snippet, and then Reference it from the Model and Package elements in a single line SML snippet?