Variable use in included XSL files

We have an XSL file that declares variables that are used in a number of included XSL files (included via the <xsl:include href="..."/> tag). When editing the included XSL files, IDEA flags these variables as unresolved and they appear as squiggly red project errors in the project tree.

I have tried using the file association feature to resolve these variables and remove the error flags, but with no success.

Is there a way to resolve XSL variables declared in an enclosing file scope? if not, why not?

3 comments
Comment actions Permalink

Hello Dave,

Is there a way to resolve XSL variables declared in an enclosing file scope? if not, why not?


Unfortunately, the XSLT plugin doesn't support this kind of layout for XSLT files with
references to variables/templates that are neither locally declared nor directly included.

You might be able to work around this by creating a separate file for the declarations and
import this in all your included files as well as the "top level" file(s).

Please file a JIRA request to add support for this.


Sascha

0
Comment actions Permalink

OK, thanks Sascha.

It would be better if the file association feature worked for XSL files because it's clearly not satisfactory to have to refactor valid, working XSL files just to remove spurious IDE errors...

I'll raise a JIRA.

0
Comment actions Permalink

JIRA IDEA-19847 has been filed.

0

Please sign in to leave a comment.