qtiworks
qtiworks copied to clipboard
Rendering of printedVariable blows up if @index is a variable reference
The rendering XSLT for printedVariable
is currently expecting @index
to be an integer, rather than integerOrVariableRef
, and is consequently blowing up if the attribute is a variable reference.
This one is going to require some effort to fix. The current rendering of printedVariable
does all of the variable de-referencing within the XSLT. Handling integerOrVariableRef
is non-trivial (as one can see from the corresponding implementation of this within the Java classes). I think it might be better to add an XML filter to the rendering pipeline the computes the final value for each printedVariable
(using the existing Java logic) and substitutes the result into the XML before it gets passed to the rendering XSLT. That would simplify the amount of work the XSLT has to do here.