Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7763733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:44:01+00:00 2026-06-01T14:44:01+00:00

A warning is thrown whenever the same file is imported multiple times in an

  • 0

A warning is thrown whenever the same file is imported multiple times in an XSL transformation. Usually something along the lines of Stylesheet module file:/Users/blake/Documents/workspace/course-connect-parent/course-connect-publisher/src/main/xsl/config.xsl is included or imported more than once. This is permitted, but may lead to errors or unexpected behavior

However, it seems that if the same xsl needs to be imported by multiple ‘children’ xsl calls (say, a util.xsl containing important functions), this situation is unavoidable.

Is there a way to avoid these warnings, or a better way to do things?

Here is the problem setup:

FILE_A.xsl

imports FILE_B.xsl and FILE_C.xsl
uses functions/parameters from util.xsl, which it gets from FILE_B.xsl & FILEC.xsl
calls templates in FILE_B.xsl
calls templates in FILE_C.xsl

FILE_B.xsl

imports util.xsl
contains templates used by FILE_A.xsl
uses functions/parameters from util.xsl

FILE_C.xsl

imports util.xsl
contains templates used by FILE_A.xsl
uses functions/parameters from util.xsl

util.xsl

Contains functions/variables used by FILE_A, FILE_B, FILE_C
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:44:02+00:00Added an answer on June 1, 2026 at 2:44 pm

    These messages are produced by recent releases of Saxon. It’s not an error to import the same file more than once, but in some processors (including earlier releases of Saxon) it’s very inefficient; it’s also unnecessary, and it can make code very difficult to debug. Basically it means that you have multiple instances of the same template rules present with different precedences.

    In XSLT, unlike other languages, a module doesn’t need to have an import for everything it depends on. You only need one import anywhere in the stylesheet. It’s true enough that if A.xsl uses util.xsl and you want to reuse A.xsl in lots of places, then it can be convenient if A.xsl declares its dependency using an import or include declaration, which means that if B.xsl also uses util.xsl you will end up with this situation of multiple imports.

    I added the messages because of two incidents: one a user who was getting completely bizarre effects from xsl:next-match, the other a user who was getting pathologically bad compile-time performance because one module was imported combinatorially by about 100,000 different routes and therefore at about 100,000 different import precedences. There’s always a tendency when a problem like this arises to try to ensure that it never happens again, and the warnings were a response to that, but like health and safety warnings it’s hard to know when the balance is right. You can always ignore a warning if everything is working OK, and if you really want you can always suppress it by filtering messages in your ErrorListener.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Selenium 2.20 . Why does WebDriver InternetExplorerDriver throw this warning when launching
If I throw an unhandled exception from ASP.NET, a warning is added to the
Can anyone explain me why this throws a findbug warning: if (m != null
(Warning: Clueless Rails Newbie!) In my show.html.erb for my albums view, I call a
Warning acronym overload approaching!!! I'm doing TDD and DDD with an MVP passive view
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/happy/public_html/source/imap/fet_mail_from_email_add.php on line 7 can't connect:
Warning: This is inherited legacy code that was initially put together in the early
warning: passing argument 1 of 'bsearch' makes pointer from integer without a cast and
Warning (2): Cannot modify header information - headers already sent by (output started at
When I add client charset = UTF-8 to my freetds.conf file, my DBD::Sybase program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.