I have an XSL stylesheet which imports a number of other XSL stylesheets, and is used to process a variety of XML files. I would like to check that none of the imported templates conflict.
For example, I have a stylesheet that imports import_one.xsl and import_two.xsl.
import_one.xsl contains a template:
<xsl:template match="Foo">
One
</xsl:template>
and import_two.xsl contains a template:
<xsl:template match="Foo">
Two
</xsl:template>
Both these templates will match Foo elements with equal priority, which is an error that XSL processors can recover from by using the template that was imported last.
For a given set of XML files, I would like to check that no such error will occur.
The XSL stylesheets contain JavaScript functions and use MSXSL node-sets, which prevent me from using e.g. Saxon, which would give warnings in the event of such conflicts. The MSXSL processor can process the stylesheets, but does not give warnings.
What are my options?