Page 1 of 1

redundant warning about duplicate include of stylesheet

Posted: Wed Jul 05, 2023 1:30 pm
by hepabolu
I am using several XSLT stylesheets that each serve as a main stylesheet but they include other stylesheets that include common/generic templates and functions. Each main stylesheet includes/imports the shared stylesheets only once, but I still get warnings about duplicate imports or includes.

So I have something like this:

main1.xsl

Code: Select all

<xsl:stylesheet ....>
  <xsl:include href="utils.xsl"/>
  ......
</xsl:stylesheet>
main2.xsl

Code: Select all

<xsl:stylesheet ....>
  <xsl:include href="utils.xsl"/>
  ......
</xsl:stylesheet>
utils.xsl

Code: Select all

<xsl:stylesheet ....>
  <xsl:include href="other-utils.xsl"/>
  ......
</xsl:stylesheet>
The main stylesheets never include/import each other.

What can I do to get rid of this warning, other than suppressing all warnings?

Re: redundant warning about duplicate include of stylesheet

Posted: Wed Jul 05, 2023 6:58 pm
by chrispitude
Hi hepabolu,

How are you running these refactoring operations? Is it as a refactoring operation with a descriptor file, a refactoring transformation, etc.?

Re: redundant warning about duplicate include of stylesheet

Posted: Wed Jul 05, 2023 10:38 pm
by hepabolu
Not really sure how refactoring comes in. I use the main stylesheets independent of each other. They are similar but vary slightly. Each main stylesheet serves a different purpose.

Re: redundant warning about duplicate include of stylesheet

Posted: Thu Jul 06, 2023 9:44 am
by tavy
Hi hepabolu,

Unfortunately I cannot reproduce the warning. I created a similar structure and the validation engine does not report any warnings.
What version of Oxygen do you use? Do you use the Main Files Support from Oxygen?
https://www.oxygenxml.com/doc/versions/ ... files.html
Maybe you can create a simple example to reproduce the warning.
Best Regards,
Octavian

Re: redundant warning about duplicate include of stylesheet

Posted: Thu Jul 06, 2023 12:11 pm
by hepabolu
I am using version 25.1 build 2023070306
I don't use the Main Files feature.

I also get the warnings when I run saxon.jar on the command line.
It will take some time before I'm able to create a simple example because I'm on holidays currently.

Re: redundant warning about duplicate include of stylesheet

Posted: Wed Aug 09, 2023 2:52 pm
by hepabolu
Finally found the culprit, there were actually some files included more than once.