XSLT Error Reference
XTSE0630
Error message
Duplicate global variable declaration / Variable 'x' is multiply defined in the same scopeTwo xsl:variable or xsl:param declarations with the same name exist at the same level — often caused by a stylesheet being included twice.
What it means
The stylesheet declares the same variable or parameter name twice at the same scope level with the same import precedence. The processor cannot decide which one wins, so compilation stops.
Common causes
- Literal duplicate — two
<xsl:param name="input"/>or<xsl:variable name="config"/>at the top level, often after copy-pasting a block. - The same file included twice.
xsl:includepulls declarations in verbatim; if A includes B and C, and B also includes C, every global in C is declared twice. This is the sneaky version — each file looks correct on its own. - Local duplicate in the same template — two
xsl:variablewith the same name as siblings (re-assignment does not exist in XSLT; variables are immutable).
How to fix it
- Remove or rename one of the duplicates. If you were trying to update a variable: XSLT variables cannot be reassigned — compute the final value in one declaration, or use
xsl:iterate/recursion for running state. - For diamond includes, switch to
xsl:import(imported declarations get lower precedence, so an override is legal) or restructure so each module is included exactly once. - The error message includes the line number of the second declaration — start there.