Как обрабатывать повторяющиеся импорты в XSLT?

Предупреждение выдается всякий раз, когда один и тот же файл импортируется несколько раз в 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, содержащим важные функции), эта ситуация неизбежна.

Есть ли способ избежать этих предупреждений или сделать что-то лучше?

Вот установка проблемы:

ФАЙЛ_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

ФАЙЛ_B.xsl

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

ФАЙЛ_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
5
задан Riplikash 10 April 2012 в 20:37
поделиться