只要在 XSL 转换中多次导入同一个文件,就会引发警告。通常类似于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
但是,如果同一个 xsl 需要由多个“子”xsl 调用(例如,包含重要功能的 util.xsl)导入,则这种情况是不可避免的。
有没有办法避免这些警告,或者有更好的做事方式?
这是问题设置:
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
实用程序.xsl
Contains functions/variables used by FILE_A, FILE_B, FILE_C