Metadata and Self Identifying Templates
I've got a transformation that's getting very large. Unfortunately, because of orchestration constraints that are out of my control, I'm unable to use <xsl:include> to logically separate my code sections. But I have the need to logically and programmatically identify each template.
For example, I have 3 groups of templates types: templates that filter data, templates that check data, and templates that enrich data. I'd like to be able to assign each template a unique, categorizing ID that can be located via another transformation. If other words, filtering templates would be ID'd based on their category, rule name and version number. (Filter.RuleName.X) and so on with other categories, (Checks.RuleName.X / Enrich.RuleName.X) where X is a version number.
Using this type of label for each template, I can also increment the versions of each template. So if I make changes to a particular template, I can up the version number X. Once each template is ID'd and version-ed, I could do all kinds of things that I want to do.
Aside from a comment node on/in each template is there any other mechanism within XSLT to self identify a template? I'm using XSLT 2.0 and Saxon 8.9. I've looked through instructions and saxon extensions, but can't seem to find anything that meets my needs. Any suggestions?
|